ngoc vo Posted December 28, 2018 Report Share Posted December 28, 2018 Hello everyone, I'm writing a program for the PLC to read an input from pymodbus to turn on a button. So far I have succeeded on making the command prompt communicate with the PLC but I don't know how to make it so that the PLC will recognize that signal as a command and turn on the button. Below is the sample ladder logic code I used to set it up, and a screen shot of what command i used in the command prompt. My apologies before hand for my bad writing. ModbusTest2.vlp Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted December 28, 2018 MVP 2022 Report Share Posted December 28, 2018 What does "turn on the button" mean? Are you just trying to turn on MB 1 from your PC using MODBUS? If so, you don't need ladder rung 3 in your program at all. Just use MODBUS command #5 or #15 to force MB 1 on. Keep in mind that MB 1 will be MODBUS coil address 2 since Unitronics memory addresses start at zero and MODBUS protocol starts at one. I'm also going to move your post to a more appropriate forum. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted December 28, 2018 MVP 2022 Report Share Posted December 28, 2018 I see now that it appears you are trying to "unhide" a button on your screen. When MB 1 is on (or "TRUE"), then the button will be hidden. You have to take out ladder rung 3 before you can manipulate MB 1 from your PC. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.