PLC 5 ascii awt and arl that will not@@#$#

controlconcepts

Lifetime Supporting Member
Join Date
Oct 2008
Location
boston
Posts
300
I have a plc 5/20 with ascii trouble...

every time I think I have a code change
well thought out. I try it works great..
Then not so much.. Will work if the same

type of command is sent and when a

different type of command is sent it

seems to receive the last commands

buffer...


So here is the setup

plc5/40 com 0 sending raw simple commands

to a audio/video controller ( If anyone

knows them it is an Extron mva1616 ) such

as mute input 1, tie audio input 1 to

output 3, and say tie video input 3 to

output 2...

The AWT logic works every time.
but no mater what the ARL or ARD I use or

code I have tried I cannot get the correct

response 60% of the time. It seems to

work fine then send a command ( for

example mute output 1 {1*1Z} expected

response is {Amt01*0} ) and works OK.

then try again and again with different

commands and instead of A {Amt01*0} it

returns {Vmt01*0} one of the last

commands that was sent... The read is

very unpredictable and I think if there

was a way to clear the buffer like in a

SLC this might work but not in a P5.

Well here is the slopppppy file to it any comments or great answers are always welcome!!!!!!!!!!!!!!!!!!


Thanks,
Matt
 
If you can sniff the serial stream in realtime take a look at it to see if what you think is happening really is. I had similar results explained to me as a contractor was doing some serial work. I never got to look into it but he fixed it by sending commands using a different ascii code than he expected to. It sounds similar to what you are seeing.
 
Thanks waterboy,

any recommendations for a sniffer??

I once made on for use with hyperterminal but that was long a go!!

Thanks again,
Matt
 
I had a big enough project to justify buying FrontLines Serial Sniffer ($$$) and its just perfect.

But Keyspan makes a USB to serial 4 port hub whos driver includes a serial sniffer. And it works pretty darn well.

There are other software alternatives, some free, but they must hook to your com port before the app does and sometimes that doesn't work as well as it could and results in a com port conflict.

Another thought is that you could buy a serial tap from B&B and then use hyperterminal. I haven't done that yet but it should work too.
 
If you have to troubleshoot ASCII or any other serial protocol more than once a year, I very strongly recommend the Stratus Engineering EZ-Tap.

This device has a permanent place in my serial communications bag of tricks. Being able to see with certainty what bytes are going on the wire in what order at what time is very valuable.
 
Thank you all for the great alternatives. When i have the finances I will but something like mentioned. Right now I have a port server with 16 232 ports. I know of a way to use two ports and to sessions of hipretermanal to monitor tx and rx I just can't remember hoe to wire the cheap mans Sniffer

Thanks to all,
Matt
 
Still thinking about it and after many trials. If I send the same command twice or three or four times I get the right response.. When I send a different command it sometimes comes back with the last commands expected return.. When I use hyperterminal and use the same commands with no question EVERY TIME it sends the command and reacts appropriately and the response is clear and constant!!! so where am I missing the part between hyperterminal and the reads from my plc5?????????????

Thanks ,
Matt
 
If you have to troubleshoot ASCII or any other serial protocol more than once a year, I very strongly recommend the Stratus Engineering EZ-Tap.
Ken
Not FrontLine? I'm shocked :eek:

Have you ever come across a device that will let you share a serial device with 2 "receivers"?
I have a weatherstation that sends to a PC with its own software. I also have a modbus converter that accepts the same serial stream and gives me modbus registers for SCADA.
The problem of course is that I can only use one or the other. Its at the bottom of a list of projects so I haven't spent any quality time on it and I don't know how much handshaking is going on. But have you come across any device that would facilitate this type of arrangement?
 
Ha s anyone looked at the code yet? Am I not waiting enough time to get the proper response? It always sends the data and completes the initiated query with the correct action. Why can I not get the CORRECT return? I am puzzled!!

I hope it is something simple I am doing wrong. and can laugh about it latter..

Thanks,
Matt
 
And if someone knows a bout STX ( structured Text in RS5 ) Is there a way to write something along the lines of..


IF ST19:1 = (Out01 In01 Aud)then
B3:01 := 1;
END_IF

Basically is there a way to not to have a ton of string memeroy and use ( like a simple MOV instruction MOV 1432 to XX ) but other than a COP of another string.
 
I just don't have the time or hardware to troubleshoot this.

All I can really offer is that I've always had far more success when I can really see what's going on the wire than when I'm trying to infer or guess.
 
Am I not waiting enough time to get the proper response?
Sorry, I could not open your PLC5 program, so cannot say. An offhand guess is that if it works 40% of the time, but not every time, then it is communications timing issue. One device is not getting enough time (or the network is too slow) to respond before the next message comes in.
 
I waterboy I would use a Red Lion DSP or a G3 and write some code. A few serial ports is not a big deal for the red lion.

I bought a Stratus ez tap after Ken recommended them. It stays in my troubleshooting tool box. I have probably 15 different serial breakout boards and just as many gender adapters several 232 /485 & 232 / 422 adapters. Most customers are amazed and what cables you can make on the fly with this little tool box. I have Docklight on every computer I use for field service. I can't justify Frontline yet.
 
Thank You all that have responded.. Like Lancie1 Said I think it is a timing issue. I changed the settings under the PLC 5's COM port ( fumbling for hours) and got it working!!!!!!!!!!!!!!!!!!!


Ya
\
99.79% of the time

If I send a wrong command say ( 1*10h but It should have been 1*10g )

The only way to get it to communicate again is to turn the PLC5'S power supply off then on!!>????

Then its gravy!
Is this because the PLC5 dose not have a ascii clear buffer ACL?

or am I missing something

Thanks to You all again
Matt

PS: I will try to post the program again I am using 7ZIP so I will post a pdf if that works
 

Similar Topics

Good day! I am working on a project at our campus to integrate fleet vehicle chargers with load management so we don't overwhelm our service. The...
Replies
37
Views
3,811
I have a Horner PLC that is reading Ascii string from a device. When the device responds, it responds with the hex value in Ascii. I need to...
Replies
8
Views
2,381
Does anyone know how to inhibit the 232 module from sending data during PLC power-up? To send data during normal operation, the Transmit Record...
Replies
3
Views
1,904
Hi Friends, We are planning to use 1769-L3 PLC with ASCII module as we are planning to communicate with Microcontroller , Barcode reader and...
Replies
1
Views
1,475
Hi, I am using a Click PLC for MODBUS communication with a range of gas sensors - everything is going reasonably well in that I can read / write...
Replies
8
Views
4,475
Back
Top Bottom