CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Sun Dec 16, 2018 6:20 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: catch codesys exception
PostPosted: Wed Jun 06, 2018 9:18 am 
Offline

Joined: Mon Mar 27, 2017 1:31 pm
Posts: 18
Hello,

i want to catch the following exception:

Code:
Error: Ausführen des Skripts '.\test.py' erzeugt Ausnahmefehler _3S.CoDeSys.Core.Online.InvalidVarRefException: Traceback (most recent call last):
  File "C:\Tmp\test.py", line 87, in <module>
Exception: Ungültiger Ausdruck


this code dont work:
Code:
try:
    testInt = onlineapp.read_value("PLC_PRG.testInt") # testInt dont exists!

except _3S.CoDeSys.Core.Online.InvalidVarRefException:
    print("Variable not found")


Error:
Code:
Error: Ausführen des Skripts '.\test.py' erzeugt Ausnahmefehler IronPython.Runtime.UnboundNameException: Traceback (most recent call last):
  File "Tmp\test.py", line 87, in <module>
NameError: name '_3S' is not defined


Regards,
adv


Top
   
PostPosted: Thu Jun 07, 2018 1:02 pm 
Offline

Joined: Mon Mar 27, 2017 1:31 pm
Posts: 18
nobody?!?

3S user should know this :D


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited