LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DigitalWrite sequence, Filtering digital data arrays

Hi all,

I´ve been trying to solve the following issue the last couple of days with no success, so I hope one of you can help me out.

The first problem is that I´ve changing waveform data and sometimes there are two distinct digital data at one time point. As shown in the brief example attached, for timepoint 7500 the input is either '1000' or '0000' (corresponding to row 3 and 4). In this particular case I´d like to delete the first entry (row 3), since the 'one' pulse of the first entry sends out a short high-pulse although it should just contain zeros. Unfortunately, the creation of the waveform is way more complex than shown in the example, so I need to filter the rows after their creation just before sending it to the DigitalWrite.vi. I haven´t found an option that runs through the array like: 'if timepoint(row(i))=timepoint(row(i+1)) then delete row(i)'. Any advice is much appreciated!!

The second question is about sequential data input for the DigitalWrite.vi. The main data for the pulse sequence is repetitively written in the vi until it reaches the given max finite sample (in this case 'repetitions' multiplied with the max_sample of the single data sequence). To initialise my system, I need to write a short sequence just once before the actual main data. Directly after the Pre-sequence the main data should follow. I horribly failed with all my attempts in doing so (two serial DigitalWrite.vi´s, altering the data input etc). If I append the main data to the Pre-Sequence data the Pre-sequence is also repeatingly being written depending on the setting of the 'repetition'-parameter. Any hint how to achieve this?

Many, many thanks in advance for your help!!

Best regards,
Rob


0 Kudos
Message 1 of 11
(3,024 Views)
At least I´ve found a way to solve the first issue with the sequential digital write.
However, I still need to filter the digital data, since some timepoints are the same, but they have distinct data. I´ve simplified the problem a lot as shown in the attached example. I need a code that checks the timepoints and if there are entries that are the same, only the last one should be kept. In the example attached I simply want to find out that row 3 and 4 are equal and thus row 3 should be eliminated. I haven´t found anything useful, although the task seems quite trivial.  Any idea??

I really appreciate any hint how to solve that problem. Thanks so much in advance!!

Best,
Rob
0 Kudos
Message 2 of 11
(2,990 Views)
Hi Rob,

I hope this Vi example is a little help for you!

Best regards,
Tim


0 Kudos
Message 3 of 11
(2,928 Views)

 Hi Tim,

thanks for the response, unfortunately I´m not able to open the vi´s since I just have LabView 8.2. Since I´m highly interested to have a look at your code, could you eventually -re-save the files for older versions?

Í followed another idea and it seemed to work, but when I feed the digitalwrite.vi with a short data array (e.g. http://img140.imageshack.us/my.php?image=nivd0.png, DigitalWrite as attached), LabView goes crazy and says "Out of memory in dbtI-decompressing vi etc". If I tweak the last entry significantly lower it works fine. The data array doesn´t seem to be the problem, rather the big timepoint in the last row. Is there a way to circumvent this problem? Or is the number of samples for the digitalWrite.vi somehow limited?

 

Thanks a lot!!!!

Rob

0 Kudos
Message 4 of 11
(2,913 Views)
Can no one comment on this issue?
Many thanks in advance!!

Rob
0 Kudos
Message 5 of 11
(2,881 Views)

Hi RobMotz,

here are Tims vi´s saved for LabView 8.0.

Mike

0 Kudos
Message 6 of 11
(2,872 Views)
Thanks for the conversion, works fine!

Final question, is there a limit for the DigitalWrite.vi in terms of maximum value of timepoints? Even if I only have two data points in the digital data (input for the DigitalWrite.vi,
http://img140.imageshack.us/my.php?image=nivd0.png
), but the last one being huge (e.g. 10^8 pulses) Labview goes on strike. Is there a way to circumvent this or is it simply impossible?

Thanks and best regards,

Rob
0 Kudos
Message 7 of 11
(2,864 Views)
Hi,

it seems that the conversion changed the example.vi since it´s not doing the intended job at all. Instead of deleting the first of two rows which have the same timepoint, this is always deleting the 4th row, no matter what I change. Both case-loops are also being empty. Attached the files as with the simplified problem and Tim´s converted example(sub).vi as I got it. Is it me who is doing something terriblx wrong or is it indeed the corrupted vi? If so it´s the file, is it possible to convert it properly??

Many, many thanks in advance!!

Rob
0 Kudos
Message 8 of 11
(2,855 Views)
Sorry to bother you once again, but is Tim´s example vi working in your case or is it also deleting the 4th row no matter what´s the digital data input?
In the converted vi´s (as attached in the previous post) the case structures are empty, but I can´t tell whether this is the case also in Tim´s original vi since I can´t open it.

Help... 😉

Thanks,
Rob

0 Kudos
Message 9 of 11
(2,807 Views)

Hi RobMotz,

there is no converions error, but your are right, it delete the wrong row. See the attached example please.

Mike

0 Kudos
Message 10 of 11
(2,802 Views)