baghuan
Member
I am trying to use the scripting functions in a Honeywell Multitrend SX to set digital outputs based on digital input status. Scripting is enabled, and I have managed to set other parameters using conditional logic but the DO is escaping me.
Pseudocode would be:
If DI 1 is off and DI 2 is off and DI 3 is off then turn DO 19 on.
My actual code is:
IF ((DI[1]==0) && (DI[2]==0) && (DI[3]==0))
{
SETD[19,1];
RETURN A30;
}
ELSE
{
SETD[19,0];
RETURN A30;
}
I have managed to use the SETD command outside of an IF statement, but only using parentheses, (). I have tried parentheses withing the IF statement and it rejects the format as invalid. I have also managed to assign values to pens from within an IF statement that contains my SETD command, so I know I am within the IF loop, but the SETD just does not happen. It's almost like the SETD command has a different syntax or some other parameter I am missing. Any thoughts? Are there any resources beyond the Honeywell manual for learning how to program this thing?
Thanks.
Pseudocode would be:
If DI 1 is off and DI 2 is off and DI 3 is off then turn DO 19 on.
My actual code is:
IF ((DI[1]==0) && (DI[2]==0) && (DI[3]==0))
{
SETD[19,1];
RETURN A30;
}
ELSE
{
SETD[19,0];
RETURN A30;
}
I have managed to use the SETD command outside of an IF statement, but only using parentheses, (). I have tried parentheses withing the IF statement and it rejects the format as invalid. I have also managed to assign values to pens from within an IF statement that contains my SETD command, so I know I am within the IF loop, but the SETD just does not happen. It's almost like the SETD command has a different syntax or some other parameter I am missing. Any thoughts? Are there any resources beyond the Honeywell manual for learning how to program this thing?
Thanks.
Last edited: