11-28-2024 09:07 PM
Hi,
Apologies for the disturbance, but I am encountering an issue that I need your guidance on.
The data I am obtaining from the code seems to reflect real measurements; however, the presence of a red dot raises concerns that there might be an error in my implementation, potentially affecting the accuracy of the data.
Could you please assist me in verifying whether the data is correct? I have also attached the code in the LV19 version for your reference.
Thank you for your time and assistance.
Kind regards
Hasham
11-28-2024 09:23 PM
If you're looking to just log data from DAQ, FlexLogger lite will be a simpler and easier approach. After logging to TDMS, you can read the TDMS in LabVIEW for advanced analysis or processing.
11-29-2024 12:53 AM
11-29-2024 12:45 PM
A red dot just means that the wired input is not what the function is able to accept directly and LabVIEW will make some reasonable assumptions to keep the code unbroken. It is up to you to decide if the coerced behavior is acceptable for you specific case.
Your current file write function accepts 1D and 2D arrays and definitely not waveforms! A waveform data is a structure consisting of two scalars (t0 and dt) and a 1D Y data array. With every iteration of your loop, t0 (?) and the data will probably change while dt remains constant.
As a first step, you need to decide how your delimited text file should look like (Unless you want to do some of the fancier file types suggested by others). One reasonable choice would be two columns, one with time and one with Y data. Here is one possible way to convert your waveform to a 2D array with a time and data column that will be accepted by the file IO you are using.
Writing a simple delimited file might be more useful, depending on what you plan to do with it later (e.g. Import into excel, read with third party software, etc.)
12-01-2024 03:28 AM
Hi,
Thank you for your reply. I switched to 2D, which resolved the red dot issue; however, I started receiving two samples per trigger signal instead of the required one sample per trigger. To address this, I switched back to 1D, but the red dot reappeared.
Kind regards
Hasham
12-01-2024 10:12 AM - edited 12-01-2024 10:14 AM
@Hasham622x wrote:
Thank you for your reply. I switched to 2D, which resolved the red dot issue; however, I started receiving two samples per trigger signal instead of the required one sample per trigger. To address this, I switched back to 1D, but the red dot reappeared.
A waveform is not the same as a 1D array, so you did not "switch back", because you originally never had a 1D array. The file IO has inputs for 1D and 2D arrays and as long as you use the appropriate input, you should be OK.
If you don't care about the time column, you could just get the Y data from the waveform and append to a single column. We cannot guess what you really want at the end.
If you get an unexpected number of values, that needs to be solved upstream. fiddling with datatypes at the end is a Band-Aid solution. The primary goal is correct functionality, not making red dots disappear!