String Display

How do I display this string on my HMI?

1760125109652.png

My goal is to display the 04C6NZC21E90. The '$' character is messing up the string display though.

I am using Factory talk view studio.
 
The dollar-sign character is used by RSLogix to indicate to a user that a SINT contains a non-ASCII / non-printable character.

Your string apparently has a mix of binary and ASCII information (five non-printable characters and two printable ones), and it sounds like you want to convert each of the non-alphanumeric ASCII bytes into two printable alphanumeric characters.

The ControlLogix has built-in instructions to convert a string that contains only numeric ASCII characters to a DINT or a REAL, or vice-versa.

But that's not what you need: you want to convert each byte into two ASCII characters, except when the byte represents a printable ASCII numeric (0-9) or alphabetic (A-Z) character.

Are the printable characters always at the same position ? Are there ever numeric characters (0-9) ?

>FactoryTalk View Studio

There isn't a display type mechanism to display all-hex from a string in FTView Studio, nor an easy way to customize the string display the way you wish. I can't even think of a way to do this with an expression in FTView: I think it will have to be done in the controller.
 
I got thinking about the challenge and couldn't focus on my real job, so here's an example of how I would accomplish what I think you're asking for.

This is all Controller-scope tags and ladder-logic subroutines in the main project (and done in RSLogix 5000 v20, so it should be openable in any modern version), but you could do this in structured text, with a UDT for the internal tags, or even as an AOI if you wanted to.
 

Attachments

  • Hex_to_String_Special.zip
    2.7 KB · Views: 9
It looks like the 04 surrounded by [imath]is like a header i.e. could be address or some info char of the sending equipment & the 90 could be some sort of checksum or other termination chars, I would of thought that C6NZC21E is the actual data string in other words strip the ends of the total string, however, without knowing what the instrument is that is sending the data it is only a guess. If those other chars are required then just strip the[/imath] & rebuild the string.
It would help to know what is sending the packet of data information is the key to proper relevant replies.
 

Similar Topics

Hello, I am working with EOTE 4.0 and HMI Magelis Harmony ST6500 I want to display a string value inside a object Parts/String Display from...
0
Replies
393
Views
Hey all! I'm trying to display a string from my Compact GuardLogix 5380 PLC onto a Weintek CMT-FDHX-820 Hardware. I tried selecting the ASCII...
4
Replies
1,328
Views
So, here's my issue... A previous technician set up the Red Lion, so I am attempting to alter his work. The Red Lion is set up to display...
1
Replies
357
Views
Alright yall, I'm over my head trying to get the HMI project going. It's a simple badge access login panel to enable some contactors for different...
2
Replies
943
Views
Hello, I have to stop using the TimeDateDisplay object in FactoryTalk ME because the PanelView is randomly losing its time (Window CE). So I...
4
Replies
1,052
Views
Top