LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read datas from table

Solved!
Go to solution

With all of the received data in a indicator, it should now be obvious why your equal comparison returns false.

0 Kudos
Message 61 of 189
(1,082 Views)

Hi,

 

Danil again created a new thread to handle a topic related to VIs shown here. Solution to his answer was accepted...

Best regards,
GerdW


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

While running, the indicator showing exactly the array that I have send.And I just compared a string constant with the element in the first value of the array.The wire value also the same as the string constant.But after comparison it returns false.Why this is happening??I can't understand what is the problem here.

 

GerdW,

              I created a new thread because I thought not to mix the comparison with VISA and all.Sorry

              Can you give me a specific answer why it is returning FALSE??

 

Dennis,

              Before comparison I have placed a string Indicator.It also showing exactly the same value that I want to compare.But then also it is returning false.Can you  please          state the thing that you have understand,why it is returning FALSE.Is it it due to any other problem??please specify

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
Download All
0 Kudos
Message 63 of 189
(1,056 Views)

Because the first element of the array DOES NOT MATCH the constant you are comparing it to as mentioned by others in previous posts.

 

Your array element as a linefeed character at the end, the constant you comparing to does not.  There for Equals results in a FALSE.

0 Kudos
Message 64 of 189
(1,052 Views)

So how can we change the string constant to get  TRUE.??Or we have to change anything in the array??

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

Put the same thing in the string constant that matches what is in the element of the array!

 

 

Spoiler
Such as put in the linefeed character at the end of the string constant.Smiley Surprised

 

0 Kudos
Message 66 of 189
(1,049 Views)

The first element in the array is F9A42BB1\n.You mean we have to attach "\n" in string constant in comparison(that is F9A42BB1\n)??.I did it but then also it is returning false.

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

I have done the comparison like this by attaching "\n" after string constant.But no change.Do you mean we have to change any other??

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

For proper understanding I made a new VI with a string array and then compared a string constant with the first element.But whatever changes are made,it always points to false.Can you suggest a simple way to correct this?

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

@danil33 wrote:

I have done the comparison like this by attaching "\n" after string constant.But no change.Do you mean we have to change any other??


Well, LabVIEW strings have several display modes.

 

If your string constant is set to display normal mode, entering "\n" will add the two characters '\' + 'n' to your string.

If your string constant is set to display \ display mode, entering "\n" will add a single character with the ASCII code 10, which is a linefeed, to your string

 

This happened because you have not understood what you were doing when following my previous tip to right click on the string array control inside your array and select "\-Display Mode" in the popup menu. This will make the string display any non printable character with a backslash code where as in normal mode it will display a line feed as a line break and any other non printable character as a black box.

 

That all said, working through a tutorial is definitely not a bad idea. Learning by doing is fine, but some guidance is always helpful, and a tutorial can give that. I'm sure in the time you have made this thread a 70 posts thread (for a few very minor things) you could already have worked through quite a bit of the tutorials, have a more through understanding of LabVIEW than now, and be able to solve most of the things you have done so far in less than a day. And if you end up with questions, you would know how to ask good questions here. Your posts so far often lack to much relevant information to be able to give you a concise and helpful answer.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 70 of 189
(1,021 Views)