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 Feb 18, 2020 2:05 pm

All times are UTC+01:00

Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Dec 10, 2018 3:35 pm 

Joined: Tue Dec 04, 2018 11:35 am
Posts: 2
I have made an analog function block that will do the analog stuff. If it is possible i want to set and reset the function block with a digitial signal from a button. can anyone give me some advice on how to do this? I can't really find anything that will make me able to combine the digital and analog signals.

PostPosted: Mon Jul 29, 2019 2:35 pm 

Joined: Mon May 18, 2009 6:24 am
Posts: 11
I sugest to do it in FBD using SEL function block. It works like IF function. It has got 3 inputs and 1 output. First input is a trigger (your bool varable). When bool=FALSE, then output takes 2 input, when bool=TRUE, then output takes 3 input. So solution is like this. 1in=bool variable, 2in=var_in_out, 3in=your_analog_signal, out=var_in_out. It will work like a buffer.

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