Delay signal - Function blocks (Control Module)
Hi
I want to send a continuous signal into a block, however, this signal must be delayed. Is there any function block that allows me to do it?
Thanks
I want to send a continuous signal into a block, however, this signal must be delayed. Is there any function block that allows me to do it?
Thanks
Answers
What is the delay and what you scan time?
If the delay divided by the scan is not a very large number, you can create an array of size N = delay/scan, that will work as a queue, i.e. every scan you will push a new value into the array and shift all values by one position, so the oldest value will be the delayed value.
If the delay divided by the scan is not a very large number, you can create an array of size N = delay/scan, that will work as a queue, i.e. every scan you will push a new value into the array and shift all values by one position, so the oldest value will be the delayed value.
Its called a FIFO queue - First In, First Out. See the help file for how to build one.
A Timer, TimerElapsed and a GT (greater than) block could also work. Actually be easier to read/comprehend?
Hi , Also you could use move function from system then check enable , and in this pin you can connect specific logic condition , when the enable pin is false the value result is frozen and when enable pin is true the value change .
it is easier than create an user defined function block
I hope it could help
Regards
it is easier than create an user defined function block
I hope it could help
Regards
by ricardo.marrero.a Rank: 156 on 4/11/2019 3:53:28 PM | Like (0) | Report
You could create a specific function block and to put the value into this user defined function block , also you could disable it ( using specific condition) to freeze the value , then when the condition changes to false this condition could freeze tha value , also you could create a function block you could freeze the signal for example using as input to specific block( user defined function block) and disable it , it would freeze the signal and another condition would enable the block again allowing to send the value which it has changed
I hope it can help
Regards
by thomasvgas Rank: 3160 on 4/12/2019 6:20:51 AM | Like (0) | Report
I appreciate your help, I will try it.
Thanks
Add new comment