Author Topic: PAUSE Statement iTRiLOGI V6.43  (Read 11876 times)

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
PAUSE Statement iTRiLOGI V6.43
« 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:
  • "Program Started" message on the LCD
  • "Pause Executed in Fn #1" window
  • Click on PAUSE menu button to continue
  • "Program Continued"  message on the LCD

This is what I observed:
  • "Program Started" message on the LCD
  • "Pause Executed in Fn #1" window
  • Click on PAUSE menu button to continue
  • Simulation continues on next rung of ladder logic

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

Is this the design intent of PAUSE?

Gary d


support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:PAUSE Statement iTRiLOGI V6.43
« Reply #1 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.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:PAUSE Statement iTRiLOGI V6.43
« Reply #2 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