I built a stamping machine, running Mach3 with Auto-Direct DL06. Stamp pressure is controlled by a 4-20mA signal from the DL06 and changes with every stamp tool. I would like to send an analog value from Mach3 to the PLC when a tool change axis is in a particular position. In that way when the tool change axis comes to rest, a regulator will automatically set the desired pressure.
I am using Serial Modbus, not plug-in enabled. The machine is four axis, everything is working, several Brains are running successfully with exception to the pressure regulator control. I wrote a Brain that uses axis position and feed-rate to get Mach3 output pin/register 64 (analog) set to a value and sent out to the PLC. All I can seem to do with this Brain is get pin 64 mapped into the PLC as 0001 or 0000. I cannot successfully get a full integer sent out to the PLC.
I tried using a Brain with a terminator "Modbus", using output pin 64. There is an entry for Bit 0-15, but it seems to be a single bit only. Another Brain terminator called "SendString" would seem like the perfect avenue. I input "111111111111" in the box, use Register Address 64 and check 0-128 serial, but it does not work for me. When I check my PLC, where it was changing from 0000 to 0001 using the Modbus terminator, now it just stays at 0000. I could just send bits to the PLC and have the PLC fill the analog register, but would like to derive this from Mach3. Also have not looked into Macros. Any help would be greatly appreciated!