Hi there
I have a bit of a brain ache and I can’t seem to get rid of it.
Over the last few years I have been developing some Modbus control stations.
Modbus is working well, hardware is ok, just have a few quirks to sort out
Can anyone out there help me. Its all to do with SetUserDRO( x,y) operation
First I have a button on the screen using function 113 toggle coolant, this works fine
M08 and M09 work fine
My Modbus input and output work fine and switches coolant on and off
My brain works as follows
I create a counter (DRO1014) and count the presses 1= coolant on 2= coolant off
Line 1- create a pulse from my Modbus input
Line 2 - reset my counter if it gets above 2
Line 3 - count each press of the button
Line 4 - turn on my coolant LED when coolant active
Line 5 - if counter is 1 turn coolant on
Line 6 – if counter is 2 turn coolant off
My problem is if I turn the coolant on manually and use M09 to stop it the lines of code in my M9.m1s does not work. In here I change the value of my counter DRO1014 to 2 so that the next button press will turn the coolant on. What happens is the counter does not update and I need two presses of the button to turn the coolant on. So my method of synchronising the M-codes with the buttons does not work.
Why does writing SetUserDRO (1014,2.0) not work, why does it not update or why can brains not see it. I have attached files showing code.
Many thanks in advance.
servomac