I am using DAQ USB 6009 to input 5v PWM signal from LABVIEW to my H-bridge circuit to control the speed of the motor but everytime I try to run the VI teh DAQ gives me error saying number of channels in task are 1 and number of channels in data are 100. I am a newbie with LABVIEW can anyone help me solve this issue please?
I'm not sure what the exact problem is, it may help to upload your vi for someone to look at. It sounds like you may be wiring your vi incorrectly.
However, it is a bit concerning that you are trying to use PWM with a 6009 device, as PWM should be hardware timed in general, and the 6009 only has software timing for digital IO. I'm not sure if you will be able to get the behaviour you want even after solving the software error.
If you are looking for a low cost PWM capable module, I think the NI-6210 may be your best bet.
Thanks Ian for the reply.
I am using simulate signal to generate square wave. The LABVIEW part is to control the speed of a motor so I am using the knob to control the duty cycle of the square wave and then the output from simulate signal should go to DAQ and then to my H bridge circuit. I have attached my VI for you to have look.
You are generating 100 samples per iteration. you need to write 100 samples not 1. Configure the DAQ Assistant like this
I have tried using N samples on Labview but it gives me the error saying its not supported and I should select sample on demand instead.
Please see the attchment for the error
Oh, you are using a 6009. Nope that won't work you need something with a clock on board the 6009 won't do for writing N Samples. You will need to generate 1 sample at a time with varing delay between the points (that will be jittery) or use more capable hardware
Do you have any other DAQ devices available?
If you are looking to buy a new one, the 6210 is probably the easiest option, but it may be worth getting in touch with your local NI branch, we'd be happy to make recommendations. It may be that you are going to have some future needs which would make a different device a better option.
I think you're in the UK, so the number is 01635 523545, otherwise hit "contact NI" in the toolbar and it will tell you what number to phone.