01-28-2008 03:53 PM - edited 01-28-2008 03:55 PM
The PWM signal that you are seeing on your graph contains 1000 points. You have the DAQ assistants set up to be single point only. You can set them up for N samples instead of single points and this way all 1000 points will get written to the DAQ board.
You could also do something like include all the channels in one DAQ assistant instead of having separate assistants for each channel.
If you look at the attached code where I am using DAQmx Vis instead of the DAQ assistant. I can actually wire unsigned 8 bit integers or unsigned 16 bit integers and that will get written to the 8 or 16 channels that I select in my task appropriately.
That is just an option that you can try. However to get your code working, you would need to output N samples (i.e. 1000).
As options you could combine all the DAQ assistants into one, or use the DAQmx code as well.
01-29-2008 08:18 PM
01-30-2008 08:18 AM
01-31-2008 10:55 AM
01-31-2008 01:59 PM - edited 01-31-2008 01:59 PM
Try changing your code to what is shown below. I can't provide a 7.1 VI at this time. Make sure to change your physical channel control to what I've shown as a constant.
02-08-2008 08:35 AM
You are missing some fundamental understanding of DAQmx, channels, and arrays. You ignored what I said about the channel list.
For each channel, you need to provide a 1D array. If you want to write to 2 channels, you need a 2D array. What I think the DAQmx Write requires is a separate row in the 2D array for each channel. That is why I specified channels 0:5 and used a build array with 6 inputs. It makes no sense to use multiple sine and triangle wave gnerators when you are generating the same signal for all. If you get an error with my setup, you might need to transpose the array before it goes to the DAQmx Read. I could be wrong about the number of rows. It might require a separate column in the 2D array for each channel.
If you run the VI and have problems, be sure to take note of the error code and message that would be generated.
02-08-2008 10:05 AM
02-08-2008 12:39 PM
Sorry, did not notice the difference phase inputs.
Still you are generating three separate signals and the front panel control is set for 8 channels. What exactly are you trying to do? How many channels do you really want? The number of dimensions in the array have to match the number of channels. Until you fix that, you will get an error and nothing will be generated.