Populate MEM channel at first cycle
Jonas Bengtsson 3 years ago in IQANdesign • updated by Gustav Widén (System support) 3 years ago • 5
When having a MEM channel and a Activating condition that becomes true on the very first cycle it will not handle the Input Channels Value. Is this how it suppose to be? I'm extracting values from a LTC and want to populate the MEMs as soon as the application starts.
Customer support service by UserEcho
Does the LTC have a value before the MEM is activated?
The values in LTC are hardcoded at designtime. And yes, doing a step start of the simulation the LTC gives a value. I suspect that the MEM is triggering on positive flank and the previous state is unknown and therefore there is no transition in the Activating logic.
In a MEM channel using object list, the value is updated when the activating object group changes from False to True.
If you use Qcode on the MEM channel, you can get it to react on level instead. Qreplace and the other functions are all acting on level.
Understood but before the first cycle the value for the activating logic is unknown, supposedly in a safe state meaning False so there will be an transition from False to True right?
The Activating object group of the MEM must first be evaluated to False. If it evaluates to True the first cycle, it won't see a change from False to True.
Using an IDC that becomes true the second cycle as the condition for the MEM activating group is one way to solve it.
Another method is to use Qreplace.
Here is a small example to illustrate this, it doesn't do anything useful: MEM at startup.idsx