LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Select Physical Channels From Front Panel

Solved!
Go to solution
Solution
Accepted by topic author Wolleee

I can understand trying to code around your users.  And sometimes the NI way of doing things isn't intuitive to the user.  When that happens you can spend more time coding up a bullet proof UI then what the code does.  Attached is yet another way for having the user select multiple channels.  This time from an array of clusters.

 

Run the VI select the analog input channels you want and click okay.  It will make the physical channels that were selected to be able to be read.  I have a disable diagram showing what it could do.

 

If you can post a VI that may help but I highly recommend not using DAQ Assistant.  It works for very simple things but as soon as you have an issue or want to expand, basically throw it away and use the low level DAQmx VIs.

Message 11 of 33
(1,329 Views)

I will give this a try.  Thank you for your input.  If i cant figure it out i will post the vi.  Most of it stuff ive figured out, this portion is really stumping me and it may be that i am trying to use the daq assistant, I figured it would easier.

Thank you



-Matt
0 Kudos
Message 12 of 33
(1,322 Views)

Works Great for what im trying to do.. thank you



-Matt
0 Kudos
Message 13 of 33
(1,313 Views)

Hooovahh,

 

A few  final questions for you and i think my code is complete.

 

Say i knew the name of the device and instead of using the initial device names, I wanted to wire the actual device name.  How could I do that?

 

Secondly, If i wire only that device, would the system buttons only display the buttons for that device?

 

Thank you



-Matt
0 Kudos
Message 14 of 33
(1,300 Views)
So you know the code that gets all devices on the system, and the there is a for loop and it gets all AI for all devices. Well remove the for loop and wire a constant of the device you want. You can do the same thing with the DAQmx control by selecting I/O filter and limit the device.
0 Kudos
Message 15 of 33
(1,289 Views)

hooovahh,

 

your code is awesome, but when i run it, it pretty much lags down the whole system, i am unable to scroll on the front panel.  Also when i run it right out the gate from the .exe the available channels are not populated, the check boxes are still available, but it doesnt show the channel names?



-Matt
0 Kudos
Message 16 of 33
(1,273 Views)

Hooovahh,

 

I was able to figure out why the channels were not appearing. That was an error in my code, but do you expect that i would be unable to scroll anywhere on the front panel?



-Matt
0 Kudos
Message 17 of 33
(1,268 Views)

The code I posted should not lag down your whole system.  The only way it would is if you have many many devcies, all with many many channels.  I mean in my mind you would need something like 100 devices and 100 channels on each device to have any noticable startup.  If you took my advicand and only did this for one device there is no way it will slow anything.  It uses an event structure which does literally nothing until you generate an event.  This means after the initial startup there will be no extra resources to just sit there.

 

As for the scrolling everything fits in the front panel window, so for me there is no scrolling because there is no need.  I can't scroll even clicking up and down because the controls are greyed out when they aren't needed.

0 Kudos
Message 18 of 33
(1,258 Views)

I have a few tables on my front panel, as well as a few other things.  I was ableto scroll on the front panel before i added in your code, but now it wont allow me to scroll once i hit the ok button.  I cant even scroll through my tables?



-Matt
0 Kudos
Message 19 of 33
(1,254 Views)

I just took the VI I posted, added a table and ran it.  I was able to scroll the front panel, or the table depending on where my mouse was without any issue.  Post your VI if you can.

0 Kudos
Message 20 of 33
(1,251 Views)