Jump to content

Recommended Posts

Posted
Hi again, I've been playing around with using the serial ports with some varied success. Now I'm wondering how to accomplish my next task/goal. I would like to be able to turn an output on or off depending on what I send to the serial port with my VersaMax PLC. Has anyone ever done this or have an idea of what to try, right now I'm a little stumped on what to do. Thanks for any help!
Posted
I'm not sure exactly on how to go about turning the right output on. If I'm thinking about this correctly when something is sent to the PLC through the serial port it goes into an input buffer first and then you have to do a read bytes (or string) comreq to get that information. So am I right in thinking then that there isn't a way to have an output turn on simply by sending something (some string of characters or something) to the plc through the serial port? Thanks for any help.
Posted
The versaMax PLC will talk one of three protocols. By default it is an SNP Slave, but it can be configured to respond to Modbus RTU or Serial ASCII also.
Posted
What I've currently done just to start getting a little familiar with this is, using the 232 port for programming and the 485 port for communicating with a windows hyperterminal session. The 485 port is configured for serial i/o (from a suggestion given earlier to me). We purchased a starter kit and in that kit an input simulator was included which is sort of pretty handy so that's what I'm using to turn my inputs on and off. - I first turn on an input and it flushes the input buffer. - Next I type a message in the hyperterm window and send it to the plc - I then use a read input buffer and store the message in memory - Then I use a write byte command and write the portion of memory where it is stored. This seems to work all right to me. I just want to figure out if there is a way for me to do this, as well as having an output turn on, without having to manually switch inputs on and off. Any ideas? Thanks again!
Posted
If the address area where it is stored were %Q memory, outputs would come on.
Posted
I'm having a little luck now with turning on an output. I send the plc character 1 using hyperterm and my output turns on, however when I try sending it a zero nothing happens the output is still turned on. Unable to turn the output off yet. Still manually setting inputs to read what I send the plc. No luck yet with trying to figure out a way around this, if possible!

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...