Jump to content

Access element of variant data set


bigl00z3

Recommended Posts

I'm trying to create a simple data aquisition VI with 8 imputs.

I've used the Producer/Consumer Design Pattern (Data) template.

In my producer loop I'm writing the signals to a file.

In the consumer loop I'm trying to display the values of the differents signals on my interface.

I'm trying to access one of the element of a Variant data set from the queue. The Variant Data set has the folllowing structure:

<Dynamic Data

{[8]

(<Waveform(DBL)

{...}>, <Waveform(DBL)

{...}>, <Waveform(DBL)

{...}>, <Waveform(DBL)

{...}>, <Waveform(DBL)

{...}>, <Waveform(DBL)

{...}>, <Waveform(DBL)

{...}>, <Waveform(DBL)

{...}>)}>

I've tried to use "Variant to Data" but I can't find a way to set the correct type.

How can I "split" it so I can display the values on my Interface?

Is there an easier way to do it? It may seem logical, but I'm new to Labview... so excuse me for "stupid" questions...

bigl00z3

Download File:post-6798-1163665036.zip

Link to comment
I've tried to use "Variant to Data" but I can't find a way to set the correct type.

How can I "split" it so I can display the values on my Interface?

Is there an easier way to do it? It may seem logical, but I'm new to Labview... so excuse me for "stupid" questions...

bigl00z3

Hi,

Do you really need to pass the dynamic data in the queue?

If not, then just feed the queue with the DBL-array you get from the "Convert From Dynamic Data" node. In the lower loop, set the array constant to an array of DBL (instead of U32) and use this in the "Variant To Data" node.

Good luck!

/J

Link to comment
Hi,

Do you really need to pass the dynamic data in the queue?

If not, then just feed the queue with the DBL-array you get from the "Convert From Dynamic Data" node. In the lower loop, set the array constant to an array of DBL (instead of U32) and use this in the "Variant To Data" node.

Good luck!

/J

Thanks a lot,

You were right, that fixed our problem. We can now start aquiring our data.... :rolleyes:

bigl00z3

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.