Red Lion Crimson

hoy7t

Member
Join Date
Mar 2012
Location
SC
Posts
83
Is their a way to reference a page or page properties in programs or expressions?
such as: =page.label
 
Can i use this in a text or data expression to display page label: page.label

Can i use 'page' as a variable? or should i use actual page name?

When i use any of the above I get the "cannot find an identifier ...would you like to create a tag ..." pop-up.

any breadcrumbs?

Thank you for the help.
GF
 
hoy7t said:
Can i use this in a text or data expression to display page label: page.label

Yes. I think you can use it anywhere that is expecting string data. But, use the equal sign in front of it, then the actual name of the page followed by a period and the 'label' or 'desc' identifier.

hoy7t said:
Can i use 'page' as a variable? or should i use actual page name?

I think it will have to be an actual page name.

What is your intended purpose?

EDIT: Play around with the attached example in the emulator and pick it apart to see if it helps you.
 
Last edited:
Awesome. very useful stuff.

Next:
I'm struggling to log an event when the data station powers up. Here is my method:
Increment a tag ('Startup') on power up. (page, global actions, 'on startup')
Enable alarm1 for 'Startup'. Event Mode = 'data mismatch'. Alarm value = last value of 'Startup'. Trigger = Edge triggered.

I never get an event.
However, if i increment 'Startup' while emulating, an event is logged.
Seems like a timing issue. solution?

thank you
GF
 
Awesome. very useful stuff.

Next:
I'm struggling to log an event when the data station powers up. Here is my method:
Increment a tag ('Startup') on power up. (page, global actions, 'on startup')
Enable alarm1 for 'Startup'. Event Mode = 'data mismatch'. Alarm value = last value of 'Startup'. Trigger = Edge triggered.


thank you
GF

Make your startup routine complex code, and add a sleep() command before you increment. ie...

Sleep (1000);
Startup++;

If you don't need a startup count, you could also make this a non-retentive flag tag (edge triggered event on). Set it to 1 after the Sleep().
 
This is an really very nice device.

Is there any more documentation, sample code, etc other than the red lion website? I've already checked there.

thank you
GF
 
I don't know of any sample code library. Depending on how comfortable you are with C style programming, I suggest that you look through the functions help PDF, to familiarize yourself with them. Also, the functions are shown in the systems tab (bottom right).

I've found, that with the small samples in the help file, and a little playing around in the emulator, that most of it is easy to learn. If you really get stuck, you can ask here, or call Red Lion. The key is to know what is available.
 
This is an really very nice device.

Is there any more documentation, sample code, etc other than the red lion website? I've already checked there.

thank you
GF

Do a search on this site. Several people have posted Code from projects they are working on.
 

Similar Topics

How do you install update on Red Lion Crimson ver 3.1. Do I just need to run the exe file on the host server?
Replies
1
Views
103
Hi, I am trying to increase the size of the user login pop up using a Red Lion CR1000 7” HMI with Crimson 3.1 software. The login pop up is very...
Replies
2
Views
664
Hello, We are currently running a bunch of g310's connected to their SLC5 PLCs through ethernet. I've attempted to upgrade the program from 2.0...
Replies
1
Views
1,110
Hi I have been using Red Lion products for some time, I had a thought over the bank holiday weekend, As you do. It would be nice if whenever a...
Replies
4
Views
1,012
Well, I have yet another question for the great minds on this forum! We have a red lion HMI for one of our machines and every time I hook my...
Replies
11
Views
1,660
Back
Top Bottom