LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read from .csv file in this case

Hi Matipa,

 


@Matipa wrote:

Done, it is possible to connect this two waveforms in one, but then i having next problem (in two places):


So before you had a scalar waveform, and this function on the right was fine with it.

Now you  have a waveform array and this functions doesn't like it.

What would you do?

 

When you need to index an waveform from an array you might think about using IndexArray. Or wire the saclar waveform as you did before…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 26
(2,101 Views)

Yes, You are 100% right, but i tried it before:

Matipa_0-1597260150512.png

After that I can see the signal from DAQ with no problems, but when i trying to read signal from file there is no waveform on graph, should I index it in some way?

0 Kudos
Message 12 of 26
(2,082 Views)

Hi Matipa,

 


@Matipa wrote:

but when i trying to read signal from file there is no waveform on graph, should I index it in some way?


You forgot to attach the current state of your VI, so what kind of answer do you expect about some "read from file" when this is not shown in your images?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 26
(2,080 Views)

Yes, my mistake.

0 Kudos
Message 14 of 26
(2,072 Views)

Hi Matipa,

 

what's the point in creating an array consisting of two waveforms, just to use IndexArray on this array to only use the first array element?

 

Use IndexArray only when/where you need to, like shown in the image!

Maybe the function in the loop should process both waveforms in the array? Then use an autoindexing FOR loop - as you should have learned in the LabVIEW Basics courses!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 26
(2,032 Views)

Unfortunately, I couldn't do this during this time, maybe it's better because now I can take a fresh look at it.

 

I took a small step to finish i guess but i receive error which You can see below, after I trying to open waveform from file... What can be the reason of this problem?

 

Matipa_0-1603280994290.png

When i give simulated signal on input everything is working just fine, I have problem only with opening waveform from file...

 I do not hide that this is a task that I have to do just to pass, wanting to learn something new at the same time.

0 Kudos
Message 16 of 26
(1,997 Views)

Hi Matipa,

 

have you done any LabVIEW training in the last days?

 

See this:

Why do you need this FOR loop construct 4 times in your VI?

Why do you need a FOR loop to get the last element of your waveform array (instead of IndexArray)?

That waveform array consists of exactly 2 elements: wouldn't it be much easier just to wire the waveform from DAQmxRead to all those other nodes?

Why do you need two loops running both at 50Hz? Why not combine their code in just one loop?

Why are both stop buttons of those loops hidden in the frontpanel?

Why do you need to convert integer inputs to DBL, just to subtract 1 from them and convert them back to integer??? (Btw. there's a "-1" primitive!)

 

The error shown in your last message probably originates in one of those subVIs from Jitter toolkit: check the inputs to those functions!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 17 of 26
(1,990 Views)

Thank You for fast replay,

 

Unfortunately, I'm not very good at this, I don't understand everything you write about 😣

Much of this program has been written based on others tutorials, so put it all into one doesn't look good, but it works (based on labview "Voltage-Finite-Input" program). 

 

Why do you need this FOR loop construct 4 times in your VI?

I see it is mistake, i should do only one for loop and connect to the other parts of program,

Why do you need a FOR loop to get the last element of your waveform array (instead of IndexArray)?

Auto indexting was not working here for me, i tried it before (there was wrong connection between elements),

That waveform array consists of exactly 2 elements: wouldn't it be much easier just to wire the waveform from DAQmxRead to all those other nodes?

I don't really understad this tip 😕

Why do you need two loops running both at 50Hz? Why not combine their code in just one loop?

I have on my mind to do this in just one loop, but after this all will work correctly together,

Why are both stop buttons of those loops hidden in the frontpanel?

I do not need this buttons on my front panel,

Why do you need to convert integer inputs to DBL, just to subtract 1 from them and convert them back to integer??? (Btw. there's a "-1" primitive!)

This "-1" was taken from other tips or tutorials, but everything works well before connecting two waveform signals together.

 

0 Kudos
Message 18 of 26
(1,980 Views)

Hi Matipa,

 


@Matipa wrote:

Why do you need a FOR loop to get the last element of your waveform array (instead of IndexArray)?

Auto indexting was not working here for me, i tried it before (there was wrong connection between elements),

That waveform array consists of exactly 2 elements: wouldn't it be much easier just to wire the waveform from DAQmxRead to all those other nodes?

I don't really understad this tip 😕

Why are both stop buttons of those loops hidden in the frontpanel?

I do not need this buttons on my front panel,

I didn't mention any "autoindexing", but wrote about using IndexArray to index an array element!

See the image for using the waveform from DAQmxRead directly wired to the loop!

When you don't need the buttons on the frontpanel then you cannot stop that VI in a graceful way. Why do you need those buttons at all and why don't you replace them by simple FALSE constants???

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 19 of 26
(1,975 Views)

I used this buttons before, but it won't works fine for me (but I left them maybe for the future),

I made this what are u talking about:

 


@GerdW wrote:

See the image for using the waveform from DAQmxRead directly wired to the loop!

 everything looks good but now i have no my measurements nex to the graph:

 
 
 

Bez tytułu.png

0 Kudos
Message 20 of 26
(1,966 Views)