Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Minimize the number of messages to send to USB-6009

Hello everyone !

 

I'm having an issue optimizing a software written in C.

 

I am using an NI-USB-6009 to communicate with a second device. To configure it I have to loop over the bits of my variable (8 iterations) to assign a high and a low current, and then do a DAQmxWriteAnalog and two DAQmxWriteDigitalLines. The data to be sent as Analog Output will vary each iteration, but the two Digital Outputs will always be the same (1 and 0) and HAVE to happen after one analog signal.

 

I'm looking to optimize this loop, as it will, overtime, consume a lot of time.

 

What options do I have ? Would I, for example, be able to put all my Analog Output in an array, send it once and have the DAQ serve the data successively to the second device ? If so, how would I integrate the digital output to be sent between each analog message ?

 

Thank you for your ideas !

0 Kudos
Message 1 of 4
(2,368 Views)

Hi,

 

Can you share your code to take a look at it? To see if I can get better context on what you're doing right now, and look for any clues on what to do to optimize it.

0 Kudos
Message 2 of 4
(2,331 Views)

I would say this is fixed already, but I'm more intrigued with Regeneration now. Would it be possible to basically load a number of instructions to the onboard memory and regenerate it on-demand ?

0 Kudos
Message 3 of 4
(2,326 Views)

I have here some information on regeneration, let me know if that gives you a clue on what you'd like to do, or if it doesn't make any sense... It is for LabVIEW, but I think you can use the DAQmx property nodes on your C code:

 

https://www.ni.com/en/support/documentation/supplemental/06/analog-output-regeneration-in-ni-daqmx.h...

 

https://www.ni.com/docs/en-US/bundle/ni-daqmx-properties/page/daqmxprop/attr1453.html

0 Kudos
Message 4 of 4
(2,317 Views)