icarus Posted September 5, 2006 Report Posted September 5, 2006 Hi, I'm new here. I have to write this application for work to monitor standstill times/reasons of three machines. So I've used the PCI-6518 16DI/16DO card to monitor if the machine is running or not (Input High=standstill, LOW=running). In the main VI I use an event case structure (value change) to log whenever the machine status changes. The digital IO workst just fine, but my problem is to use the event structure... To generate a 'value change' event I use Val(Sgnl) of a bool. When I run the VI, it automaticly generates a value change event, causing the whole thing to crash. It seems that this event is generated every time I run through the loop. In the attachement the part of my VI where DIO/event handling is done: Oh yeah I'm running LV 7.1 I really hope you guys can help me out. Thanks Quote
Jeff Plotzke Posted September 5, 2006 Report Posted September 5, 2006 Yes, every time you write to the Value (Sgnl) property, you'll fire the event structure, regardless of if the value actually changed. To keep the same architecture as you have now, you'll want to compare the old value (within the boolean control) to the DAQ value, and only change the boolean control on a change. I've posted an example for you. ~Jeff Quote
icarus Posted September 5, 2006 Author Report Posted September 5, 2006 Hey, thanks a mille. I'll go and try that right away :thumbup: Quote
icarus Posted September 7, 2006 Author Report Posted September 7, 2006 Yess, worked like a charm. Thank you. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.