Sending ASCII from SLC 5/05

csedgwick

Member
Join Date
Feb 2006
Location
london
Posts
10
I'm trying to use the 232 port on an SLC 5/05 to send ASCII characters to an LED marquee (PMD 1100 slave). I'm a little new to this forgive me if there is a simple answer to it. I've created a simple program using S:40 as a clock, copied it to an N file,done an AIC with the result being stored in a ST file, then used AWT to O/P it from the 232 port. I'm getting characters displayed, just not the right ones! I've broken up the HH:MM:SS and I can see them still as decimal in the ST database. Is there an instruction I've missed to output the equivalent decimal as ASCII? Also , I need to add characters at the start of the ASCII string to enable addressing of individual displays, center the characters, and clear the display.
Would greatly appreciate any information on where I'm going wrong.

Thanks.
 
Investigate the 'concatenate' (ACN) and 'ASCII Extract' (AEX) instructions. ACN builds up strings out of other strings, while AEX extracts strings from other strings.
 
ST9:0 = result
ST9:1 = ":"
ST9:2 = HRS after AIC conversion to string/ASCII
ST9:3 = MIN " ......
ST9:4 = SEC " ......
ST9:5 = "" , a blank string
ST9:6 = device code after conversion to string



COP ST9:5 to ST9:0 to clear ST9:0
ACN ST9:0 with ST9:6 to place device code into the string
ACN ST9:0 with ST9:2 to place HRS into the string
ACN ST9:0 with ST9:1 to place a colon into the string
ACN ST9:0 with ST9:3 to place MIN into the string
ACN ST9:0 with ST9:1 to place a colon into the string
ACN ST9:0 with ST9:4 to place SEC into the string

Now send the string. This is just a starting point. Your logic will vary.
 
Last edited:
Please post an example of what you are trying to send and what is being displayed on the display. This may help more clearly define what is going on.

One thing that jumps immediately to mind is are you sure the baud rates are the same between the plc and the display. Mismatched baud rates, especially slower on the sending side than the receiving side, can cause ASCII data to appear rather odd on the receiver.

Keith
 
Thanks for replies. Yes, the baud rates are the same. I've sent data using hyperterminal with the same setting I've used with the PLC. Might try some of those instructions then. I was hoping you could just load messages into a file, convert them to ASCII then send them.

Out of interest, if I load ST file with 68 - displays K. 69 - displays C. Every other value seems to O/P either Z { } % or x.

I know the display works properly as I've used the PMDPRO software to directly send messages to the display.

If I could get something to display from the 5/05 I could work from there. Just need to work out how to get from Alphanumeric to ASCII.
 
Have you tried receiving data from the plc using Hyperterm? This would tell you what the plc is putting out, which may be interesting.


Keith
 
I haven't actually got a lead to go between the PC and PLC. The display runs through a 232 - 422 convertor. I'm just trying out Doug's suggestion using the ACN instruction. Will let you know what happens.
 
Well, highly embarrassing but I've almost got there. Forgot to change the mode of the 232 port from system to user. I've now got the correct values being displayed. Thanks for the ACN advice Doug. Works a treat. I've just got to get the device codes sorted out now, doesn't want to recognise the first letter after the circumflex.
 
Anyone know why the display is ignoring the ^ symbol? I need this to work in order to address the units and to control the layout of the messages. I've got everything else working now - Thanks for your help.

The display is a Uticor (AVG?) PMD1100 slave.
 
I think I've got round the problem by inputting the hex equivalent of the ^ symbol - \5E. The code can then be tagged on. Strangely, after the hex is typed into the ST file, it shows up in the data table as a ^ symbol - even though it won't accept it if typed directly?
 
Getting the characters enetered in the file is tricky. Can't remember exaclty how to do it, but there is a keyboard method to let you type some other character, then it shows up as ^. I think there's a help topic or knowledgebase note on this.


Another thing to check:

Look at the Ch0 settings at the Append and termination characters. I don't remember if there is an end of string character that follows AWT, but I think the termination character always follows an AWT or AWA, please check the Help file on these to be sure. That might be screwing things up and could explain why the display is so odd.

I had similar difficulty until I started using the concatenate functions to build the whole string, then used AWA and set the append characters to match what my Vorne display called for as an EOL character.

Good Luck!
Paul C
 
Thanks for that. Yeah, tried using the AWA ins to add the ^ character. There must be something in the SLC software that doesn't like it. Found ^ can be made by entering \5e instead. Got the display to clear using \0d carriage return. Went back to using AWT as I wasn't using the user append characters. I've got the display scrolling and clearing, think it might be better to send the control string once first to set up the display, then send the display string. Thanks for everyone's help, this site is a great resource.

Chris
 

Similar Topics

Hello, Thanks in advance. How can I send more than 82 characters using AWA or AWT? to Zepra Printer via serial Rs232 communication? Normally I...
Replies
1
Views
762
I am very new to programming PLCs, and one of the first tasks I received was to create a program that creates a socket connection between my PLC...
Replies
5
Views
2,538
I am new to programming in PLC, i have Allen Bradley SLC 5/03. I tried using AWT inst. with data in ST9:0 file directly but in 3 inst. getting...
Replies
4
Views
4,053
:wish:Hello I want to sent the commands attached from PLC to DMX Controller.When i00 command is sent it replies as shown as fig in hyperterminal...
Replies
2
Views
2,051
Can someone help me to find instruction which stores ASCII characters to String data type tag and Is it possible to convert an ASCII string to Hex...
Replies
5
Views
4,614
Back
Top Bottom