Jump to content

Is it possible to store HexString in INI file


Recommended Posts

You could store it as what I call ASCII Hex.  You use 2 ASCII characters per byte to represent the value.  You can then use Scan From String or other string manipulations to convert that to a U64 or byte array.

Link to post

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 A Scottish moose
      Hello all,
      My question is: what is your preferred non-volatile way of storing daqmx task configurations? 
      Backstory: For a long time I've used ini files to maintain task configurations between executions of a program. This has worked for primarily static DAQmx configurations but I'm looking at creating a test executive with some degree of flexibility, which means daqmx task configurations start to get more complicated.
      If you use MAX for storing your tasks:  Do you run into problems accessing and maintaining these tasks even though you don't have direct access to the file?  Or is there an unlisted storage location for these files?
      If you use ini/text based files:  How do you keep things orderly?  I'm running into all kinds of limitations with the format.
      If you use XML: Where did you find your schema?  Did you write it?  I know NI saves tasks as XML files, and so therefore the schema exists, but I haven't been able to figure out how to use it.  I've created a task in my project and then dug through the XML of the project to find the attached image.  I believe this would be the ideal solution, but a little bit of digging in around NI.com (I know...) and google (actually useful) has resulted in no answers.
       
      I know there is an elegant answer to this question, I've just not found it yet.  Thanks in advance for your comments. 
       
      Cheers,
      Tim M


    • By Randy_S
      Good morning,
      I have a DLL I created (in Labview)  that takes in string information, does some magic crunching on it to create a password that is passed out as a string.  This DLL will be called from CVI and probably from a C# application.
      This should be so simple, however I cannot figure out how to pass the string in and get the modified string out of my DLL.
      I've had no luck at all getting this DLL to work by trying many different things.  It crashes LV, returns and error, or simply passes nothing out during my trials.
      I've included the project (its small) in zipped format.  Can one of you kind souls take a look at my code and tell me what I'm doing wrong, or what I need to do correctly to both, configure the DLL and then call it from LabVIEW?
       
      Thank you!
       
      Randy
      Password Generator.7z
    • By Manudelavega
      As far as I now there is 2 way to define how to format a numeric into a string using the floating point representation (%f):
       
      - Setting the number of significant digits (%_2f)
      - Setting the number of digits or precision (%.2f)
       
      However I often find myself in the need of a way to define the width of the string. For example I always want 3 digits maximum. Using significant digits won't work if the number is 0.0012 since this only has 2 significant digits, so the string will be 0.0012 even though I would like to see 0.00 (so 0 if we hide trailing zeros).
       
      On the other hand, using digits of precision won't work if I have a number like 123.45 since it has 2 digits of precision, so the string will be 123.45 even though I would like to see 123.
       
      Now the obvious brutal way would be to use a string subset and only keep the first 3 digits (I guarantee that my number is never bigger than 999). But I really hope there is a more elegant way. I can't imagine that nobody has run into this requirement before. How did you tackle it?
    • By piZviZ
      I am able to read HEX file into Labview using read from Text file..I am getting data into labview in terms of string.
       
      Problem =>  Now i want to load this HEX file into microcontroller using VISA-rs232 .Is it require to further conversion or i can load HEX file(in form of string) directly into microcontroller ?
      rs232.vi
    • By Majo
      Hello, 
      I need a little help. 
      I want to send from LabVIEW to Arduino via serial port the string for example "ABC" and so on. 
      The problem is that when I send the string from LabVIEW .......the Arduino do nothing. Sometimes shows some kind of sign.
      When I send the string via Visual Studio it works perfectly.
      Is there someone who can help me.
       
      I attached picture of vi and Arduino code
       
      Thank you very much.   
       
       

      Arduino code.txt
×
×
  • Create New...

Important Information

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