Red Lion: Have tag display number AND string?

ABnewb

Member
Join Date
Sep 2016
Location
VA
Posts
25
I'm trying to set up a Red Lion display where the operator can enter a batch number on the screen. However, the batch number will contain a series of letters and intermixed numbers.

What is the most efficient method to achieve this?
 
I'm trying to set up a Red Lion display where the operator can enter a batch number on the screen. However, the batch number will contain a series of letters and intermixed numbers.

What is the most efficient method to achieve this?

Your variable will need to be a String type. I'm not sure about Red Lion specifics, but I'm pretty sure that will be possible.

Is this batch identifier (let's not call it a number, because it's no longer a number if there are characters in it) being written to a PLC? If so, does the PLC support string data types?
 
The Red Lion 'C-like' programming language gives you a pretty good environment for parsing the Batch Code, if you need to pull out important values or check it for validity inside the HMI before sending it to the PLC.

Can you post an example of the batch code you need to enter, and describe what values you need to extract from it ?
 
The batch identifier isn't being sent to a PLC, it's just being stored in the Red Lion control to hold basic product identifiers, such as container weights. A typical batch number can be anywhere from 5-12 characters long and can have any number of string/number combinations.

I can use a string tag, but I would always need to surround the entry with double quotations, and I know that I can't rely on the operators to remember that. If I try to enter an integer without surrounding it in quotes, it throws an error.
 
The batch identifier isn't being sent to a PLC, it's just being stored in the Red Lion control to hold basic product identifiers, such as container weights.

This is good. String tags are easier to handle in the HMI.

A typical batch number can be anywhere from 5-12 characters long and can have any number of string/number combinations.

I can use a string tag, but I would always need to surround the entry with double quotations, and I know that I can't rely on the operators to remember that. If I try to enter an integer without surrounding it in quotes, it throws an error.

I have never encountered this when using a cstring tag type. You will have to give use more detail to understand what you are doing. If possible, zip and attach you crimson file.
 
I can use a string tag, but I would always need to surround the entry with double quotations, and I know that I can't rely on the operators to remember that. If I try to enter an integer without surrounding it in quotes, it throws an error.
The operator won't have to enter double quotes, it is just when you are programming that you get that error. When you define a tag as a string then anything entered in that box in runtime is treated as a string.
 

Similar Topics

I have a Red Lion G09 scanning 8 Invertek P2 VFDs via modbus RTU - I've setup necessary comms and tags and all works well. I have a 'Settings'...
Replies
3
Views
1,862
I could use some help programming a red lion HMI. What I am looking to do is have page where a set up guy can insert 10 parameters that would be...
Replies
7
Views
2,352
In the Communications > Network > Protocol 1 - AB Tag Names > PLC10 configuration page there is a Tag Names section (not the same as the separate...
Replies
4
Views
2,478
Hi. I have a tag and I have assigned that tag to the bevel button. When that button is pressed, I want it to display Start and when it's not...
Replies
5
Views
2,666
I'm getting a error about mapping a bit to a numeric tag and it should be using a flag tag but I am. They even have the little flag icons. ???
Replies
13
Views
4,181
Back
Top Bottom