Help - Search - Members - Calendar
Full Version: string on hmi
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
heron8888
I am having a problem correctly displaying the value of an asci string, st9:0 on a pv 550 terminal
have set the hmi to display st9:0/1
st9:0 holds the value of scanned barcode, 5 to 15 in length, when i scan a shorter barcode than the previous one the hmi shows the correct fist digits then shows numbers from the previous scan i have tried clearing st9:0 between scans but makes no difference any ideas why the hmi displays different to what i see with laptop at st9:0?
TWControls
If it is a SLC then use FLL source 0 destination ST:1, length 3. I am thinking I had a problem with a FLL instruction to a string on a Micrologix. What processor are you using
heron8888
QUOTE(TWControls @ Aug 10 2006, 11:06 AM) [snapback]38068[/snapback]
If it is a SLC then use FLL source 0 destination ST:1, length 3. I am thinking I had a problem with a FLL instruction to a string on a Micrologix. What processor are you using
it isa 5/03 i have tried the fll instruction when i view startus of st9:0 it has correct numbers and nothing else yet the panelview shows part of previous number
TWControls
Good. Can someone jog my brain? I'm pretty sure this method does not work on a Micrologix and it seems I had to do something else to clear the string in it. Anyone else every ran into this problem on the Micrologix or does it work?

panic mode
first byte in each string indicates string length. if this number is smaller than actual number of characters in the message, you might have found cause to your trouble. if this is not the case maybe size of display field is limiting number of characters (usually asterisk after last ok character). (trying to think of more...)
can you post screenshot of your string datatable (actual message) and formating of the display indicator?
TWControls
QUOTE(heron8888 @ Aug 10 2006, 01:52 PM) [snapback]38073[/snapback]
it is a 5/03 i have tried the fll instruction when i view startus of st9:0 it has correct numbers and nothing else yet the panelview shows part of previous number

Did you put the FLL length at 3? I misunderstood earlier and thought that it worked. This should work on an SLC I have done it before.

It is in the help file too

Quick fix though it is ugly. MOV 0 ST9:0.DATA[0]. Do this for all the elements that are at the problem area

Edit - Forget the fill length of 3. I had to fill multiple strings and you can fill a maximum of 3 strings with one fill instruction. But I'm almost positive I have used the FLL instruction to clear the string. I don't have an SLC to play with unfortunately
heron8888
QUOTE(panic mode @ Aug 10 2006, 05:56 PM) [snapback]38092[/snapback]
first byte in each string indicates string length. if this number is smaller than actual number of characters in the message, you might have found cause to your trouble. if this is not the case maybe size of display field is limiting number of characters (usually asterisk after last ok character). (trying to think of more...)
can you post screenshot of your string datatable (actual message) and formating of the display indicator?
when i scan a shorter barcode the string length would be shorter than that set in hmi,but surely hmi would not make up the gaps with previous characters?
TWControls
Actually yes it will if the barcode scanner isn't over writing all the values of the string. How are you getting the value in the barcode scanner to the string in the PLC. Mainly does the length of the string change as the barcode value changes. This is a good indication of whether if it is just copying ascii to the data of the string or if it is writing a string value. Or are you writing this string value with code?

Use the MOV instruction shown above as a quick fix
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.