Linuxdept (Customer) asked a question.
MODBUS Addressing Vol 2
HI all,
i am using VB.NET to get and Set Holding registers written into the click but i am stuck on it acually doing anything inside the click. were are the Holding registers for the Click PLC >? does anyone have any examples of setting a Holding register Or "Any-register" in a Click that i then can put a (Y001) to have it output , so if i use VB.NET to write to register > Modbus - 400006 in VB.NET i use 006 it does Put a 1 into 400006 in the click so i need to turn on Y001 but how . ?? i have it Going to DS7 then its copying into DD1 and it is writing the Value but where can i goto from there.? needing to turn on Y001
You would need to either move or copy the input from 40006. then you could use an = in the next rung & set it to = 1. then have your Y001 as the output.
i see now i just was trying to go straight through , but my Fear is that the Copy instruction will Slow Down a Modbus Communication to the PC once the Y001 is set, i need these transitions under 10ms , we will just have to push it and see how fast it goes. have you tried a speed test on this . ? i need to just set the 1 and have it go back to 0 will i have to set it back to Zero with another Condition.? that will be a lot of rungs for 16 Inputs and 16 Outputs. Let me know
Thanks Jrayb.
The copy instruction will not add much overhead to the program. Modbus communication is much slower than the PLC scan.
If your objective is to set the outputs directly from Modbus then you should set them all in one Modbus write using the YD0 (Represents Y1 to Y16).
Regards,
Garry
I do not write directly to physical outputs.
Whenever I do anything like this, I have a 'heartbeat' sent/recevied between both endpoints, if either detect a nonrecoverable heartbeat loss, the remote output device can control its outputs as desired, and the local control device can make some intelligent assumptions about and log/report the status in the field.
In a CLICK, something like this:
If Heartbeat=PASS
...copy DH1 -> YD0
ElseIf Heartbeat=FAIL
...If FailMode=OFF
......copy 0H -> YD0
...If FailMode=ON
......copy FFH -> YD0
...If FailMode=LAST
......//DO NOTHING
EndIF
[EDIT edited and edited and edited because we lost 'Preview' mode in the forum change]
So in this Example i have an input X001 when it Goes true it makes DS100 have a 1 now my PC is seeing DS100 as a Modbus address as 1 so now when X001 Goes False X001 Stays True. i need it to Follow the Input. my Fix will be in Next Post.
So i changed it to be .. to make it change to 0
If CLICK math would let bits masquerade as integers, you could have this in one math instruction.
I didn't see anyone respond directly to your question:
where are the Holding registers for the Click PLC ?
You probably already found it, though.
Thank you , kewak for your reply, i have it our VB.NET program is only looking the the Little endian of the address. so it would be 002
Thank you all ,