01-27-2011 09:57 AM
Hi all.
I am using LV 2010 and have just downloaded the latest DSC module.
What I want to do is send user-defined events between two processes. I've managed to get this to work using boolean shared variables as flags, and using the DSC "Request Value Change Notifications.vi" to create an event that detects changes to any of the shared variables. The only slight problem is that it seems you cannot have an event for each shared variable. Instead you have one event which detects changes to any shared variable registered. So, the application handling the events has to unpack the shared variable event from a variant structure and then use a case (such as switching on the variable name) to take action appropriate to that particular variable.
What I would like to know is:
Thanks,
Zola
01-27-2011 03:04 PM - edited 01-27-2011 03:08 PM
I have not tried this out but it may work.
I use these DSC user events to signal from a cRIO to a PC HMI so I suppose anything with an IP address should work.
02-02-2011 12:13 PM
Thank you for your response! I tried this and it compiles fine. But it brings up a different problem. I seem to be getting bogus shared variable change value events created. (I was also getting these before when I registered for changes to all of the shared variables in one event.)
This is obviously a known problem, See the LV example Toolkits and Modules\Datalogging and Supervisory Control\Fundamentals\DSC Event Structure Demo.lvproj. In DSC Events Demo.vi, the code checks to see if the variant value of the shared variable is NULL (see below).
Now that I'm catching each shared variable event individually , and casting to the appropriate type, I can't check for NULL values. I could use individual shared variable events with variant data, but this is not an optimal solution for me.
Is there any way to stop or filter out the bogus events?
Thanks again!