Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

setting up Ni 4551 DAQ card in a vi

Hi, I have 2 NI4551 and 3 NI4552 PCI cards used for data aquisition. What I am looking to do is just to simply record a wave file from different microphones I have set up. I created a vi to do this and in it uses the AIConfig, AIStart, and AIRead vi's. I was hoping someone can help explain to me how to map the different NI4551 and NI4552 cards and its channels(2 or 4) so that I know what channel on what card it corresponds to in the vi (in the vi I sed numeric controls that allows the user to "select" the "device" and "channel"). I am running labview 6.1
0 Kudos
Message 1 of 5
(7,883 Views)
Hello. 
 
Thank you for posting to the NI Discussion Forums. 
 
From my understanding, you have 5 different PCI cards and you would like to allow the user to select which device will take a reading.  Instead of giving them the option of 1,2,3,4,5 which will be the default names of the devices as seen in MAX, you would like to make it a little more user friendly with names that are desciptive.  So, if one of the DAQ cards is measuring temperature, instead of being called 1, allow the user to select temperature and then have the program automatically know that temperature is associated with '1'. 
 
If this is correct, all you should need is a Text Ring Control.  After you place it on your front panel, you can right click and 'edit items'.  Then, you can assign different words to numbers.  So, back to our example, if you have a traditional daq device that is called 1 currently, you can place '1' in the 'Values' column and your custom name in the 'Items' column.  The 'temperature' word will appear on the front panel for the user to see, but the numbers will be used on the block diagram to select the right DAQ card. 
 
Let me know if this works for you!
 
Brian F
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(7,870 Views)
No actually what I was wondering was how labview knows that choosing "1" (using a numeric control) corresponds to the installed DAQ1 card (what if the numbering started with 0 and not 1?), and choosing "3" on the front panel corresponds to the DAQ3 (and not DAQ2 or DAQ4). Thats the part that I would like to be explained as to how labview configures it
0 Kudos
Message 3 of 5
(7,865 Views)

First you are lucky, such an amount of 4551 and 4552, I was nearly expecting to be alone to work with 4552 as there is no so much messages about it...you have a nest...Smiley Happy

How labview is choosing the DAQ number, I do not know, but you can use MAX to configure names to your channels (not the devices ..)  instead of using this numbers in the devices or of course use Brian's trick.

You should also synchronize your measurements... RTSI (the hard special plug on the 45XX boards (inside the PC)), or software

Hope this helps

Pierre

 

0 Kudos
Message 4 of 5
(7,853 Views)

Hello. 

The reason that LabVIEW knows that choosing 1 in the numeric control represents DAQ1 is because the Traditional DAQ driver was coded that way.  While DAQmx's resource name is a string allowing for a more custom name, Traditional DAQ's resource name is just a number. 

Another way to look at this is if you dive down about 5 levels on the AI Sample Channel VI, you will see a call library function node with an input called device.  The input parameter on the call library function node that the device input is wired to is set to accept an I16 integer.  So, we must feed it an integer to make the code work. 

If you open up MAX and right click on your Traditional DAQ device>> Properties, you will see an option to edit the "Device Number."  This number can be any unique integer between 1 and 64.  So, this again confirms that the DAQ driver is looking for a number as the way to identify each DAQ device.  These numbers are assigned automatically by MAX, but you always have the option to change the number by following the steps outlined in this paragraph. 

Let me know if this answers your questions. 

Brian F
Applications Engineer
National Instruments

0 Kudos
Message 5 of 5
(7,836 Views)