From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-11-2018 07:44 PM - edited 02-11-2018 07:45 PM
Hi everyone,
I have been working on this and I cannot find a good example or topic related to the problem I am having.
My goal is to visualize digital and analog signals in real time with indicator, loggin at the same time a TDMS file and then open the log file at the end of the acquisition.
In version GEN v4 (Assistant): I have tried many ways but I always encounter a problem with the timing. The analog signal keeps the good timestamp but not the digital signal. I am using continuous sampling. I have tried sample on demand but it doesn't work, the timing are all off.
In version GEN v5 (DAQmx): I begun working with DAQmx but I don't know how to merge the signal for logging. I am getting this error : File specified is already opened for output. NI-DAQmx requires exclusive write access.
I am joining my 2 vi projects so maybe someone could help me with this.
Thank you
02-12-2018 01:48 AM
Hi Grabov,
Gen4: you lose the timing of the digital waveforms because YOU do convert from waveform to U32 array to DDT wire. Solution: Get rid of ExpressVIs and DDT wires and keep using waveforms…
Gen5: You try to use the very same file name for two different DAQmx tasks with enabled logging. As the error tells you this isn't allowed: one file per task!
Why do you use local variables for the filename? Why not use the control and some wires?
Why do you still use ExpressVIs in the loop? Why not use IndexArray when you want to get the elements of an array???
02-13-2018 02:57 PM
Hi GerdW,
first of all, thank you for your reply!
About Gen4: I did the convert because I did not find any way of entering the Express VI Write to Measurment File. I know it is best to avoid Express VI, but I am new at using LabView..
About Gen5: I know about the error, but my question was how to merge my measurement in the same file then? It seems like I can't merge my digital task (digital type) to my analog task and then use the loggin.
I used variable for path because I initially try to use a sequence for the reading (after firsts task are over).
I will use array for the signal as you suggest me.
I will also make changes based on this for sampling
Thank you again
02-13-2018 03:02 PM - edited 02-13-2018 03:10 PM
Hi Grabov,
About Gen5: I know about the error, but my question was how to merge my measurement in the same file then?
You cannot use that approach and still write all data into one file as:
- you cannot write to the file from two different DAQmx tasks
- you cannot merge digital with analog channels in one task
On Gen4:
This should keep the timestamps of the digital waveforms intact…
02-15-2018 08:03 AM
Great, I am going to try this.
I think it is kind of odd that we can't log two different type of signal in the same file with Daqmx... I mean isn't LabView made for data aquisition. Why this is so cumbersome?
Maybe merging the signals into a waveform and then output the waveform to a logging task will do the job? This might be hard job on buffering.
What do you think about this?
Thanks
02-15-2018 09:40 AM
Hi Grabov,
I think it is kind of odd that we can't log two different type of signal in the same file with Daqmx.
No, it's not odd.
The file is a shared resource here - and two DAQmx tasks cannot access the very same file at the same time.
So there is a simple rule: one TDMS file per DAQmx task!
Maybe merging the signals into a waveform and then output the waveform to a logging task will do the job?
I would rather get rid of ExpressVIs and all those dark-blue DDT wires to gain control over all those data!
02-17-2018 09:10 PM
So I just made GEN V4 working using digital to analog waveform..
Still working on the Daqmx version without success, I get a Error -200278, reading a simple beyond. I cant figure why. I tried different ways with sequence frame without success.
02-18-2018 11:17 AM
Hi Grabov,
unfortunately we still can't debug images using LabVIEW…
(You better attach VIs instead of just images!)
I get a Error -200278, reading a simple beyond. I cant figure why.
We can't neither as all settings are hidden in all those ExpressVIs…
02-18-2018 01:42 PM
Yes of course.
02-18-2018 02:00 PM
Hi Grabov,
where exactly does the error occur?
- I would set atleast one of the tasks (AI) to read a fixed amount of samples per DAQmxRead call. This way you can enforce a better loop timing…
- Do you really want ElapsedTime to wait for 10 hours?
- Why do you need SplitSignal to index the elements of your waveform array? Why not use IndexArray?