accuracy of digital data from LabVIEW

Hello!

I have a question about the accuracy of data, Labview, is perhaps a silly question, but it drives me crazy.

If I use a digital constant and I put for example 1 (I mean 1E-6), it looks like 1E-6 but I found that it is not really 1E-6, actually if I raise the precision and I use 17 digits, 1E-6-9, 9999999999999996E-7.

Could someone explain to me what is happening for digital data?

Thank you

It is one of the most frequently asked questions ever.

The trick is in how computers represent floating point value. I remember a lot of right answers already given in the forum, but I am not able to find the most comprehensive and clearest.

For example, one of the answers is here.

Tags: NI Software

Similar Questions

  • out of digital data from parallel loops

    I created a state machine which will choose a case of 0-23 with a forward and back button.  in each case, I try out a 6-bit word that will be different for each case. However, the data in each case will be displayed in the function of digital writing once you press the stop button. I unde stand I have 2 parallel loops, but I'm not sure how to get around this problem. Ive set my vi

    LabVIEW follows the stream, then your second loop will be waiting for your data of your stop button. Look for the producer / event examples using queues consumer who is a much better way to solve your problem.

  • import excel data to labVIEW, filtering and exporting to Excel

    LabVIEW dear specialists,

    I have about 2500 data each for acceleration and force stored in two excel columns of the worksheet as well as time data in another column. My problem is to purify my data of noise so I could generate thin sinusoidal signals for my thesis. I'm still new to labVIEW and I would like to ask for help to import my data from labVIEW, filter and exporting to Excel. Please help me. I enclose my data below. Thank you very much.

    froebaruch

    Hello!

    These could be good starting points:

    http://www.NI.com/analysis/Excel.htm

    https://decibel.NI.com/content/docs/doc-8226

    A few examples delivered with Labview, too.

    Kind regards

    Marco

  • Collection of data from more than an instrument via the same labVIEW program

    Hello

    I have a program whereby I collect data on a scale of and save the data in the text file. Now, I need to collect data of three identical scales and save the data. I wonder if it is possible to do so in the same program? I mean how to manage three ports and save three different text files?

    I enclose the current program. Communication with the scale series and I use VI:s. thanks in advance for the help = VISA)

    This is easily possible with a single program, and there are several ways to do so.  I recommend the following:

    1. Take data from these devices in a separate loop (this could be in a separate - VI, as well).  These loops should be state machines if you can start and stop the acquisitions in a clean way.  This assumes that the instruments are on separate ports.  If they are on the same port, you probably want to use the same loop.

    2. Write to the file in a single loop.  This, too, should be a state machine.

    3. Queues to send data from the acquisition of loops to the loop of file I/O.

    4. Use still another loop for your user interface.  It must contain a structure of the event.

    To do this, you will need to learn more about the State machines and producer/consumer architectures.  Start with the help of LabVIEW, then search these forums.  There are a multitude of implementations of State machines and producer/consumer architectures.  If you have the time, I highly recommend you learn and to use the classes in LabVIEW (requires LabVIEW 8.2 or later).  This will facilitate your work in the long term.

    Let us know if you encounter any problems...

  • How to read data from OM - 62 temperature/humidity data logger in LabVIEW?

    Hello

    I have an Omega OM-62 temperature/humidity data logger I want to communicate (initialize recording, reading/writing data, stop recording) through LabVIEW 8.6. The OM-62 is connected to the PC via a type B USB-miniUSB connector, and I have provided "Omega Recorder program Interface" on my Windows operating system. I called online DAQ support Omega but I was told that data recorders low level like this have not provided capabilities of LabVIEW, which I fully understand.

    My question is why I have to use their program to communicate to this device? If I knew the syntax program them used to connect to the device, why can't I use through VISA? Do I need to build my own LabVIEW driver from their supplied driver?

    Python is easier to apply to this scenario solution?

    How can I see the code "Omega Interface Progam recorder" on my Windows operating system is using to communicate with the OM - 62 sensor?

    I just want to know how this could or could not work because I think I'm missing some concept in my understanding of programming LabVIEW/novice. It would be easier to run my LabVIEW program and their program at the same time, but I just want to understand it at a deeper level.

    Curosity killed the engineer occupation,

    Zach

    P.S. I have attached a few driver configuration information, but I have no idea if this is useful.

    Unless the manufacturer provides a kind of programming interface or API to communicate with the device that you have trouble with your own software interface to it whether LabVIEW or Python or something else. This could be in the form of a driver dll, Protocol series modbus (etc. etc. etc.).

    If it is not condition / available and you really need to communicate with the device, you will need to look at using something like a sniffer USB/driver (software? hardware?) to try to intercept communications between their software and the device. You can then use this information to try to understand what the commands it sends and the responses received and how to convert data.

    Once you have that until now... I don't know what options are willing LabVIEW for control of USB device, but a proposal, I would say that you would need either a driver USB low level or you have to write your own driver in another language and that call from LabVIEW.

  • How to send data from CANOE to LABVIEW

    Hello

    I need to receive data from canoe in Labview.

    I prepared the VI (ex command.vi) sender and receiver VI (Simple UPD - receiver.vi) attached.

    My problem is:

    (1) when I run Canoe (arrested measure) and send the command start-> Canoe starts measurement. (OK)

    (2) when I run VI receiver and send the command Start-> receiver receives the command. (OK)

    (3) when I run the canoe, then run VI receiver and send the command start-> receiver VI receives command but DO NOT canoe starts measurement (canoe does not receive order). (NOK)

    I use the FDX Protocol (UDP-based) and it looks like canoe and receiver VI can work simultaneously on the same port (2809).

    How can I solve this problem?

    PS: Later I want to put the canoe in free run mode to control the Labview application so I need to work VI receiver with canoe.

    OK, now I get it.

    Is there a reason that you need three applications (transmitter + receiver + canoe) at the same time?

    Could not put the sender and receiver in a VI? That would solve your problem of port.

    Another way would be to send messages to general circulation, so canoe and the other VI can receive.

    A third option would be to send the message twice, once at canoe, once the receiver VI.

  • Strange behavior when using Labview to collect data from Tektronix oscilloscope tds8200

    I hit a wall in trying to understand this one. The problem I have is that my application will not start the oscilloscope when it should.

    I use an oscilloscope Tektronix TDS8200. My goal is to collect data from the oscilloscope using Labview waveform. First of all, my program initializes and configures the oscilloscope; This part of the program works very well.

    The second part of the program begins the acquisition of data with the function 'Tktds8k Start or Stop Aquisitions.vi', which is to press the button run on the scope. The function "tktds8k to Waveform.vi" is used and should ideally return data, which I connected to a waveform playback graph.

    When I run my program, the first part runs without a problem, but as soon as the program comes to the service get the waveform, the run button in the scope, which is green when running, turns off; the program then expires, and no data is collected.

    Here is where it gets weird. I went through the debugging to try to understand this point, and I put breakpoints on the beginning and get shape wave functions so that I could scroll through the last part of the program. The program continues with the departure function, and the button run in scope is green. The breakpoint for the function get the waveform is reached and when I press on continue, turns the Run button and turns it off then back on almost immediately. data are collected, the waveform graph appears and the program ends without error.

    I thought that the timetable could be the problem, so I did the program wait as long as five seconds between the functions of start and get the waveform and that did not work. I also tried to move the start function to before the configuration functions and remove start completely; no method worked.

    is there any ideas on why, the program works when I enabled breakpoints and isn't when breakpoints are disabled? I'm sure there is an easy solution, but I was not able to find a solution.

    I have attached a pdf that contains information about the functions of the Oscilloscope (tktds8k.pdf), and I have also attached my program.


  • How to read the data from a channel named in windows using labview

    Hello

    I need to read the channel named in windows data. The pipe is created by python by another application. This application post permanent data on the pipe. But I don't know how to read data using labview. is it possible to read the data from different application? If possible, how to start?

    Thanks in advance

    concerning

    RJ

    Hi Rolf,.

    It's just, because of driving is not initialized completely, pipe read returns error 42, I added 2 seconds late, then its work perfect.

    Thank you very much.

    Concerning

    RJ

  • How to transfer data from a DLL Delphi pascal class to a LabView data cluster?

    Hi all

    I have the following problem:

    I use a dll written in Delphi Pascal to transfer data to LabView by using the "Call library function node".

    My Delphi dll contains this class:

    TFlash = class
    Fi: TFileInfo;
    constructor Create;
    procedure LoadFi (Filedir_and_nametring);
    end;

    TFileInfo = record
    IDX:smallint;
    IdxLstSpl:array [0.4] of longint;
    Ms: Word;
    [0.4] SP:array of the word;
    end;

    I created the record datastructure of TFileInfo in a cluster of LabView to have the 'same' variable.

    My plan was to call a DLL Deplhi function with the "call library function node" and pass the address of the folder TFileInfo, so the data would be transmitted to the cluster of LabView.

    When I do a simple delphi dll function as this works because I only spend a small integer to Labview (without reference to the data structure):

    ...

    var data: TFlash;

    ...

    function GetNrOfRows(FilePath:_string):integer; STDCALL;
    Start
    Data: = tflash. Create;
    Data.LoadFi (FilePath); This function returns the number of lines in the selected file.
    Result: = Data.Fi.Idx;
    end;

    When I try to use this procedure instead of the above function, in order to pass the address of the data set structure complex 'Data' (TFileInfo), I am unable to get the information of 'Data' in my Labview cluster:

    procedure LoadFileInfo (FilePath: string;) DataPointer: Pointer); STDCALL;
    Start
    Data: = tflash. Create;
    Data.LoadFi (FilePath);
    DataPointer:=@Data;
    end;

    Parameters of call library function node:

    -stdcall (WINAPI)

    -Run in the UI Thread

    -Function prototype: void LoadFileInfo (PStr FilePath, void * DataPointer);

    * DataPointer--> Type: "adapt the type" and the format of the data: "pointers to the sleeves.

    * FilePath--> Type: 'string', format of the string: "pascal string pointer.

    I'm struggeling with this problem for almost a week now and I can't really find a solution on the forum or google.

    I also read the following posts:

    http://forums.NI.com/NI/board/message?board.ID=170&message.ID=229930&requireLogin=false

    http://forums.NI.com/NI/board/message?board.ID=170&message.ID=77947&requireLogin=false

    http://forums.NI.com/NI/board/message?board.ID=170&message.ID=51245&requireLogin=false

    (or did I miss something in these messages?)

    Hope my explanation is clear.

    THX

    A little further:

    Seems like it's not possible to pass data from Delphi to Labview through a DLL when I create a cluster with 2 bays in it in Labview.

    This part of Delphi, I've had to make in Labview:

    TFileInfo = record
    IDX:smallint; {integer; Convert tool}
    IdxLstSpl:array [0.4] of longint;
    Ms: Word;
    [0.4] SP:array of the word;
    end;

    Instead of using 1 cluster with all the different data in it, I did a unit (1) with my 2 items (smallint and word).

    To pass my data in my tables from delphi to labview, I created another group (2) in the unit (1) with 5 elements of longint (because my delphi is going to 0.4) and another group (3) in the unit (1) with 5 Word elements.

    Right-click on the unit (1) and the clusterorder in the right order. First the smallint, then the longint table, then the word and the Word table.

    When I then use this code in my dll Delphi, IT WORKS! :

    procedure LoadFileInfo (FilePath: string;) DataPointer: PtrTFileInfo); STDCALL;
    Start
    Data: = tflash. Create;
    Data.LoadFi (Copy (FilePath, 2, length (FilePath)-1));         --> I need to cut the first part of the pascal string because it's length, and I only need the string itself
    DataPointer ^: = Data .fi;       --> pass the record structure to the cluster of Labview
    end;

    Thanks for the info Ralf!

  • Sends data from LaunchPad MSP430G2553 Labview

    Hi all

    So, I have a MSP430G2553 LaunchPad and I want to be able to send data to Labview via USB to UARTusing.

    What I do in the MSP430G2553?

    Well, I wrote code that whenever I press a button on the LaunchPad it I send hollow text USB using UART. Using a program on my PC that monitors my serial port, I can confirm that, whenever I press the button, the text comes to the PC. I was also able to send commands to the monitor (it has a 'send the command' field) to the MSP430. If the connection works fine, between LaunchPad and PC.

    What I did in Labview?

    On the piece attached "" Labview_MSP430. "» JPG"you can see my code. Whenever I click on the "VISA resource name" there is no COM. It is said that "Refresh", and even when I click on it nothing happens. As you can see in the file "Device_Manager.JPG" PC can see my device in COM3 MSP430.

    So my question is, what should I do for Labview can see my device COM3/MSP430G3553? And then, my correct code so that it can read the port series?

    What is important is that the com port is visible in MAX (Measurement and Automation Explorer) and for the port is visible, you must install the driver NI-VISA.

    In your code, you must also add the VISA configure the Serial Port. Replace the VISA open with her. Inside the loop, you should not use VISA bytes to the Serial Port. The msp code must be set up to add a newline of endpoints (i.e.) and simply set the number of VISAS read of bytes to an arbitrarily high number. Playback will be automatically terminated when the character is detected.

  • Maximize the continuous digital data recording rate

    I'm trying to record digital data clocked outside large amounts quickly.  The data is only for post-processing.  What is the best way to get data from the port on the hard drive at the fastest possible pace?

    I connect using a PCIe 6537 B.  I log on 4, ports of 8 bits to 40,92 Mhz, so a rate of ~ 160MBytes per second.  I have two designs I've tried so far (a producer-consumer architecture and a DAQ.mx configure logging design).  Both models work if I connect only on two ports (effectively halfing the necessary flow) but fail to the width of 32 bits.

    My producer consumer architecture fails after about 30 seconds of recording successful message

    Error - 200613: Acquisition was stopped to avoid a crushing of the input buffer.

    My other DAQ.mx configures logging design fails quickly (~ 1 sec) with

    200361 error: Overflow memory on-board

    .

    I could be set it up incorrectly.  As I said, it works with 16-bit data width.  I don't know if the increase in the width of the data directly is the problem or if the increased flow to fail.

    I use this on a 3 GB ram windows xp using labview in 2012.  I have attached the vi of my two attempts and a picture of the DAQ.mx set the logging design.

    Well, I'd suggest the integrated PDM recording method would probably be you give best results, assuming that it works at all.  This record type opens a DMA channel of the material on the hard drive so it should not produce copies of useless data, which would probably be a producer consumer loop.

    I never tried logging TDMS without reading the data, a Read DAQmx should be used in the loop?  Your file contains TDMS data?

    The challenge of your hard drive?  It is a flat disk of laptop?  I recommend you test on a SSD, if possible, just to see.

    There are also properties to open up to a size of memory buffer.

    Start with one of the logging TDMS basic examples delivered with LabVIEW and work your way up from there.

  • How to read my waveform data from a file LVM?

    I have collected a form of wave and saved using the file LVM format. I would read the waveform in labview and view with its timestamp and assigned name. The only way that I could read the data in Labview was to convert it to an array of number. I thought that if you could write a waveform and save all data, you should be able to read it back quite easily. I have included my LVM file and two simple programs. The program I use is much larger, but these two programs are representative of what I'm trying to accomplish.

    Thank you

    Eric,

    I am pleased that you have something that can work even if it is not ideal.
    I close this service request, but I thought that I'll let you know that
    because of your issues, I have revised article in the Knowledge Base on
    timestamps and verified for accuracy and thought you should know.

    What is the precision of the timestamp of the waveform returned by my NOR-DAQmx
    Device?
    http://digital.NI.com/public.nsf/allkb/5D42CCB17A70A06686256DBA007C5EEA?OpenDocument

    Concerning

    Vince Methot
    Technical sales engineer
    National Instruments

  • Delay COM port, but it can read back data from MAX

    What short RX and RX directly, COM port can data from feedback on the test panel MAX, but still error display "time out What is the reason? Thank you.

    Hi Colin,

    When you read back the data, there is a parameter called "Bytes read" you need key, the default value is 1024, in this case, it will keep waiting for 1024 bytes until the timeout occur.

    I found a good article talk to this topic and you can change the bytes to be read in the test environment LabVIEW or MAX.

    http://digital.NI.com/public.nsf/allkb/874B379E24C0A0D686256FCF007A6EA0

    Let me know once try you it, thank you.

    Kind regards

    KwokHow

    AE OR Singapore

  • bind data to labview with excel spreadsheets

    I would like to save the output of a cluster (containing digital data or strings) in a specific format (each data in the respective columns)

    in an excel sheet.

    How can I do in labview?

    I tried mathscript, is there another way? If it is not u can suggest how can I use it to solve the problem mentioned above.

    Similarly, can I receive data in real-time from excel spreadsheets?

    pls suggest.

    I think you should use the ActiveX for the satisfaction of your needs.

    You can see this example

    \examples\comm\ExcelExamples.llb\Excel macro Example.vi

    Use activeX to write and read data.

  • Excel data in Labview counters

    I'm working on a project that requires me to read the data into excel and display this data using one of the numerical indicators of LabVIEW. I use Excel sheet Change.vi track to get data from Excel in LabView. However, I'm unable to display this data in a digital indicator. The question that I am running is that the data is in an array of strings 2D, and counters do not accept that numbers of unique value [I seek for dual-format]. Is it possible to access the values of individual table and display them with, say, a meter? I have 8 values of interest in table 2D.

    Thank you

    Michael

    Hi Michael,

    Here is an example of using the function of index table. I have a 2D array is read by a couple of functions of index table to display different values from him.

    Kind regards

    Perry S.

Maybe you are looking for

  • iOS 9.2.1 wifi problems (iPhone 5)

    Hello world still using my iPhone 5 as my main but lately known problems of major wifi phone: she just will not connect to my wifi unless I force to (the wifi menu to minutes until he shoes he has connected to wifi). When it shows then it is allegedl

  • Overheating and decommissioning

    I mostly work stuff - Rhino 3D and 3DstudioMAX - my problem is that the Satellite cannot simply make the scenes without materials - after that 2-3 min rendered my laptop automatically shut down... I can't show my models at all: (...) (1) how to impro

  • This books is already in your library error

    I have a manual I want to have available for my students, but it is too big to keep as an iBook. I have created as two iBooks, two-piece exported two files of ida. When I try to add the second book in iBooks to I get the error message "this book is a

  • New workflow 7 TO - load or dead?

    Hello. Received flow 7 (Signature Edition) a few hours ago. I plugged it in... but nothing happened, nothing appeared. I read a few threads, so I expect a loading for a few seconds, but the guarded white/black screen icon. Plug the adapter directly i

  • Laser Jet MFP M277 dw Pro: software updated, no, I can't print

    I just updated the software of the printer, and now it says memory error power.  It is on all 4 cartridges.  It was printing fine until that change the software.   I tried everything with no luck.  The print cartridges I have are cartridges HP no.