LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read datas from table

Solved!
Go to solution

Hi danil,

 

when you change the subVI too, then you should attach it also...

 

See my attachments...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Download All
0 Kudos
Message 81 of 189
(1,112 Views)

sorry for late reply.Iam using LV2009.So I can't open your VI.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 82 of 189
(1,108 Views)

Hi danil,

 

I recommend to use a good signature to avoid such problems...

 

See picture for your two VIs:

check.png

I also recommend not to use the same VI title for debugging purposes...

I'm also unsure about that IndexArray in your mainVI loop. You create changing array values but you only pick one array element for sending to serial port?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 83 of 189
(1,104 Views)

Hi GerdW,

 

                  By doing so,the output array(In update continuously.vi) is showing output as shown in the attached VI.It is attaching values like this:001100.Sometimes it is giving some junk values also.But I just want to see the output continuously changing as in the input array.Is it due to the problem in the update continuously.vi.How can we correct it in the VISAread part?Also with out the outer loop in the subVI,we can't see a continuously increasing array values,it gives only zeros and ones.

All the VIs are attached.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 84 of 189
(1,086 Views)

Hi Danil,

 

"But I just want to see the output continuously changing as in the input array."

You already solved that by placing an indicator in your "main loop".

 

"we can't see a continuously increasing array values,it gives only zeros and ones."

Because I removed that adding part for simplicity. You could use a feedback node to put it back in again:

check.png

 

"Sometimes it is giving some junk values also."

What are "junk" values when you generate values with a Random() function?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 85 of 189
(1,068 Views)

Hi Danil,

 

additionally:

- Why do you initialize the COM port in each loop iteration in "Generate and display"?

- You always initialize the ports, but you never close them!?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 86 of 189
(1,065 Views)

 

"But I just want to see the output continuously changing as in the input array."

You already solved that by placing an indicator in your "main loop".


I mean after reading, the output array is not updating the values.It is attaching new values with the old values and forming a stream of values??I want the array to show the current values only.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 87 of 189
(1,064 Views)

Hi Danil,

 

"I mean after reading, the output array is not updating the values."

After data is read, it will not change - until you read new values again...

 

"It is attaching new values with the old values and forming a stream of values??"

Don't know what you want to say with that sentence...

 

"I want the array to show the current values only."

The "array" (of your subVI) is showing current values each time you call it...

 

You clearly have to learn to write better questions...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 88 of 189
(1,058 Views)

Sorry for improper explanation.Iam talking about update continuously.vi.The array in update continuously.vi is showing value of previous iteration as well as current iteration in one index.suppose in the first iteration it got the value 13.In the next iteration I want the 13 to disappear and must show the current value only.But in my case Iam getting 131415....in one array index

 

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 89 of 189
(1,055 Views)

Hi danil,

 

I don't believe that...

 

check.png

This is the core of your "update" VI. It receives 12 strings (atleast it tries to) and displays them in an array indicator. There is no code for appending strings...

 

So the problem is more related to the data source...

- Do you send the strings with proper termination char appended? Otherwise VISA-Read will wait until 50 chars are completed...

 

This has been explained to you already. Did you read any of the explanations given to you? Do you follow any suggestions given to you?

 

Well, it seems I get my first "message #100" soon...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 90 of 189
(1,051 Views)