LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

what does this mean?

a very simple question, What the attached image mean? a converter? I can not find the meaning of that?

Message Edited by happybird on 07-19-2007 02:21 PM

0 Kudos
Message 1 of 13
(3,569 Views)
That is the type cast function.  You can cast data from one type to another, but it is considered an advanced function.  Is there an application you need it for or is there a problem you are running into?
0 Kudos
Message 2 of 13
(3,558 Views)
... you can always right-click it and select "help". 😄
0 Kudos
Message 3 of 13
(3,546 Views)
I see, but what the input of the "type", I try to input "string", "numeric", but it doesn't work.
0 Kudos
Message 4 of 13
(3,542 Views)
What code do you have.

As mentioned this is an advanced function and should be used with caution since there's no error function.

It will only change the interpretation of the data not the data itself!

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 13
(3,536 Views)
For type, you need to wire something that has the same datatype as your desired output. The input an be anything.
 
For example,
  • if your input is a string and you wire a string (any string) as type, it will just return the same string.
  • If your input is a string and you wire a U32 as type, your output will be U32.
  • If your input is a string and you wire an array of U32 (even empty) as type, your output will be an array of U32.
  • If your input is a DBL and you wire a string as type, your output will be a string of lenght 8.
  • ...

If you say it does not work, it probably means you get broken wires. This can happen if you wire an output that does not match the type. Adjust accordingly!

 
0 Kudos
Message 6 of 13
(3,525 Views)


@happybird wrote:
I see, but what the input of the "type", I try to input "string", "numeric", but it doesn't work.

 
Make sure you don't wire a string with the words "numeric" in it as type. That's still a string. 😄 You need to wire "something" with the actual datatye.
 
It can be virtually anything, here are a few examples:
(If you would place the lower two in sequence, you would get the original string back!)
 
It can even be a complicated cluster as in this image:
 
The possibilities are endless. 😄
 

Message Edited by altenbach on 07-19-2007 01:06 PM

Message 7 of 13
(3,517 Views)
The code I have is as attached.
0 Kudos
Message 8 of 13
(3,480 Views)
And where should the code be changed?

What's wrong with it?

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 9 of 13
(3,474 Views)
Are "A U32 B U8" a data type?
0 Kudos
Message 10 of 13
(3,476 Views)