Jump to content

Need help programming ladder logic to read input


Recommended Posts

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

pymodbus question.png

Link to comment
Share on other sites

  • MVP 2023

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.