Hello Guest it is April 19, 2024, 07:02:28 PM

Author Topic: AKZ250 CNCDIY INPUTS AND OUTPUTS  (Read 2354 times)

0 Members and 1 Guest are viewing this topic.

AKZ250 CNCDIY INPUTS AND OUTPUTS
« on: November 04, 2014, 05:02:30 PM »
I have an AKZ250 card working well with its step motors and limit swithches, but I need to interact with a Z control that I did.

Seeing the examples in the macro subfolder of Mach3 I wrote the next, but it refuses the "#" sintax:
---------------------------------------------------------------------------------------
#define input3 3  rem "cut position"
#define input4 4  rem "up"

rem output 2=plasma trigger output 1=cortar

if IsActive(4) then
 
   ActivateSignal(1)   rem "cut"     this make torch down
   ActivateSignal(2)   rem "plasma trigger"

   rem delay
   SystemWaitFor( 0.6 )
   
    while not isActive(3)
        SystemWaitFor( 0.1 )
    wend

DoSpinCW()

rem now the X,Y program can proceed  (height will be controlled by the Z ctrl circuit I did)
--------------------------------------------------------------------
I have rode macro sections
I found for instance "ActivateSignal(n)" in Macro M50
It apparently needs a definition but the example has a #define line who is dettected as an error by the VB editor and I don't know where is the documentation of this characteristic of Mach3, wich functions are available in these macros, syntaxis, specially,   ¿Do Mach3 uses the macros in macro subfolder as a default? or what has to be done in order to get this code executed?

How can I make that M3 set on (ttl high) an output of the card or read an input?  the card is working well with its motors and receive well the limit switches, and Mach3 reflect this switch activity changing the condition in the diagnostic tab leds     How can I put in a variable the value of an input of that card?  I saw the IsSignalActivate but I don't know if it works with this environment.

Somebody told me to use the M7 M8 M9 to interact but I'm in the way to make some tests.

Thank you very much for your help

Luis J