Internet PLC Forum

General => Technical support => Topic started by: garysdickinson on December 18, 2011, 10:18:04 AM

Title: PAUSE Statement iTRiLOGI V6.43
Post by: garysdickinson on December 18, 2011, 10:18:04 AM
I was attempting to work on the CRC issue raised on the forum, and find that I am very confused about the TBASIC PAUSE statement.

I am attempting to use PAUSE as a debug tool.  I have the following custom function that is run on the first scan:


setlcd 1,1,"Program Started"
pause
setlcd 2,1,"Program Continued"


I expected to observe:

This is what I observed:

PAUSE seems to be interpreted as a special version of the TBASIC "Return" statement.

Is this the design intent of PAUSE?

Gary d

Title: Re:PAUSE Statement iTRiLOGI V6.43
Post by: support on December 19, 2011, 10:09:51 AM
PAUSE appears to work correctly as per your expectation on the PLC. But on the simulator it appears to quit the custom function after it has been released from PAUSE. I think it is a bug with the simulator which we will fix it in the next release of the software.
Title: Re:PAUSE Statement iTRiLOGI V6.43
Post by: garysdickinson on December 19, 2011, 12:53:43 PM
Thanks,

I was  using the simulator to debug a crc routine and was a bit worried about how TBASIC would handle bit-wise operations and the rshift /  lshift behavior.  

Gary d