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 Tue Dec 18, 2018 3:50 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Dec 03, 2015 1:53 pm 
Offline

Joined: Fri Nov 06, 2015 12:10 pm
Posts: 34
How can I call from a Main test script another (sub) script with parameters?
For example to use some values from the main script in the sub script.
I get message like:
"The expected value for SlowTask._ifbTest.iResult can't be converted to type int64, the expected value is iVarTestInput3."
OR
"Undefined script variable 'iVarTestInput3'"

The next software is used: Codesys V3.5 SP7 Patch 2 and Test Manager 4.0.1.1.


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Fri Dec 04, 2015 9:15 am 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 232
Hi Bakkertje.

I guess the first error message is from a command like CompareVariable from TestManager.Monitoring. You need use curly brackets around the script variable otherwise the variable name is interpreted as normal string.

For the second error message I see no obvious error in your parameters for the CALL.

BTW: You don't need to add a parameter for the global variable because the global variable is also available there. Only REMOTE CALLs don't support parameters and global variables but we already have an improvement in our bug tracking system for it.

BR
Martin

_________________
Check out the CODESYS store: http://store.codesys.com/

CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions


Top
   
PostPosted: Fri Dec 04, 2015 9:57 am 
Offline

Joined: Fri Nov 06, 2015 12:10 pm
Posts: 34
Hi Martin,

Thanks for your help. I see now that I can use Global parameters also in the sub script.
But how can I use an "Input Parameter" insite the SubScript? For example "iVarTestInput3"
I want to use it for a TestManager.Monitoring -> CompareVariable


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 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