Hiya -
I've got a mitsi plc and I'm using a redlion graphite to display some values and enter data etc..
I have been trying to use the complex editor tool to display some text based information based on the value of a register in the plc. The intention is to have some descriptive information to tell the operator what the machine should be doing at a certain step of the sequence.
I've made a tag and linked it to a D register in the plc, and I have called the tag in this instance "MAIN_SEQUENCE"
Here is the code I have tried; My idea was that if the register has a value of 0 I would display on the redlion screen "step 1". If the register has a value of 5 then the redlion would display "step 2" and so on etc...
What appears to happen is with a register value of 0 the correct text is displayed, however at all other register values I seem to have all the text displayed at once.
Any help would be obliged,
if (MAIN_SEQUENCE == 0)
return "STEP 1";
else { if (MAIN_SEQUENCE==5)
return "STEP 2";
if (MAIN_SEQUENCE==10)
return "STEP 3";
if (MAIN_SEQUENCE==15)
return "STEP 4";
if (MAIN_SEQUENCE==20)
return "STEP 5";
if (MAIN_SEQUENCE==25)
return "STEP 6";
I've got a mitsi plc and I'm using a redlion graphite to display some values and enter data etc..
I have been trying to use the complex editor tool to display some text based information based on the value of a register in the plc. The intention is to have some descriptive information to tell the operator what the machine should be doing at a certain step of the sequence.
I've made a tag and linked it to a D register in the plc, and I have called the tag in this instance "MAIN_SEQUENCE"
Here is the code I have tried; My idea was that if the register has a value of 0 I would display on the redlion screen "step 1". If the register has a value of 5 then the redlion would display "step 2" and so on etc...
What appears to happen is with a register value of 0 the correct text is displayed, however at all other register values I seem to have all the text displayed at once.
Any help would be obliged,
if (MAIN_SEQUENCE == 0)
return "STEP 1";
else { if (MAIN_SEQUENCE==5)
return "STEP 2";
if (MAIN_SEQUENCE==10)
return "STEP 3";
if (MAIN_SEQUENCE==15)
return "STEP 4";
if (MAIN_SEQUENCE==20)
return "STEP 5";
if (MAIN_SEQUENCE==25)
return "STEP 6";