Jump to content

question on "Type cast"?


Recommended Posts

The "typecast" has 3 "pin", 1 for input, 1 for output, and the last one for the type that the data trasform into, that's what i've learn from LV Help. But what kind of controls should i connect with the "type" pin? I've seen in the "serial61.vi" that the programmer does not connect any thing to the "type" pin (he use it to convert a number to string) . Another question, so what can i do if i need to do it reversely : convert a string read from serial port to a number. Thans for helping me and excuse my bad English.

Link to comment
The "typecast" has 3 "pin", 1 for input, 1 for output, and the last one for the type that the data trasform into, that's what i've learn from LV Help. But what kind of controls should i connect with the "type" pin? I've seen in the "serial61.vi" that the programmer does not connect any thing to the "type" pin (he use it to convert a number to string) . Another question, so what can i do if i need to do it reversely : convert a string read from serial port to a number. Thans for helping me and excuse my bad English.

The reason they do not have to pass in a type when converting to a string is because a string is the default type to convert to. If you need to convert to anything else, you have to pass in the type. To convert form string to a number you pass in the string on the input and a number into the type (any number...all it needs is the type of the data, it doesn't use the value).

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.