How to convert string data from the serial port to double?

Hello!

I am very new in LabView and attempt to read data from an OHAUS pioneer pa-313 electronic scale via RS232 serial port. I use the VISA. I can read the data and see it as a string to the screen, but when I try to convert it to a double, it is just the integer and decimal numbers have disappeared. Here's the question: what can be the problem? How can I get the decimals as well?

What is your normal decimal point?. or?

Tags: NI Software

Similar Questions

  • Store data from the Serial Port in the buffer and then take action?

    Hello! Everyone,

    I'm new to LabVIEW and I take assistance from various videos and stuffs available online to get started with LabVIEW.

    But I have a duty, therefore needing help.

    initially I see some of the tutorial videos and learned about the LabVIEW interface, and does a little project to communicate with the Port series (receiving and sending data).

    Happens to my task.

    My LabVIEW application will send a few State request packets on my device or control and based on the response packet that I have to display values.

    The Structure of package is as

    Header, length, Op_Code, data Checksum

    There is no terminator as newline or carriage return or anything else.

    In C language, I read the data from the Serial Port, and based on the length, I conclude that I got the full package or not, and then by recalculating the checksum value, the integrity of the package is verified and then based on that Op-Code has been sent will be decided.

    (I'm dealing with hexadecimal data)

    But how can I do this in LabVIEW.
    A tutorial or any referece will be useful for me.

    1. I suggest that you learn to use Shift Registers instead of local and global variables.  They are much more efficient (memory and execution speed) and make it much easier to read the schema.

    2. you don't need this inside the loop property node.  Is there a way to configure a Serial Port to turn off the stop character.

    3. you don't need to wait for playback VISA will limit the rate of loop if no data is coming.

    4. Once you have the length, you simply read the rest of the entire message and process it at a time.  This will make things a LOT faster.

    5. you should really do this enum a def type so that you can ensure that all your enum constants have the same values.  If you need to add a State later, simply update your enum in the same place then.

  • How to convert binary data from the Panel controls in ASCII values?

    Hello

    I seemed to face a roadblock with how to convert binary values in ascii.

    I created this .vi to save all control values in an .ini file and call them at that time where I will carry out the .vi as shown in the file attached. Registration key to simply save the data and Cancel button discards all current changes.

    I would like to understand how to retrieve all the values of control to ASCII, so I assign to a global variable for later use. I've looked everywhere for a good reference document, and I couldn't find one that would explain my question. I would be greatly appreciated if someone could point me in the right direction.

    Thank you

    Sam

    I tried a simple way to save control values in the front panel

    Not reinventing the wheel, when there are ready to use of solutions, for example:

    http://sine.NI.com/NIPs/CDs/view/p/lang/en/NID/209753

    Use the MGI save & restore settings VI of the palette (for example, it records all the settings that have been changed in a graph, which is very useful) and the MGI Save (restoration) Front Panel data live (to save and restore control values in the front panel).

    Here is an example:

  • How to save data from the COM port to file?

    Hi all

    can someone tell me please how to save data from the COM port on file? I transfer 1 byte of serial port... attached is the image of the vi... very basic.

    I would like to save the data in a table... I mean, 1 data--> data--> data tab 2 tab 3rd--> tab

    and so on... can anyone help?


  • read data from a serial port

    Hello to everyone
    I use oracle forms 6i. I want to read data from a serial port. How can I do this?

    HII,

    You may search for any existing OCX or VBX component capable of doing this job.

    Better compliance
    Skyniazi

  • How to periodically send various types of data via the Serial Port?

    Hello! Everyone

    I have to send data to LabVIEW to my device on the Serial Port.

    I know how to send data on serial port in LABVIEW, I already have this part.

    Now the problem is that I have several types of data I need to question my embedded device, if I want to send the query periodically command.

    So lets say that my four Op Codes are the following, which will send four different types of query command to my device on the serial port.

    (To be honest only OP_LED and OP_SENSOR is used now)

    0, OP_SYNC

    1, OP_LED

    2, OP_SENSOR

    3, OP_FUTURE

    Structure of basic package is as follows:

    Header (0x2C), Checksum, length of the data (n bytes), Op_Code (1 byte), length (length of Code + data Op)

    For OP_LED, I need to send the package as follows:

    0x2c 0x02 0x01 0 x 00 0x2F (0x2F being the XOR checksum) (calculation of Checksum part is done and SUB Vi form)

    Length of the package this is 0x02

    0x01 is Op Code for OP_LED

    In the same way

    For OP_SENSORi need to send the package as follows:

    0x2c 0x03 0x02 0x00 0 x 00 0x2D (0x2D being the XOR checksum) (calculation of Checksum part is done and SUB Vi form)

    0x03 is length of packet here

    0x02 is Op Code for OP_SENSOR

    So, how can I do this periodically in labview, in such sort that period can be adjusted whenever necessary.

    Is there something in LabVIEW to do.

    I had done the reception and decoding part and working properly.

    http://forums.NI.com/T5/LabVIEW/store-data-coming-from-serial-port-in-buffer-and-then-take/m-p/32722...

    So I must implement read and write the part of same while loop?

    Do not insert in the table if you put data in an array at index 0.  Just use array to build.

    No need to have Visa to write don't be a part of wire to the wire of reference and error VISA go in the upper part.  These wires should go THROUGH the entry VISA.

    Don't your checksum requires all the bytes up through data?  Righ now, you only put the checksum on data bytes and forget the opcode and length bytes.

    Your sending is not the opcode for Opsync or Opfuture.  You just send the empty tables.  At the same time for the other two, you put the opcode in the data table.  All your original opcode in the table build thread.  Get the data out of these structures in case item which is supposed to represent the opcode.

    xpress_embedo wrote:

    Now it works but I have now two problems.

    (1) OP_SYNC and OP_FUTURE do not data, but still receive its data on serial port, can I do something here as I have nothing when the table is empty in the structure of the case.

    I do not understand this statement.  Perhaps my answer above will fix any issue you have here.

    (2) how can selection operation Code to be send is done using control façade but real application, this task should be automated to a certain frequency, like OP_LED package must go out to the serial port to 100msec and packet OP_SENSOR must go out to 1000msec, I do this.

    Now you agree a little more architecture.  I would encapsulate the code that is in the while loop as a Subvi.  Then with the hand of your program while loop, use two time Express VI, a game for 100 msec, the other for 1000 msec.  When an express VI is true, run the Subvi with a command set waiting for the answer.  When the other VI Express is true, have it run the Subvi with the other set of commands.

    The device responds with anything when you send these commands?  You only send data.  I see no VISA Read to be able to recover all the data.

  • How to convert raw data from files (not CameraRaw) of the lot?

    Hello

    I have a number of files that are images of raw data, which means that each has a header of a certain length, containing some info readable on the dimensions height/width, the bit depth and then only the data on the color of each pixel.

    CameraRaw does not open them directly, but they are rather loaded in Photoshop with a dedicated loading menu options.

    I can open one by one after extension *.raw which apply to them and typing height, width, depth and size header in loading options menu that opens, but I would like to know how to batch convert them rather than having to do this process for each of them.

    Of unfortunately Photoshop batch processing does not seem to be able to their treatment on its own, I guess that's maybe because they do not have the usual software-readable RAW headers found in several treaties formats.

    Thank you

    Alfred

    You may be able to write a Photoshop script to do this.  Script can access your files from file systems.  For example, a Script could rename a file to Name.RAW.  Then open Name.RAW in Photoshop with the logon options.    However, I do not know for sure there and options open to the adobe open raw file object.  You need to do this, read the script.

  • How can I transfer data from the database in a variable (or array)?

    I made my request according to the example (http://corlan.org/2009/06/12/working-in-flash-builder-4-with-flex-and-php/). Everything works fine. I changed a single function to query the database - add two parameters and get the value from the table to a string format. A test operation shows that everything is ok. If I want to display this value in the text box, I just do drag and drop off service to this element in Design view

    (< s:TextArea = "153" x = "435" id = "nameText" text = "{getDataMeanResult.lastResult [0] .name}" width = "296" height = "89" / > ").

    Also, it works fine, just a warning and encouraged to use ArrayCollection.getItemAt ().

    Now, I want to send the value to a variable or an array, but in both cases, I get an error: TypeError: Error #1010: a term is undefined and has no property..

    How can I pass a value to the database in a variable? Thank you.

    public var nameTemp:String;

    getDataMeanResult.token = authors.getDataMean (arrayOfNumber [0], dir_id);

    nameTemp = getDataMeanResult.lastResult [0] .name;

    public var nameArray:Array = new Array();

    for (var i: uint = o; i < 3; i ++) {}

    getDataMeanResult.token = authors.getDataMean (arrayOfNumber [i], dir_id);

    NomTableau [i] = getDataMeanResult.lastResult [0] .name;

    }

    And how do I use syntax highlighting in this forum?

    Astraport2012 wrote:

    Thank you.

    Then this simple question: How can I place a mySQL database data in a variable using the wizards FB4 (connect with PHP)?

    If you can show examples please.

    I couldn't find examples. Send data to a field text or DataGrid - much, but no variable.

    the use of assistants? not sure... it is generally a bad idea to rely on them, because they will never fully what you want anyway. I would recommend learning abit of PHP and manage by yourself, because it allows you to manage everything exactly as you wish.

    small example of communicating with a database using PHP + FB4:

    mount a database

    write you a small script that will access your database, get a value, for example:

    ";
    
        while($row = mysql_fetch_array($result))
        {
            if($row['messageID'] == "3")
            {
                print $row['message'];
            }
        }
        print "\n";
    ?>
    

    This will get the message with ID '3 '.

    make an HTTPService in FB4 app to call this Script, as follows:

    
    
        
            
    
            
        
    
        
            
        
        
    
    
    

    and the value must be picked up by the Script and properly stored in a variable

  • How to extract specific data from the user to view?

    Hello

    I have a requirement I need to display only the Session_user-specific data in the table. Scenario is that if the user belongs to a specific region should be able to see data for that specific region only.

    I think passing the session_user view query name but don't know if it of possible or not. If possible how to do this.

    What is the best way to achieve this?

    Thank you

    Angelica

    Hello

    If you use the ADF for authentication security, the user name is then accessible from the context of the ADF in British Colombia ADF. You can then

    1. create a view of the criteria in British Colombia ADF to a specific view

    2. set the display criteria to use a variable binding

    3. use groovy to add the value of the bind variable

    -set the type of value of 'Expression '.

    -Add adf.context.securityContext.userName

    4. go in the Module--> Application data model

    5 Select the instance of the View object

    6. press on "change."

    7. Select the view test

    If you download the example in this article: Oracle ADF: security for everyone so you see that users have a profile page containing data for the authenticated user. Sound by using the method described above

    If you do not use ADF security you can always use this approach. Instead of providing the value of the variable bind using Groovy you can run the view object using executeWithParams operation in this case, you can read the value of the authenticated user to the side view ADF. The binding variable would not be set to the Expression in this case though.

    Frank

  • How to back up data from the iphone water damage over 6 sec.

    I dropped my iphone more than 6 s in sea water, and it seems capable of lighting (which shows a black screen). I'm trying to back up data. When I connect the iphone with the computer, the following prompt box appears on itunes. Now I'm confused. Could someone answer my questions please?

    1. This means that my iphone is still able to turn it on?

    2. that means that only the screen is broken and the motherboard still work?

    3. How can I save the data without entering the password by using the touch screen?

    Thank you very much.

    This means you should STOP PUTTING ELECTRICITY through your phone untreated, ack!

    Your phone has a display problem, but yes - it lights up.
    Perhaps your problem is just a bad screen (which is unfortunately a part of $250 to a 6 sec more now).  Apple cannot help you with other water damage that offers to sell you an iPhone refurbished for $349.

    But most likely, your problem is also on the logic board - usually fixable.

    There is no way around the need for touch operation and the image on the phone to access the data.

    In order to access the data on the phone, you need your advice to hold the power and start, (it does) you need of your screen image lines, and you need to contact work.  Ideally, you would also have your backlight lines works as well.

    Most of the phones in this condition have a pretty good shot in data recovery in this situation - touch, and line of the image problems are usually solvable if your phone can be detected by iTunes.   It is certainly not DIY work, this is a troubleshooting open-ended the microsoldering and level of card issues.

    Your only option for recovering data would be to find a good microsolderer experienced in data recovery.

    I recommend to replace any phone which has seen water, corrosion on the Board always weakens solder everywhere, so the phone is likely to have a shorter duration of life more problematic.

    Note: It may be possible to cancel your option for the swap of OOW $349 at Apple if you continue recovering data at the level of Council - although I've never seen this happen.

  • A satellite will not start - how to back up data from the HARD drive?

    Hello
    My laptop won't turn. How can I take backup of internal hard drive?

    Please read my writing as soon as POSSIBLE

    If you n t have access to your saved data remove the laptop HARD drive, connect it to the other PC as external device and you should have access to all stored data if the HARD drive is not defective.

    What you need is USB 2.0 IDE 2.5 HD enclosure disk hard drive / external case/Box.

  • Got the new iPad, how do I transfer data from the old, he asked about I tunes version!

    IM lost with this set up help me support

    Transfer the contents of an iPhone, iPad or iPod touch to a new device - Apple Support

    Tells you how to transfer info

  • How we can encapsulate data from the report

    Hello
    I use shape with report

    in the report, there are five columns

    first name
    family name
    address
    student card
    class

    address is too long, how can I wrap this up so that the report attractive


    Thank you
    Nisha

    Change your column and type the following line in the css of the column style:

    Display: block; width: 200px; overflow: hidden

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • How to convert before logo from the front (front view) in side view (whether from the right or left side) and the target surface (model shirt ex.)

    Hello..

    Dear all masters.

    I would like to ask, I'm currently is using Adobe Photoshop CS4and find a problem with editing a logo (which I raised him). As seen in the image of the logo I want to change is face to face, and I don't know any command, a tool or menu to transform into logo side view and integrate with the surface of the shirt.

    Please help me,

    Any useful response would be appreciated,

    Concerning

    Ask in English.jpg

    Try the buckle part of the third good logo or half. Using a displacement map can also make your façade more real looking.

  • Sending data through the serial port and the mscomm control is not the same as the original data

    Please find attached the mscomSerialWrite2.vi and the resulting image.

    Try it and find that when data "FFAE" 4040 EA41 D8FF is sent,

    the received data are "FFAE" 4040 EA41 3F

    I tried other data, the result is as follows:

    sending: 4164 8163 4341 03 receive: 41 64 81 63 43 41 03 leadK
    sending: A143 B245 6AAA BBCC receive: AA BB 00 A1 B2 45 6a 43 result: NG
    sending: AAAA AAAA AAAA AAAA AAAA AAAA receive: result AA AA AA AA AA AA AA AA AA AA AA AA K
    sending: A1A1 A1A1 A1A1 A1A1 A1A1 receive: result A1 A1 A1 A1 A1 A1 A1 A1 A1 A1K
    Send: FFAE 4040 EA41 D8FF receive: FF AE 40 40 41 EA 3F result: NG
    Send: FFAE 4040 EA41 D8FF AA23 AB33 A233 AAAA A404 ABCD A2CD A22D B22C receive: FF AE 40 40 41 EA 3F 3F 3F 3F AA AA AB CD A2 CD result 3F 3F 3F: NG
    Send: FFAE 40A 2 SDAC AETS receive: result FF AE 40 A2 CC DD EE 00: NG

    Please help me solve the problem.

    According to Microsoft, you want something with non-printable strings as an array of bytes, not a string.  I don't know that it will make a difference in this case, but may be worth a try.

Maybe you are looking for

  • Cannot start normally my Qosmio

    All my programs crashed once and I had to click on the turn-off/on button and shut down the computer. I started the computer, but then she does not even recognize my code. I restarted again, and the computer started something repair. Then he asked ho

  • Satellite L650 - error while upgrading Bios V1.90

    Hello I got a message via the Toshiba Board on my laptop Satelite L650 BIOS update. New version 1.90. So I did it, the download was successful, I then click on install and a screen opens for Insyde Flash, it starts "initializing" and the following er

  • Refunds for iTunes

    I bought one as a gift, but accidentally bought album on my I tunes. I don't want the album. How can I get a refund?

  • How to uninstall Microsoft security customer

    How to uninstall Microsoft Security customer?

  • Uninstalling Versions of C++

    I have all these versions of C++. Which ones can I uninstall? I have so much, it's because when I updated C++ in windows update, it altered or modified files .dll, a game I play (not 100% sure that's the reason). So I downloaded the latest versions.