03-09-2021 06:17 AM
Hello Together,
for my issue i was searching for an solution but didn't find one.
System: Labview 2015, Service Pack 1, Using a PCIe-6323
Sorry for not posting the Vi, it's a rather big one whereas only a small part is relevant:
I'm Using the QMH Example and expanded it quite much:
My Problem:
I've registered an Stop event if the stop button is pressed.
at the DAQ there is an emergency button, which shuts down some of the hardware.
I want to register this one as an event to switch to a specific handling, on which i can restart some of the hardware and do some resettings with user interaction:
But:
I'm not able to register this DAQ Input as an Event.
something like this does not work:
must of the examples register this one before the user event, which is not possible in my case, as I register the inputs in the consumer loop
how can i register an Event on an DAQ input, beside the Exit and button events in the consumer loop?
Thanks in Advance!
Solved! Go to Solution.
03-11-2021 04:34 AM
Hello Together
I've moved forward but I got stuck anyway:
I've moved the Initialisation of the Inputs into the "create User Event vi:
whereas I try to initialize an Dynamic Event for change detection:
BUT IT DON'T WORK
If I try use this one:
I get an Error
how can I use an Input of the DAQ Device for a dynamic event??
03-11-2021 05:43 AM
Please specify what error do you get when using the vi.
03-11-2021 10:08 AM
this one:
03-11-2021 10:10 AM
which means:
If I try to set the Buffer by property note to "0" the inputs don't work in the following procedures
03-11-2021 09:44 PM
Not completely sure what you want to do, but maybe can offer some advice.
It looks like you want to register for a "Change Detection" Event. This is when the digital line changes form Hi to Low or Low to Hi. You decoupled the registration from the loop which can work, but is harder to make sure it works correctly.
I suggest registering for the DAQ event in the loop where you use the DAQ. You can create a state where you register/unregister for the event as needed in your loop. When you are decouple, it's harder to do. See below.
mcduff
03-12-2021 12:20 AM
Hi mcduff,
thanks for your reply!
sorry for not explaining my issue in detail, I'm way to deep in my program to notice.
(and it looks like you've a newer Version of Labview than mine [2015])
in my device I have 16 inputs, from which I want to register a dynamic event of one; the emergency button. Beside I have 17 outputs, that's why I've implemented them in an VI
I'd like to have an event at changes of Input "Sirius"
If I try like this, I got the following error
any suggestions ?
03-12-2021 05:47 AM
Specifically focusing on the DAQmx error:
X-series boards like yours support hardware-clocking features such as change detection and buffering *only* on port 0. Apparently, your task contains at least 1 line from a different digital port.
You'll probably need to make a separate task solely dedicated to change detection on the emergency stop button while all the *other* DIO is in one or more software-timed tasks.
-Kevin P
03-16-2021 01:04 AM
Hi together,
thanks for the hint, I've implemented those as suggested!
Good News:
I can register those as events without getting an error,
Bad News:
It don't word. If I press one of the buttons I've registered as an Event, nothing happen.
Try to find the error in this point...
03-16-2021 04:45 AM
I think you *ARE* getting an error somewhere but not noticing it. Your attempt to create 2 or more "change detection" tasks on the same device *will* produce an error, though it may not occur until you attempt to start more than 1 of those tasks.
Odds are, this task error propagates in your code and prevents your "Generate User Event" call from functioning. Can't say for sure because your screenshot doesn't show that part of the code.
But definitely you'll need to put all the "change detection" DI lines into 1 common task. And when you service that task, you'll need to figure out which of the lines caused a change detection sample to happen.
-Kevin P