11-21-2011 03:56 AM
Hello,
I created an alarm that monitors a calculated channel. The alarms upper limit is 5. There is no lower limit. If the alarm is triggered a procedure is called that sets a flag. This works fine. But if I deploy the project the flag is already set when the workspace opens, although the condition ist not yet reached. It seems like the procedure is called at startup. This is not my startup procedure. In my startup procedure the flag is reset to 0.
I've read: Procedures running unexpectedly
and my startup procedure now has an end step but the situation has not changed.
I use VS 2011.
Frank
Solved! Go to Solution.
11-21-2011 03:28 PM
Hi frankkremer,
I'm unable to reproduce this behavior after following your description. Attached is what I've created to attempt in reproducing the issue. I have the following questions:
- Does the issue reproduce on your end using the attached setup?
- Are you deploying to the localhost PC or an RT target? If to RT, does the issue happen on the PC host?
- If the issue does not reproduce with the attached setup, may I get a copy of your setup to further investigate the issue?
11-22-2011 09:03 AM
Your setup works fine, I use a PC host.
I started to strip down my setup in order to sent it to you when it suddenly worked. The problem is connected to my calculated channel.
This is the Formula: abs([Variable 0] - [Variable 1]) Variable 0 is from a simulation model and variable 1 is a user channel.
It seems to me like a timing problem of some kind (model not ready or false init value).
My solution is to set the initial state of the alarm to disabled and wait for a few before I enable it in my startup-routine. For now it works.
Thank you for your help!