Jump to content
Ravinath

ASCII into Hex

Recommended Posts

Hexadecimal as in an array of numeric values? The String to Byte Array primitive does that.

Share this post


Link to post
Share on other sites

You need to be A LOT more specific.  I have seen at least 5 different definitions of "hex".  Do you have an example of your data coming in and what you expect out?  Doing this with a VI whose controls and indicators have set default values is by far the best way.

Share this post


Link to post
Share on other sites
10 hours ago, crossrulz said:

You need to be A LOT more specific.  I have seen at least 5 different definitions of "hex".  Do you have an example of your data coming in and what you expect out?  Doing this with a VI whose controls and indicators have set default values is by far the best way.

hye. Is the below block diagram is correct? if correct means why i cannot construct it in labview?

Screenshot 2018-02-09 14.13.40.pngScreenshot 2018-02-09 14.17.53.png

Share this post


Link to post
Share on other sites
5 hours ago, Ravinath said:

Is the below block diagram is correct?

How are we supposed to know?  You still have not told us what you expect as an output with a specific input.

 

As far as what is different between the two pieces of code you have there, you need to wire up an I32 constant to the top of the Type Cast, not a string.  It will adapt.

Share this post


Link to post
Share on other sites
On 2/9/2018 at 3:26 AM, crossrulz said:

You need to be A LOT more specific.  I have seen at least 5 different definitions of "hex".  Do you have an example of your data coming in and what you expect out?  Doing this with a VI whose controls and indicators have set default values is by far the best way.

hye.actually i need to insert the following hex instruction packet as an input of the uart tx. can you help on this.thanks

Screenshot 2018-02-26 14.55.24.png

Share this post


Link to post
Share on other sites

Do as ensegre shows or just use a normal string constant and set the display style to "Hex".  Then type in those hex values.  I also highly recommend you set the Visible Items->Display Style to make it more obvious that you are looking at the hex values and not ASCII characters.

Share this post


Link to post
Share on other sites
20 hours ago, ensegre said:

b.png

hye...when i create a constant for the byte array to string i can't add the hex inputs.how to create it?

Share this post


Link to post
Share on other sites
On 2/27/2018 at 4:46 PM, ensegre said:

Right click -> Visible Items -> Radix

Left click on d -> Hex

hye. if i want to create serial communication in labview to turn on the g15 cube servo is the below construction is correct? im using GD02 rev2.0 driver for the servo.

G15 Driver.pngScreenshot 2018-03-03 17.29.28.png

Share this post


Link to post
Share on other sites

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.