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.


  • Similar Content

    • By David Akinpelu
      I am implementing a TCP connection between MyRio(client) and Python(server). The goal is to send data from the server to the client, perform some calculations, and send the result to the server. I need to keep changing the data being sent to the client. I noticed the first data works fine and the result returned to the server, but the client could not read subsequent data. I debugged and was able to detect that the error is coming from the first read function is the "Reading values subvi"  but I don't know how to correct it. How do I go about it?
      I have attached the files below.
      Reading Unknown Bytes from TCP.vi Second_client.vi SimpleServer.py
    • By Deon
      The Threshold Hysteresis VI allows an input (for example, a sensor) to drift out of an inner limit without generating an invalid flag, but if it drifts outside an outer limit it then becomes invalid. For the reverse, when the input crosses back into the outer limit it remains invalid until the value falls inside the inner limit.
      For simplicity, only one input parameter is provided for both the inner & outer limits, and is negated for the lower limit, as generally tolerance limits are equidistant from the nominal.
    • By Deon
      View File Threshold Hysteresis v1.0 LV8.6.1
      The Threshold Hysteresis VI allows an input (for example, a sensor) to drift out of an inner limit without generating an invalid flag, but if it drifts outside an outer limit it then becomes invalid. For the reverse, when the input crosses back into the outer limit it remains invalid until the value falls inside the inner limit.
      For simplicity, only one input parameter is provided for both the inner & outer limits, and is negated for the lower limit, as generally tolerance limits are equidistant from the nominal.
      Submitter Deon Submitted 11/10/2014 Category General LabVIEW Version License Type  
    • By jossie
      Hello I am quite new to labview and I have some questions regarding labview. We have came up with a simulation build in labview as shown in the folder. However, we will be making use of Myrio to connect current and voltage sensors to send the data to labview when labview is running. We are currently having difficulties trying to search if it is possible to send the wave files and the popout messages ( messagebox.vi and Player2Wins.vi) to NI Dashboard for Labview in Ipad by using myrio. Is it possible for myrio to store wave files and the additional VIs and sending these to NI Dashboard for Labview? 
       
      Otherwise, it is possible for Labview to send the entire program.vi, messagebox.vi and Player2Wins.vi to cloud and people are able to see the GUI in program.vi remotely? ( We have found information like Labview web services etc. We hope that people are able to view our GUI and press the " Press start" button as well as closing the popout messages in a website not from our local network). 
       
      I sincerely apologize if what I am asking does not make sense to people who are reading this. I hope that someone will help me with this as it is very difficult for me to do and I need some guidance from people who are familiar with these. Thanks for taking your time to read and your reply. 
      Simulation_Build_(3).zip Pop-up_Message.vi Player2Wins.vi
    • By edupezz
      Hello, i created a new tips repository in:
      https://edupez.com/
      English and Portuguese
×
×
  • Create New...

Important Information

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