Legacy Hardware and Apps
Two syntax questions

Hi,

I've been trying to write a little program, and am sure there are better ways of doing the following.

Firstly, I'm trying to simulate an IF THEN ELSE clause, and following (kinda) the manual, I have:

RB1+E 
'triggering on digital input 
IF(1CV><0,2){[GA 2CV(W)=3]} 
IF(1CV><2,4){[HA 2CV(W)=1]} 
1CV(W)=2CV

This now works, but is ugly and offends my sense of programming aesthetics. I'm sure this can be simpler but figure it out.

Secondly, I'm trying to have a DSO activated, one time only, 5 seconds after the input trigger, so as you can see above I start schedule A, which is defined as:

RA5S 2DSO(0,R)=0 DO{[HA]}

This seems to work, but I'm wondering if there is a better way arranging the delayed input/output triggering.

Thanks for any help!
Chris

PS: How do you make a plus sign show up?? That schedule is RB1[plus]E.

Hi, I&#039;ve been trying to write a little program, and am sure there are better ways of doing the following. Firstly, I&#039;m trying to simulate an IF THEN ELSE clause, and following (kinda) the manual, I have: ```` RB1+E &#039;triggering on digital input IF(1CV&gt;&lt;0,2){[GA 2CV(W)=3]} IF(1CV&gt;&lt;2,4){[HA 2CV(W)=1]} 1CV(W)=2CV ```` This now works, but is ugly and offends my sense of programming aesthetics. I&#039;m sure this can be simpler but figure it out. Secondly, I&#039;m trying to have a DSO activated, one time only, 5 seconds after the input trigger, so as you can see above I start schedule A, which is defined as: ```` RA5S 2DSO(0,R)=0 DO{[HA]} ```` This seems to work, but I&#039;m wondering if there is a better way arranging the delayed input/output triggering. Thanks for any help! Chris PS: How do you make a plus sign show up?? That schedule is RB1[plus]E.

Good morning Chris,

  1. If..then..else

    That will work, you could also do:
    RA1S
    ALARM1(1CV>0.5/5S)1DSO
    RB1E 'If digital input 1 changes state
    IF(1DS>0.5){[GA 1CV=1]} 'If high run schedule A
    IF(1DS<0.5){[HA]} 'If low halt schedule A

  2. The P.S.
    If you are using DeLogger4 than select "Trigger on a rising edge"

Cheers,
Roger

Good morning Chris, 1. If..then..else That will work, you could also do: RA1S ALARM1(1CV&gt;0.5/5S)1DSO RB1E &#039;If digital input 1 changes state IF(1DS&gt;0.5){[GA 1CV=1]} &#039;If high run schedule A IF(1DS&lt;0.5){[HA]} &#039;If low halt schedule A 2. The P.S. If you are using DeLogger4 than select &quot;Trigger on a rising edge&quot; Cheers, Roger
14
1
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft