Crimson3.1 -GotoPage construct

jacquesp

Member
Join Date
Mar 2023
Location
Bridlington
Posts
5
Hi

Crimson3.1 uses the GotoPage() to navigate to pages and the argument has to be a Display Page

example: GotoPage(Page1);

However since the argument is not a string it is not possible to construct the page name and pass it into the function?

Pagename := "Page" + "1";
GotoPage(Pagename);

Is there a way around this, that will allow the construction of the Page name?
 
No way round this, only work arounds. Don't know why this isn't easier, one of the things that bugs me about Crimson.
Code:
// auto move between screens

if (PLC1.DB4_CurrentVals.ExpectedScreen == 5 & PLC1.DB4_CurrentVals.CurrentScreen != 5 ) GotoPage(StandardScreens.S0005_OpInstr1);

if (PLC1.DB4_CurrentVals.ExpectedScreen == 6 & PLC1.DB4_CurrentVals.CurrentScreen != 6 ) GotoPage(StandardScreens.S0006_OpInstr2);

if (PLC1.DB4_CurrentVals.ExpectedScreen == 7 & PLC1.DB4_CurrentVals.CurrentScreen != 7 ) GotoPage(StandardScreens.S0007_OpInstr3);

if (PLC1.DB4_CurrentVals.ExpectedScreen == 8 & PLC1.DB4_CurrentVals.CurrentScreen != 8 ) GotoPage(StandardScreens.S0008_ProcessComplete);
I use something like this, and then call it on tick from the screens where I want auto change. Otherwise I use the Triggers on Tags and use those to move between screen.
So for the way you are working, you can pass the name of the page to a Function, but you have to have a separate 'If' line for each page you want to call.
 
Last edited:

Similar Topics

Is it possible to calculate the time difference between two timestamps in Redlion crimson 3.1? Thank you,
Replies
2
Views
1,406
Hello, I am still learning crimson 3.1 programming and I need help on mapping the flag datatag to digital output expansion module. I am using a...
Replies
2
Views
1,575
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,604
How to change Daylight saving time ON/OFF automatically in Crimson3.0&3.1/Redlion HMI How to change Daylight saving time ON/OFF automatically in...
Replies
5
Views
2,177
When I build something involving a PLC, I always like to make a paper printout. To save in a little booklet. When creating an HMI program In...
Replies
1
Views
2,040
Back
Top Bottom