modbus -write coils

More
11 Oct 2023 06:58 #282730 by den2313
modbus -write coils was created by den2313
Hello. How to transfer the bit (write coils 0x05) in modbus classicladder? Thank you

Please Log in or Create an account to join the conversation.

More
13 Oct 2023 18:13 - 13 Oct 2023 18:15 #282919 by Todd Zuercher
Replied by Todd Zuercher on topic modbus -write coils
Are you using the Modbus capabilities built into Classicladder or are you using some other Modbus interface in Linuxcnc, such as Mb2hal?

If you are using the Modbus facilities built into Classicladder, on the Modbus Configuration screen, In the far right column you assign the variable number used for your write coils assignment. It must be an integer number between 0 and what ever you set as the maximum number of bits (default is 10 or 20). (I'm not sure if this number is just bits or if it is hal output bits.)

So if you configured it for 8, for example when you use coil %Q8, Classicladder will write the value for that to the modbus coil.
Last edit: 13 Oct 2023 18:15 by Todd Zuercher.

Please Log in or Create an account to join the conversation.

More
13 Oct 2023 18:39 #282926 by den2313
Replied by den2313 on topic modbus -write coils
I use the regular classicladder. When I use uint8 send and receive everything works fine ( Read x03 %W2=1 or %W2=0). But when I use "Write coil" then Linux always sends "01 05 00 00 00 00 + crc".

Please Log in or Create an account to join the conversation.

More
13 Oct 2023 18:43 - 13 Oct 2023 18:50 #282928 by den2313
Replied by den2313 on topic modbus -write coils
I did not find examples of transmitting and receiving individual bits via modbus in linuxcnc (0x05, 0x15).
    If I use "%Wx=%Qx" where Qx= 0xFF00 or Qx=0x1 - it doesn't change anything. Command 05 00 00 FF 00 crc - should set a bit in address 00 00, but this does not happen.
    PS .Sorry for the spelling, I'm using googler translate
Last edit: 13 Oct 2023 18:50 by den2313. Reason: I added to the question

Please Log in or Create an account to join the conversation.

Time to create page: 0.139 seconds
Powered by Kunena Forum