03-24-2017 08:43 AM
Hello Dear NI-users,
I am developing a labview interface for controlling a brushless dc motor. The motor drive needs a
--"enable" signal for the initialization: a digital high/low output and
--"command signal" for the position: a analog output
Both signals should be generated in real time in labview, via the "1-Single on demand" option with the DAQ-Assistant, running in a while-loop.
The problem is, that labview treats the signals to/from the "DAQ-Assistant" as arrays, therefore I need to generate an array with just one element, see picture.
Is there a more elegant solution to this?
03-25-2017 01:18 PM
Just use a single control and then Build Array reduced to 1 input.
03-27-2017 01:31 AM
Hi,
I agree with crossrulz regarding the build array function, ...
... but if you want to do 'real-time' control you better have HW that supports Hardware-Timed Single Point Sampling.
Does My DAQ Device Support Hardware-Timed Single Point Sampling Mode? - National Instruments
http://digital.ni.com/public.nsf/allkb/B4E831774F29FB038625754C0081C050
Or at least do not use the DAQ Assistant since that probably initializes and deinitializes the DAQmx task every time, so probably use the lower-level DAQmx API functions as explained in the DAQmx examples.
Best regards,
Christoph
04-01-2017 02:40 AM
Thanks for the reply.
I resorted in using the traditional DAQmx blocks. This way I can write/read my data much more convenient without having to compose/decompose arrays 🙂