02-24-2020 09:44 AM
I am using a NI DAQ USB 6351 device and am trying to manual control the current through 6 electromagnets. You can think of it as controlling the speed to 6 different DC motors.
I have made a VI that is able to output a PWM signal and I can vary the duty cycle on the fly. The issue is that the USB 6351 only has 2 analog outputs whereas I need 6. Also the USB 6351 only has 4 counters meaning I can only generate pwm on 4 digital output channels.
The VI I have now us able to generate 4 pwm signals on the digital output channels and I am able to change the duty cycle and thus the speed of each motor on the fly. Since I need 6 I was thinking of adding the 2 analog outputs to output the PWM signal/square wave so that I can control all 6 motors/electromagnets. However, I am having trouble with running both analog outputs at the same time.
I am also using 6 mosfets to be able to use the NI daq with an external power supply since the ni daq does not output enough current.
My question is, is there an easier way to do this or does using the 4 digital outputs + 2 analog outputs make the most sense?
If so, how can I work around the problem with running 2 analog outputs at the same time.
Attached is the VI with the 4 digital outputs and also another VI of the analog output I was trying to use.
Any help would much appreciative!