G304K2 - Embedded Value in Multi-State Text...

Eric Nelson

Lifetime Supporting Member + Moderator
Join Date
Apr 2002
Location
Randolph, NJ
Posts
4,346
I have a numeric tag that I use to display various messages (using Multi-State). In one of the messages, I would like to embed the value of a numeric tag, surrounded with some text. Basically this:

"Current Machine Speed is Machine_Speed RPM"

The highlighted part is the numeric tag I want to embed. When I try to drag the tag into the 'Format State' box, I get a "This expression must be a string" popup.

Even if I make Machine_Speed a string tag, I still don't know how to embed it along with other fixed text. I can display the string, but ONLY the string. Is embedding possible?... :confused:

I could just overlay the numeric value on top of my message, and only make it visible when that message is called, but I'm sure one of our resident Crimson gurus has a better solution... :D

šŸ»

-Eric
 
try astext(machine_speed) or machine_speed.astext Since this will now be an expression, you will need an "=" preceding the statement. Also, I'm not sure that this will work, as a tag based multi-state, you will need to try it. You may need to work in the object itself.

If "astext" does not produce the desired results, look into dectotext and the other numeric to string conversions in the reference.
 
I tried it, it will work in the Multi-tag format in the tag setup.

Your expression will look something like this.

="Current Machine Speed is " + astext(Machine_Speed) + " RPM"
 
Your expression will look something like this.

="Current Machine Speed is " + astext(Machine_Speed) + " RPM"
I did discover the AsText() last night, but forgot I can put quotation marks around the fixed text... šŸ™ƒ

Thanks!... :site:

šŸ»

-Eric
 
Sometimes your have to manually type in any complex objects in the field as Brijm shows. Once you have a valid = "Something" you can get slick and highlight and doubleclick the resource pane to "build an expression", but only simple references drag and drop.

I think Machine_Speed.AsText is also a valid string reference to the tag.
 

Similar Topics

I have dozens of Red Lion G304K2- RED LION KADET HMIs. I think that they are great! I have always programmed them with Crimson 3.0 software...
Replies
4
Views
1,612
Hi all, I'm having programs connecting to a G304K2 over Ethernet to transfer the screens. I know on the older models, you first had to do a...
Replies
3
Views
3,316
Hi all I am trying to upload a database to a brand new one of these, using latest crimson 3 software.. this is the first time i've used one of...
Replies
2
Views
3,115
Hi guys, I have several Red Lion Kadet G304K and G304K2 terminals in service, and one particular client has now returned two of them with smashed...
Replies
0
Views
2,950
HMI: Red Lion G304K2 PLC: 1769-L30ERM What is the best way to re-establish communications? Everything seems to be working fine, but if I...
Replies
6
Views
2,142
Back
Top Bottom