LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Assistant vs. DAQmx

I'm not totally sure which one it is, the PCI-6251 or the 6024E.  I have put a screenshot of the Hardware detected from MAX, but it indicates that we have two devices.  Whenever we would use "Write to Digital Line.Vi" in 7.1, we would assign the VI to Device 1.  However, it appears Device 1 is empty.  I've put the screenshot for the 6024E as well.


Download All
0 Kudos
Message 11 of 21
(1,957 Views)
I should've noted this on the post before. The final system will use the Chassis system with the NI 9472 to control the 24 volt solenoid valves.  That equipment was just ordered, and so I am trying to design portions of the system on our current hardware, which I indicated in the previous post, while I am waiting for the new equipment to get here.


0 Kudos
Message 12 of 21
(1,955 Views)
I have no idea what would cause the N/A to appear unless the board is not fully seated and it cannot read the info from it. I would not try to use it until that was fixed. Try removing the board and inserting it again. You might want to try it in a different slot.
0 Kudos
Message 13 of 21
(1,944 Views)
It is showing up as Device 1 under Traditional NI-DAQ Legacy tree.  For some reason it is identified as Device 2 under NI-DAQmx Device's tree.


0 Kudos
Message 14 of 21
(1,926 Views)
I can believe that for the E series board but the 6251 is an M series and should not be detected by traditional DAQ at all. Whatever devices you have listed under traditional DAQ, you want to reset them so that the DAQmx driver is active.
0 Kudos
Message 15 of 21
(1,922 Views)

Okay...I found a good video on NI about using DAQmx for inputs and outputs, and I've gotten both examples to work.  I am now editing those programs to read in a K-type thermocouple one sample a second, and the duration of the program is entered in by a user prompt and is controlled by the Elasped Time VI.  The program is operational.  However, the program starts logging data even before the user enters in the length of the test.  So, if I press the start button and enter in 30 seconds for the length of the test,  the program will execute.  However, when I open the text file where the results are stored,the file includes samples taken before I entered in the 30 seconds.  How do you synchronize the logger not to start until the user enters in the test length information?

I've attached the VI for the program, and a .txt file of data logged.

 

 

Download All
0 Kudos
Message 16 of 21
(1,897 Views)
The read and logging is not starting before the test time is entered. What in the data file makes you think it is?
0 Kudos
Message 17 of 21
(1,889 Views)
I set the time of the test for 30 seconds. However, it is logging samples before I press the ok button on the User Prompt.  I deliberetly waited about 10 seconds before pressing okay, and if you look on the .txt file it logs data from 0 to 39 seconds instead of 0 to 30 seconds, 9 samples too many. I do not want the program to log data until I press the ok button. 
0 Kudos
Message 18 of 21
(1,882 Views)

I don't think the number of samples that are written is necessarily going to be 30 when you run the loop for 30 seconds. I's going to be the number of samples that the DAQmx Read returns. You are telling the DAQmx Read to return however many samples it has available and you are not sampling once a second.

Edit - I just ran your VI and I keep getting an error. That's probably because you have it set to continuous. With the Write to Measurement File inside the loop, it takes too much time to write to a file each time. Try setting it to finite samples and requesting a fixed number of samples.



Message Edited by Dennis Knutson on 07-23-2008 06:29 PM
0 Kudos
Message 19 of 21
(1,872 Views)
Well, I am telling DAQmx to take 1 sample a second, and according to the .txt file it is taking 1 sample a second.  So, If I tell the program to run for 30 seconds, I should theoretically receive 30 samples.  I've deliberately waited for fixed intervals before clicking the okay button to see how many extra samples I receive, and every time I've done that I receive x amount of extra samples which equals the amount of time I waited.  I've tried with waiting 3, 5, 10 seconds. 
0 Kudos
Message 20 of 21
(1,868 Views)