Jump to content

Use digital IO for firing 'value change' events


icarus

Recommended Posts

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

post-6063-1157466613.jpg?width=400

Link to comment

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

post-4078-1157471213.jpeg?width=400

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.