LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

daq i/o front panel control problems

Hi All,
 
I've run in to a few problems with the DAQ I/O front panel control.  I generated this by right clicking the "custom scale name" input of the DAQmx Create Channel VI and selecting create control.
 
Issue number 1 is pretty straight forward.  I have 20 DAQmx scales created in MAX that this control is used to select from.  In MAX the scales are listed alphabetically but in this control they are listed randomly.  Any ideas on how to get them sorted correctly?
 
Issue number two is trickier.  When I open this control and choose to add a new scale via Browse/Create New, after completing the dialog and coming back with the new scale, a "Value Change" event is never asserted for the control.  This is a wrench because I use the value change event to save the new scale for my config/setup.
 
Any thoughts and ideas appreciated.
 
Cheers,
Greg Cole
“It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”
0 Kudos
Message 1 of 6
(2,790 Views)
Greg,
 
Thank you for contacting National Instruments!
 
First, the issue with the order of the scale names in the I/O control has been given to our R&D department.  They are evaluating the problem and determining a version of the DAQmx driver for the issue to be taken care of, if at all.
 
For the second problem with the event.  I reproduced this problem here.  I will also give this problem to our R&D department for a similar procedure.  In the mean time, I have developed a work-around for you that I would like for you to take a look at. I am attaching a VI to this post.  What I did was create a dummy string indicator, that can be hidden from the front panel.  I then put the DAQmx scale I/O into a shift register.  I compared the value from loop iteration to loop iteration to programmatically determine if they were different.  If they are, then I used the value-signaling property of the dummy string indicator to update the string.  I then fired the event off of the value change for the string indicator, instead of the I/O control itself.  I put some boolean logic to toggle the boolean to indicate that the event has fired.  Please take a look and let me know if you have any questions!
 
-Jeff P.
0 Kudos
Message 2 of 6
(2,778 Views)
Jeff,
 
Thanks for the feedback.  That solu does provide a workable answer.  Starting from that tho, I think I'm actually going to use the polling technique via the event structure timeout that you use to monitor the stop button.  I have my array of 128 channels (cluster data) and I'll do a compare every 1/4 sec or so to see if the value of the daq i/o front panel control matches that setting for the selected channel in my array.
 
Just a little more on that daq i/o control.  The non-event firing occurs when the 'browse' function is used.  I am confused as why browse is even there.  Clicking browse gets you the same list of scales plus the 'create new' option.  Why not stay with one box and make 'browse' into 'create new' ?  I don't see the benefit of clicking another button to get the same list of scales plus one more option.
 
Cheers,
 
Greg Cole
“It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”
0 Kudos
Message 3 of 6
(2,773 Views)
Greg,
 
The structure of the I/O control is the same for the channels, tasks, and scales.  The browse button is there because when you select channels, you can select multiple channels at once.  You would open up the browse feature and use the ctrl key to select multiple channels.  The "disadvantage" of the button goes to the advantage of using the same underlying structure and code.
 
-Jeff P.
0 Kudos
Message 4 of 6
(2,768 Views)

Ah, OK.  That makes sense.  I wasn't making the connection that the control worked across channels, scales and tasks.

Cheers,

Greg Cole
“It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”
0 Kudos
Message 5 of 6
(2,763 Views)
Greg,
 
I just wanted to give you a heads up.  DAQmx 8.1 was released last week.  This problem with the event structure does not occur in that version of DAQmx.  Just a thought if you decide that you want to keep it the way you have it.
 
-Jeff P.
0 Kudos
Message 6 of 6
(2,748 Views)