Crimson 3.1 - Strange Array Behaviour

I
I've got to get a life;).

No, this is gold for me, I've written a couple of programmes in Crimson over the years, but have always felt the code was messy and probably incorrect, my background is PLC.

The plant only runs 5 days a week (0 ==Sunday:nodi:)

So starting with seconds means it will only look at the next statement every minute instead of every tick? Aww man I've got a lot of code to correct!

Thanks for taking the time. :geek:
 
The plant only runs 5 days a week (0 ==Sunday:nodi:)


So there are a few choices

  • if (.Day>0 && .Day <6)
  • if (!(.Day<1 || .Day>5))
  • if (.Day%6)
  • if (MOD(.Day,6)>0)
I dunno about correct syntax; I suspect the first two are faster, but as the inner tests executing only seven times a week it will not matter. That said, the last two are just cute and so should be avoided.
 

Similar Topics

Hi, I'm having an issue in crimson 3.0 when I create a programme using a case statement referencing a fault word that each bit needs to change the...
Replies
1
Views
75
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
96
Has anyone found a way to convert/replace/update the firmware on old Parker TS80xx series HMIs (i.e. TS8010, TS8006, etc) to accept Crimson...
Replies
0
Views
86
Has anyone setup communications with Red Lion 3.0 MODBUS to Baker Hughes Centrilift GCS VFD? Thanks
Replies
0
Views
81
Hi, I have a complex database in Crimson 3.0 and in one of the display pages I am trying to get a tag to show the sum of several other tags. The...
Replies
3
Views
150
Back
Top Bottom