10-10-2014 10:51 AM
Are you clicking the Stop button, or just Stop 2? Your Stop button, which will finish the DAQ loop, is way off to the left of the front panel. Once you push that you should be prompted to select a file to save to. It saved data when I tried your VI.
One thing: It looks like you are creating two analog input tasks for the same device. Are you receiving a Resource Reserved error? Typically you can only have one Analog Input task running per device. You will likely want to combine them into a single task that reads both channels. Then you can use the Multiple Channels > Multiple Samples option on the DAQmx Read to read both channels at the same time.
10-10-2014 11:27 AM
@Will_S. wrote:
Are you clicking the Stop button, or just Stop 2? Your Stop button, which will finish the DAQ loop, is way off to the left of the front panel. Once you push that you should be prompted to select a file to save to. It saved data when I tried your VI.
One thing: It looks like you are creating two analog input tasks for the same device. Are you receiving a Resource Reserved error? Typically you can only have one Analog Input task running per device. You will likely want to combine them into a single task that reads both channels. Then you can use the Multiple Channels > Multiple Samples option on the DAQmx Read to read both channels at the same time.
Thank you, Will. I just ran the VI and clicked Stop and it did ask me to write in the filename and there was a spreadsheet which was created. I also wasn't aware that I could only run one analog input task per device. I have been getting that error and wasn't sure why it was occurring either, but I thought that it just had something to do with my file saving error. If I create one task to read all of the channels, then how do I go about splitting up the signals to record them each in their own column on the excel spreadsheet?
10-10-2014 11:27 AM
@Will_S. wrote:
Are you clicking the Stop button, or just Stop 2? Your Stop button, which will finish the DAQ loop, is way off to the left of the front panel. Once you push that you should be prompted to select a file to save to. It saved data when I tried your VI.
One thing: It looks like you are creating two analog input tasks for the same device. Are you receiving a Resource Reserved error? Typically you can only have one Analog Input task running per device. You will likely want to combine them into a single task that reads both channels. Then you can use the Multiple Channels > Multiple Samples option on the DAQmx Read to read both channels at the same time.
Thank you, Will. I just ran the VI and clicked Stop and it did ask me to write in the filename and there was a spreadsheet which was created. I also wasn't aware that I could only run one analog input task per device. I have been getting that error and wasn't sure why it was occurring either, but I thought that it just had something to do with my file saving error. If I create one task to read all of the channels, then how do I go about splitting up the signals to record them each in their own column on the excel spreadsheet?
10-10-2014 11:50 AM
10-10-2014 12:39 PM
@Will_S. wrote:
If you want to use real timestamps instead of simple index numbers, you can use the Get Date/Time in Seconds VI to get the time and date at the beginning of the acquisition. Then use the Y and dt components of the waveform to build out the timestamps themselves for each signal.
Also, keep in mind that all of your While Loops in the Warning Lights loop have no timing in them. So they are going to use 100% of your CPU. I would put a Wait Until Next ms Multiple function in each of those loops to give your other processes time to execute.
What is the pink icon connected to the waveform node in the top "build waveform" function?
10-13-2014 10:22 AM - edited 10-13-2014 10:22 AM
It's just a waveform cluster constant. You don't really need it, I just like to have it for completion.
But the image I posted is a VI Snippet. Right-click it, save it to your desktop and then drag the file onto your block diagram. It will create the block diagram for you and you can use Context Help to see what everything is. (Assuming youre using LabVIEW 2013 or later)