programming language to plc

S

Thread Starter

sun919

when sending data( bytes[]) from serial port to plc, how can i make sure that plc is reading the data and will be processing with the data to
output the value (ie sending data through serial port) and this result in output y5 to be running. I'm using mitsubishi plc model fx1s-20mr, or is
it impossible with this model ? if it is can u recommend which model to buy and do i needed to buy module 232 or 422 boards many thanks
sun
 
A

Alan Rimmington

The best way would be to read the value back from the PLC after writing. To double check the comms use a free running timer in the PLC and read its value, if it is changing then comms & PLC are working.
 
M

Michael R. Batchelor

The scheme we use when it's absolutely critical that the correct value be in a register before a task starts involves a little bit of handshaking. It seems like overkill, and I'm not familiar with the Mitubishi line or this particular application, but because the communications layer has a lower priority than the logical layer in most PLC executives it's often possible for a scan to execute with only half the data in place. (Sometimes this isn't a problem, sometimes it's a big problem, depending on the application.)

The handshake scheme basically boils down to:

0) Previous cycle resets control registers at end of run.
1) Control application puts the data in buffer registers.
2) While not in cycle ladder moves buffers to control.
3) Control application monitors control registers.
4) When control registers match transmission data control application raises start flag.

Clearly this can get more or less complicated depending on *YOUR* actual requirements, Just work out the details you require and don't depend on luck to make it work for you.

--
Michael R. Batchelor - Industrial Informatics & Instrumentation, Inc.
Linux is like a wigwam...
No windows, no gates.
Apache inside.
 
Thanks for the advice ..
I've try to communicate with plc in hyper terminal and what i get is when i press alt 3 ( to send end of texty ) it gives me a lots of unacknowledgement sign . does this it is not possible to send command from program to send order to plc ? Here is a list of code that i wrote on terminal to check the plc is response normally.
This is the list of setting i use 9600 bps, 7 bits, even and no hardware checking. This is the command that i use in hyper terminal:
(Alt 5) (check status),(alt2), 1 00a0 01 35 alt3 and i've got lots of unacknowledgement also this morning when i've try to run hyperterminal it does
not pass the alt2 command... pleease help
many thanks
sun
 
Hi!
First you using mitsubishi plc model fx1s-20mr
So if you have protocol detail then all responce which plc gives are indecated. if you are don't understed this detail send me a protocol detail
I will explain how to communicate and what is the responce from plc

kalpesh
 
Top