07-27-2015 09:01 AM
I am using a NI x series 6343 andcounting pulses, but when i try to stop the counter with a boolean operator nothing happens, ihave to go and use abort execution,
Help
07-27-2015 09:04 AM
Is showing your code an option?
My telepathic skills are not good on Mondays...
Blog for (mostly LabVIEW) programmers: Tips And Tricks
07-27-2015 09:05 AM
here it is hope it helps
07-27-2015 09:24 AM
I have to say that your code is well commented.
I'm not sure what your issue is, though. I see nothing that is attempting to stop the task you started. Are you expecting it to stop by itself?
If so, then you shouldn't. Most tasks require an explicit CLEAR TASK to make them stop.
I'm not an expert on the EXPRESS VIs, perhaps someone else can have a more informed opinion.
How is it that you know it's not stopping?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
07-27-2015 09:29 AM
You're also using two loops and two DAQ Assistants, Do you have two cards?
If not, then you're trying to use two tasks to read one card, and one of them is going to have an error.
(Unless there's some magic in this EXPRESS assistant that I don't know about.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
07-27-2015 09:32 AM
the problem is that when i run the vi the the upper loop does not stop with the boolean stop operator in thw while loop, the button just basically does not do anything, i tried a couple of things to stop it, but at the end the only way to stop it is using the abort execution button
07-27-2015 10:12 AM - edited 07-27-2015 10:12 AM
the upper loop does not stop
--- Then why did you say that the trouble was you couldn't stop the counter?
You have to realize we can't see your situation unless you tell us accurately. Instead it's all the way in post #6 when you disclose the real problem.
Again, are you using two cards?
Why are you using two loops?
What does the error output of the DAQ ASSISTANTS tell you?
Since you don't have an indicator, I suspect that you haven't looked.
There might be a clue there.
I suspect you are trying to use two ASSISTANTS on one card, and one of them is complaining, because the other one is using the card.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
07-27-2015 10:18 AM
we are using one DAQ card, i decided to use two loops to make sure that part would not have the same problem as the other one, there is no error message it is just that when i hit stop on user interface it does not do anything, this just happen when rollers are not moving, basically when it is not getting a signals, this is not a problem with the second DAQ assistant, this problem seems to be somehow connected to counters as i can make everything else stop in a while loop, just counters behave differently.
07-27-2015 10:32 AM
this just happen when rollers are not moving,
That wasn't important enough to say earlier?
I'm unable to look at the setup of your tasks, as I don't have NI-DAQ on the VM that has LV 2014 on it, but here's my guess:
If you have the task set up to count TIME BETWEEN PULSES (as opposed to pulses per unit time), then it's waiting for a pulse, and if your source isn't rolling, then the pulse never comes. The timeout should take care of things, but you don't have a timeout on the lower loop.
I don't recall what the default is.
Did you actually put an indicator on the ERROR OUT terminal of BOTH assistants?
It's still possible that the two loops are vying for control of one card. I would get rid of one loop altogether until you get the other one working perfectly.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
07-27-2015 01:45 PM
i tried using just that one loop, the same problem remains, the stop sign does not do anything, it just stops after the timeout.