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 Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted December 28, 2018 MVP 2023 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. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted December 28, 2018 MVP 2023 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now