LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Variant to data with visa ressource

Hey!

 

I am just going trough the "continuous measurement and logging" example with QMH - step by step on one monitor and rebuilding it on the other monitor.

 

At the moment I am struggeling with the "variant to data" function.

image.png

What I try to do here is (just a snip-it), that I have an UI queue for all my settings and all the general things I need to care about. For every instrument I want to use I do extra while loops. Finally followed by a logging queue or anything like that.

For references to my visa instruments I want to use a type def (cluster -> visa session) and hand it over to the other loop by a message into the desired loop. Here I use "variant to data" to translate the message based on my type definition and add it to my shift register loop for hardware reference (as it is also done in the code example).

I added the "variant to serial data" function to see what he translated.

image.png

"UI Typedef" is the information of the reference in the UI loop.

"Erfassung Typedef" should be the same as "UI Typedef" if it's working.

"Nachrichtendaten" is the message in send over to the instrument loop (and it shows the data I need USB0...).

 

"Daten-String" is the information out of the "variant to serial data" function and shows maybe the problem. There is a " &" added in front of the adress and I don't know why.

 

Maybe you can help me. Anyway I want to wish you a merry merry xmas (peaceful and blessed!).

 

Greetings,

Fabian

0 Kudos
Message 1 of 5
(3,883 Views)

Hi Fabian,

 


@fabian.gerlach wrote:

"Daten-String" is the information out of the "variant to serial data" function and shows maybe the problem. There is a " &" added in front of the adress and I don't know why.

Because "Variant to flattened string" (as that function is named!) converts the whole variant to a string.

And that variant contains more information than just that USB0-string…

Best regards,
GerdW


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

Hi Gerd,

 

thanks for your reply.

 

But what am I doing wrong?

0 Kudos
Message 3 of 5
(3,850 Views)

Hi Fabian,

 


@fabian.gerlach wrote:

But what am I doing wrong?


Nothing.

It's just like that!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(3,844 Views)

Hi Gerd,

 

but it is working on the official NI example and it's not working for me. Why? 🙂

 

Edit:

 

Nevermind. I did it. Somehow I had a wiring issue and it's fixed now.

Sorry for stealing your time!

 

Merry Xmas.

0 Kudos
Message 5 of 5
(3,837 Views)