Internet PLC Forum

General => Technical support => Topic started by: sparks32 on October 25, 2010, 06:18:21 PM

Title: I'm getting an Syntax error
Post by: sparks32 on October 25, 2010, 06:18:21 PM
I was wondering if anyone knows what is the matter with my tbasic line. i have an input named enter and a relay named run2.
i keep getting a Syntax error when i enter this line in the custom function.
if testio(enter)= 1 then setio(run2) endif
my relay 2 label is definately written as run2 all lowercase with no spaces or underscores.
if i replace the line with
if testio(enter)= 1 then a=b endif
no error shows up  ???
i tried entering a coil into ladder just to see if that might be the problem but that didn't work
Title: Re:I'm getting an Syntax error
Post by: support on October 25, 2010, 09:41:28 PM
if testio(enter)= 1 then setio run2 : endif

SETIO is a statement, not a function so you do not enclose the I/o label within the parenthesis.
Title: Re:I'm getting an Syntax error
Post by: sparks32 on October 25, 2010, 10:00:02 PM
the answer was so simple, thanks