LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time Controlling a DAQ module

Hello,

 

I am currently working to generate a code that sends a signal for a certain about of time and then is off for a certain amount of time and then repeats that pattern until I stop the VI completely. I have had some success getting the code to work on the computer, but when I plug it into the DAQ module it says that it has 2 data inputs instead of the allotted 1. I have attached the code I was using without the DAQ module present because I know it requires drivers that some may not have when trying to troubleshoot. I would appreciate any help. Thank you!

0 Kudos
Message 1 of 5
(1,479 Views)

Since your issue is with timing with respect to a DAQ module, you really need to attach the VI that talks to the DAQ module.

Is it an NI DAQ module?  If so, most people on the forum will have installed DAQmx and can study the code.

 

With the VI you attached which is simple Express VI's, with no connections or possible connections to a DAQ module, I can only see a few things that *might* cause problems when you add your DAQ code.

 

1.  Your Simulated Signal Express VI is set to run as fast as possible.

2.  You have a wait function in there that might be interfering with the natural timing of the DAQ functions you would have put in there.

3.  You are using Express VI's.  I bet you probably used a DAQExpress VI in your VI you didn't attach.  Express VI's are great for throwing something together quickly to get something running.  But they will get in your way of doing anything more advanced than some simple code.  If you used real DAQmx functions (assuming your DAQ modules are from NI!), you should be able configure them as you need to in order to get good hardware timing.

 

 

0 Kudos
Message 2 of 5
(1,447 Views)

Hi!

 

Thank you for your response! I have attached an update VI with the DAQmx. I'm using a 16-Bit, 250kS/s M Series Multifunction Bus-powered Data Acquisition (DAQ) module. To address your comments:

 

1) When I change the signal to use the simulated acquisition time, it states that it would cause a delay of more than 5 seconds which is something that I would like to avoid.

2) Removing the wait function did not change the pop-up issue.

3) I did not use DAQExpress in the file I did not attach. I used the DAQ assistant, which is shown in the new VI I've uploaded.

 

Thank you again for your help!

0 Kudos
Message 3 of 5
(1,430 Views)

I actually mean the DAQ Assistant, but it is an Express VI so I mis-remembered the name.

 

Seeing how the code working with the DAQ Assistant, I agree that the simulations should be for "run as fast as possible".

 

I think you still need to get away from the DAQ Assistant.  Take a look in Find Examples...   Look for "Voltage (non-regeneration) - Continuous Output.vi".  I think that is the one that will show you how to do what you want to do.

 

One issue with that is that the signal generator in there is reset every iteration.  I think you'll want that to be false.

0 Kudos
Message 4 of 5
(1,420 Views)

Thank you for your help! I got the code to send 1 signal for a set amount of time and then the other for a different amount of time. I removed the DAQ assistant, as you will see in the updated code attached. However, when I try to send the signal through the two output channels of the  16-Bit, 250kS/s M Series Multifunction Bus-powered Data Acquisition module there are a couple of errors that pop-up.

 

1) I need to increase the number of buffers available from 1 to 2.

       When I've tried to do this using one of the multiple buffer adjusting vis, I either get an error that states that the buffer is empty or that the signal cannot be generated because the property is not supported by the device.

 

Any advice?

 

Thank you again!

0 Kudos
Message 5 of 5
(1,400 Views)