10-15-2008 09:33 AM
Problem Description :
Hardware: PXI-8184 (chassis PXI-1042), PXI-6221 (slot 2 in chassis)
Software: LV RT 8.5.1, DAQmx 8.7.1 (see MAX.jpg)
Problem: Task does not function within program (CounterRead.jpg). I can run the task within MAX (MAX.jpg) while the program is running and I can see the counts. All other tasks work fine. I have eliminated everything else in my
program except this task and it still doesn't function and I get no errors. Also tried putting the task directly in the main program to no avail. I've tried different types for the task (raw, Counter Dbl 1Samp, etc).
Thanks.
NI Software : LabVIEW Real-Time version 8.5.1
NI Hardware : PXI Controllers, Chassis, and MXI device PXI-8184
Driver Version : 8.7.1
OS : Windows XP
Solved! Go to Solution.
10-15-2008 09:47 AM
Did you try a counter example shipped with LV?
If you get the example to work you can then find your mistake more easily.
10-15-2008 09:49 AM
I see you are using a shift register to store the task. Are you certain it is being initialised properly?
Do you have an error message which would help diagnose the problem?
10-15-2008 10:02 AM
No error messages and yes, I'm sure it's being initialized correctly...I'm using the exact same structure for the other 3 tasks that work fine. I even eliminated the sub-vi, initialized in a frame before, etc. I'm scoped the hardware, so that is not an issue, which can be seen from the Counter.jpg. I did not write the initial code but I've debugged and understand how the program structure works. I'm still new to RT and find that debugging is not very simple.
The only thing I've seen in the forums close to this problem is using certain slots in the PXI. Almost ready to swap slots to see if the problem follows. Apparently this all worked awhile ago and works in several other PXI systems (I don't have anymore here now). Some changes were made, not pertaining to the counter...but I've taken everything else out to make sure that isn't causing the problem.
I know this is probably something simple, but another pair of eyes always helps! I do not have any other LV people here.
Thanks again!
10-15-2008 10:12 AM
So does the VI just not return a value?
Have you tried stepping through the program or used highlight execution and see what is happening?
Could be a hardware issue if there are no software errors (is it plugged in? 😛 )
10-15-2008 10:15 AM
I have stepped through (Counter.jpg) and I know the hardware is functioning (MAX.jpg). In the program, I see "0" all the time...in MAX I see it counting up.
Thanks.
10-15-2008 10:38 AM
The only reason I can think of as to why it would not work, is that you cannot share hardware between MAX and a LV application at the same time - I assume it has been tried in just LV with MAX closed.
Otherwise I cannot think of a sensible reason why it would work in MAX and not LabVIEW.
10-15-2008 11:13 AM
It was an initialization error! A default case would wipe out the task name...it's the same for the other subvi's for the other tasks so I don't follow that. But, it works now that I totally simplified the subvi. Two other people worked on this before me (newbees) so I have a lot of clean-up to do.
Thanks for all the responses and sorry it was something so simple. Took me awhile to get back in the swing of debugging RT stuff.
10-15-2008 11:17 AM