CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Tue Oct 17, 2017 2:40 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Jun 21, 2016 10:44 am 
Offline

Joined: Thu Jun 09, 2016 12:06 pm
Posts: 3
Hi,
I'm programming a quadricopter and in the visualization windows I insert the position I need to reach.
This values are assigned to some specific variables which are used in the FB.
How can I dinamically assigned those to some other in the FB?
I need to do that because the other variables are also used in the Plant.
Thanks.


Top
   
PostPosted: Wed Jun 22, 2016 11:27 am 
Offline
Frequent User
Frequent User

Joined: Thu Jun 14, 2007 9:49 am
Posts: 978
a locally defined var is in every instance of a function block has another name. maybe you will need to use a in/out var.
btw this question belongs in V3 .
I also hope codesys is fast enough to control your copter as a PLC tends to be too slow for these type of fast operating things.

_________________
shooter@home.nl
computer shooter
paul deelen
jacob van wassenaerstraat 29
NL 5224 GG 's-Hertogenbosch
skype shooter paul.deelen
phone +31736139136


Top
   
PostPosted: Tue Jun 28, 2016 3:22 pm 
Offline

Joined: Thu Jun 09, 2016 12:06 pm
Posts: 3
Hi, there's my problem.
I need to dinamically modify the inputs of a FB by using values which are given as input in a visualization window.
Then I need to assing those values to another variables that are the outputs of the same FB.
There's a way to do that?


Top
   
PostPosted: Tue Jun 28, 2016 7:22 pm 
Offline
Frequent User
Frequent User

Joined: Thu Jun 14, 2007 9:49 am
Posts: 978
in a function block there are inputs outputs and in/outputs possible.
that way you can keep setting values or integrator from the out back to the in.

please give sample project as export file and what do you need. as i am not sure what the question is.

_________________
shooter@home.nl
computer shooter
paul deelen
jacob van wassenaerstraat 29
NL 5224 GG 's-Hertogenbosch
skype shooter paul.deelen
phone +31736139136


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 5 guests


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