02-12-2018 10:40 AM
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 !
02-13-2018 04:41 PM
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.
02-14-2018 07:14 AM
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 ?
02-14-2018
02:20 PM
- last edited on
11-27-2024
10:08 AM
by
Content Cleaner
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/docs/en-US/bundle/ni-daqmx-properties/page/daqmxprop/attr1453.html