10-03-2012 11:51 AM
I'm having trouble logging or recording the information that's being produced by the digital output I have in a for loop. I tried implementing the logging from DAQmx into the loop and I was getting an error about the number of channels not matching the number of lines. I don't know if this is what I need to use or not because I'm wondering if the log does save the output, will it rewrite the file everytime the loop runs? That wouldn't be helpful. What I need is that the information for the several channels that we have will display the digital waveform of the output. I'm attaching the code we currently have and the one I tried implementing with the log, which got an error.
10-03-2012 12:07 PM
In your "log" screen shot, I see 3 lines being defined but an array size of 2 going into the write. This will cause your error.
You should use Configure Logging before you even start the task. Plus, I'm not sure it will work with digital outputs.
10-03-2012 12:15 PM
If you select open or create under operation it should open or create a file (if it does not exist) and will append to that file. For the number of channles not matching can you turn on highlight execution and see where the error is generated from? if its from the DAQmx Create digital channel then try to flatten an array of physicals using DAQmx flatten string channle and pluging in a string into lines. might be getting that error because you are not addressing the entire port but rather components of it.
10-03-2012 12:18 PM
thank you,
what I am trying to achieve is getting a file or graph that I can save and that will give me the digital waveform of the output.