ML1200 String Command To LCD Module

caleno

Member
Join Date
Mar 2010
Location
NJ
Posts
36
Hi I am using an ML1200 to send and display data to an Matrix Orbital LCD (VK204-25) through the serial port. They are comm. fine except for one LCD command. The command is "Set cursor position" FE 47 [col][row]. This command has the col and row parameters and I do not know how to enter (format) the col and row numbers so the LCD understands which column and row I need to cursor on. Right now I am sending through AWA instruction ST17:3 = \FE\47\5\2, (set cursor pos at col 5, row 2, but nothing happens.
I have tried \FE\47\[5]\[2], \FE\47\FE5\FE2, \FE\47\^5\^2, with out success. Does anybody have any experience with these? I have contacted both AB and M. Orbital, but they can't figure it out...
Thank you in advance! :unsure:
 
Welcome to the Forum !

When you say "they are comm. fine", do you mean that commands other than the "Set Cursor Position" command work correctly ?

What are the differences between those commands and the "Set Cursor Position" command ?

My guess is that because the command bytes appear to be raw hex that the argument bytes are raw hex as well.

That means your ST17:3 = \FE\47\5\2 is the correct syntax inside RSLogix 500.

What Length are you using with the AWA command ? The string you describe is only 4 characters.

Remember also that the AWA command is "ASCII Write with Append"; it will send both of the Append characters defined in the RSLogix 500 Channel Configuration after each string.
 
Ken, thanks for replying to my post. Yes, other commands with out parameters such as 'Blinking Cursor' = FE 53 = \FES, or Underline cursor = FE 4A = \FEJ are working fine.
The only differencde between these commands and the set cursor position are the paramaters, Column and Row. FE 47 [col][row].
The AWA instruction is set to a length of 0. This means the whole string will be written.
Please find the attached print screen of the RSLogix files showing the contents of ST17:3. Ladder diagram will execute the AWA instruction every time I toggle a SW. on input I:0/3. Please let me know any ideas you may have. I have also attached a table of commands I am using from the LCD manufacturer. Thanks a lot!
 
Make sure you aren't accidentally putting spaces (hex 20) into the String when you change it by manually typing in bytes.

I would manually set the AWA instruction Length to the correct number of characters, rather than leaving it at zero.

Does the Matrix Orbital device require a termination character, like a space or a null or a carriage return ?
 
Ken, all I am doing at the string is this: \FES\5\2
I just found something interesting. If I enter \FES^E^B = it places the cursor at row 2 = B. E which is supposed to be col 5 is not doing anything. If I change to \FES^E^C = it places the cursor at row 3. So it seems like the last letter (A,B,C) are seen by the display as row numbers. I am trying to figure out the column letter or number...I hope you follow me. I will try changing the string length to the correct number of characters. I am not aware of the CR for the LCD. Please stay with me...
 
The SLC and MicroLogix controllers have a really weird syntax for non-printable characters in the String data type. It has evolved over the years, and has heritage in DOS software and ancient terminal emulators.

The backslash \ designates that the next two characters are a hexadecimal value. This is pretty straightforward.

Examples:

\00 null
\20 space
\0d carriage return
\41 Capital 'A'

The caret ^ designates that the next single character is a "control character". These are the first 32 characters of the ASCII code.

Examples:

^J line feed
^M carriage return

I'm not sure what happens when you use a caret and a character that doesn't correspond to any of the classic control characters, like you have done.

When you type "\FES^E^B", I suspect you are literally sending printable caret characters. That should be a 6-character string.

FE 53 5E 45 5E 42

The command you're supposed to need to set a cursor position is FE 47.

So why the cursor is going anywhere, when the display hasn't seen the "set cursor position" command doesn't make any sense to me.

There's a freeware serial terminal called RealTerm that I like to use to diagnose things like this, both data coming out of the PLC and data going from my computer to devices. It has a nice "send bytes" feature that can accommodate ASCII or hex.
 
I found the following on the Matrix website. It looks like the numbers for the location need to be a full byte. I'm assuming that means the ASCII character for the number. I would think \FEG52 would do the trick, but it looks like you've tried that in your original screen shot. I tried putting \FEG\35\32 (35 is the hex value for 5 and 32 for 2) into a string field in my RSLogix but it immediately converted to \FEG52.
I don't know if this adds anything to the discussion, but I'm following this one. I'll be curious to know how it all ends.
Capture.JPG
 
Ken, I am sorry it was a typo-error on my side. The Command is FEG^E^B. That places the cursor on Col 0, Row 2. I spent three days making phone calls and investigating a solution for this issue. After spending all this time without success, I will keep my current solution. Use FEG^E^B to disp. data on row 2 and FEG^E^C for row 3. Everything else is working fine, except for the col. locattion. Thanks for your help and will try some of your suggestions.
 

Similar Topics

Hey all! Long time reader, first time poster! I have an EA9-T7CL and an MicroLogix 1200 connected via DF1. I'm all good and got everything mostly...
Replies
3
Views
648
Hi every master,Recently i met a fault about 1762-L40BWA 1,When i get the PLC, The Fault light is lighting, I am not remember the fault message,I...
Replies
0
Views
716
Hello everybody and master,I met a problem about ML1200.It is described as below: 1,When i got this PLC,The FAULT light is lighting, My computer...
Replies
4
Views
1,102
I had planned to use PTO instructions to control a servo motor, single axis only. We have a ML1200 BWA model. According to the ML1200 manual...
Replies
7
Views
3,470
I am using Modbus to read 36 registers from a ML1200. 2 of those registers are suppose to be L11 data and 2 of the registers are F8 data. Long...
Replies
3
Views
1,373
Back
Top Bottom