LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Attempting to use change detection with USB6525 as generated event

Solved!
Go to solution
9.7 i think (already left work at this point)

thx
0 Kudos
Message 11 of 20
(2,123 Views)

I'm still stuck swinging on this stinking problem-

 

this is the error- clearly stating that no IO line has been chosen to detect changes on...

 

 

and this is the code shot of the property node that clearly wires in MIO1/port1/line0 as the line to detect rising edges on...

 

 

This same exact code works on another computer with the same LV/MAX versions and a USB6525... I'm now going to try switching the USB6363 to the other computer...

 

-pat

0 Kudos
Message 12 of 20
(2,111 Views)
Solution
Accepted by plyons.gks

Try doing it this way:

 

ChangeDetection.png

 

 

Best Regards,

John Passiak
Message 13 of 20
(2,064 Views)

John-

 

thanks!, I was planning on posting up the solution after finally getting some help from a senior app engineer at NI (but im so busy I practically forgot about this post).  I also learned that the 6363 only allows for change detection on port 0 it seems...  

 

Thanks again

-pat

0 Kudos
Message 14 of 20
(2,055 Views)

You may configure non-buffered change detection on the other ports (like this):

 

nonBufferedChangeDetection.png

 

 

Best Regards,

John Passiak
Message 15 of 20
(2,051 Views)

nice!

 

thanks for the info!

 

what is the name of that vi you added there?

 

-pat

0 Kudos
Message 16 of 20
(2,047 Views)

DAQmx Configure Input Buffer.vi

 

 

Best Regards,

John Passiak
Message 17 of 20
(2,044 Views)

When running this sample, I get an error about not being able to unregister for events because a task is running. So I wire the error out from 'Clear Task' to the error in of 'Unregister...'. Now I get error 1, 'Input parameter is invalid'. I wired the 'Event Registration Refnum' wire through all of the cases, and still get error 1. How do I clean up properly?

 

0 Kudos
Message 18 of 20
(2,016 Views)

That is interesting...

 

Upon wiring the error cluster, I notice on my system that I do not receive the errors you are reporting whether I call unregister before or after stopping and clearing the task.  I am using LabVIEW 2011, DAQmx 9.7.5, and a USB-6251 (I happened to have this plugged in to my system).  I'll admit though that my use of the unregister without any error cluster was a bit lazy.

 

Error 1 is what you would get if you try to unregsiter an event which has already been unregistered--it sounds like perhaps the DAQmx Clear Task is unregistering the event for you, though I'm not positive and haven't heard of this before (what version of LabVIEW / DAQmx are you using?).  You didn't mention the other error code, but it sounds like the driver is telling you that the event can't be unregistered without first stopping the task (which is fair enough I suppose).

 

With this in mind, I would try calling unregister after stopping the task but before clearing it, something like this:

 

UnregisterFromEventsOrder.png

 

 

If this is indeed the way to explicitly unregister DAQmx events nowadays, then NI needs to update their shipping example:

https://decibel.ni.com/content/docs/DOC-25103

 

 

Best Regards,

John Passiak
Message 19 of 20
(2,007 Views)

This works. LV 2013 SP1, DAQmx 9.8.0.

 

Thanks and kudos 🙂

 

0 Kudos
Message 20 of 20
(2,002 Views)