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

Hey guys, hoping someone here could give me a little advice. I'm working with a CR1000-04000 in Crimson 3.1 and I was interested in adding the...
Replies
4
Views
93
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
81
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
102
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
87
Has anyone setup communications with Red Lion 3.0 MODBUS to Baker Hughes Centrilift GCS VFD? Thanks
Replies
0
Views
86
Back
Top Bottom