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. 


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

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...