VISA to read/write COM1

Dear all,
This is a simple example to test VISA to read/write my COM1,
I have Labview 8.6 and even downloaded and installed the VISA441 again.
But it doesn’t read anything from COM1.
The error message is “timeout expired before operation
completed.”
I appreciate for your help.
Raymond
Attachments:
my visa write read.vi ‏8 KB

What are you communicating with?  Are you sure you have the right kind of cable between the two.  Between 2 PC's, you would need null modem cable.  Between a PC and another device, you might need a straight through or null modem cable, you would have to check the manual for the device.  Are you sure you have the correct communication settings?  Usually you would need a small delay between the write command and the read command to give time for the other device to read the command and turn around and send back a response.
Do you know what the return message is supposed to look like?  Does it need a termination character such as a line feed or CR/LF?  How are you running this VI?  It is set up as a one shot VI.  Are you using the Run Continuously button to run it?  I hope not.
You should really look at the examples in the Example Finder such as Basic Serial  Write and Read.

Similar Messages

  • GPIB reads/writes compared with VISA reads/writes

    Hello all,
    Being slightly new to LV (3 months of casual use, and 1 month of really getting to know it)...
    I was just wonder what the difference between VISA reads/writes and GPIB reads/writes.
    Actually this is my main question: Is the GPIB Write "data" parameter and the VISA Write "write buffer" parameter the exact same thing?
    Would I write the exact same command with either parameter and get essentially the same effect (if all parameters are correct?).
    I have a list of GPIB commands that I want to use to write drivers for  a PSA, and I really want to use VISA, and not have to change my paradigm of thinking.
    I would hope they are quite similar.  In fact, my research is telling me that GPIB is almost like a subset of VISA?
    Thanks for your help.

    The data you write with the GPIB functions is identical to the data you write with VISA. There are some things that are a bit easier to use the traditional GPIB calls but for 99+% of the time, VISA will do the trick. VISA was originally conceived as a common api for GPIB and VXI instruments. The first VXI instruments were basically the same GPIB instruments without a power supply and the user interface (buttons, screen, etc.) but they required different drivers. VISA permitted a single driver to be used for both types of instruments. Now, VISA has expanded to include serial, Ethernet, USB, and PXI and not having to change your "paradigm of thinking" is one of the big reasons that VISA is so widely used.

  • Slow performanc​e to read/write shared variables programati​cally

    We are using datasocket read and write functions to read and write shared variables programatically (in the same machine) but we only achieve a performance of aprox. 200 reads/writes per second. We are using Labview 8.6 with DSC.
    Is possible to get better results? That performance is normal?
    Any help would be appreciated. Thank you in advance.

    Hi MMCDAT,
    I think this value can
    be normal as you can see in this link:
    http://zone.ni.com/devzone/cda/tut/p/id/5037
    As you can see, the
    limit for datasocket depends on your Ethernet limitations, even if you as using
    it just in one PC:
    http://digital.ni.com/public.nsf/websearch/6AC9E65​734E53F9A8625672400637ECC?OpenDocument
    You can improve the
    performance changing the update mode or Vis configurations:
    http://digital.ni.com/public.nsf/allkb/F8F7DE98856​B50588625672400648045?OpenDocument
    http://digital.ni.com/public.nsf/allkb/2D9C6D73A16​0537986256B290076456E?OpenDocument

  • Error 33172 occurred at Read & Write data transfer between two or more PF2010 controller

    Hi,i need to do data transfer between two or more FP2010 controller.e.g. FP2010(A) & FP2010(B).
    FP2010(A) need to transfer the measurement (from its I/O module) to FP2010(B) to do the data analysis.These data transfer should be synchronous btw two controller to prevent data lost.
    From the vi used in the attachment,i encountered some problems at:
    (1) Error 33172 occurred while publishing the data.Can i create and publish data under different item name?
    (2) How to synchronies the read & write btw contorller?
    All controller are communicating with each other directly without the need of a host computer to link them together
    Is there any other method to do fast data transfer betwe
    en controller?

    Hi YongNei,
    You were succesful in omiting enough information to make it very difficult to answer!
    Please post your example.
    Please tell us what version of LV-RT you are using.
    Please define what you concider "fast data transfer".
    Have you concidered mapping the FP tags of FP2010(A) to FP2010(B) and vise versa?
    WHat exactly has to be syncronized?
    If you have something that is close to working, share that.
    Well, that as far as I can go with the info you have provided. Depending on the details, what you are asking could be anything from trivial to impossible with the currently available technology. I just can't say.
    It would probably be a good idea to start over with a fresh question (sorry) because not many people are going to know what a a "
    PF2010" is and I can not guarentee that I will be able to get back to you personally until next week-end.
    Trying to help you get an answer,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Urgent!!! Need help in file read/write data to a serial port

    Hi,
    I really need someone's help in order for me to complete my project. I have attached a vi which I have taken from an example and integrate to my project. In the vi, I have managed to get the encoder counts using Ni 9411. I need to read/write that data from ni9411 to ni9870 without using any serial port as they are connected to a NI 9104 chasis. May I know whether I am correct in writing the data to my ni9870 port using the vi I have attached? Does anyone know how i can convert the number of counts to a 8-bit data/byte so that I can send the data through the RS232 port? I really need someone's help as I need to finished in 2 weeks time.
    I have also attached an vi on controlling the epos2 controller using instrument driver. Does anyone know how can i integrate this vi to the fpga vi (the one which I need to read/write data to 9870) as I need to send those data to control my epos2 controller.
    Please help me!!!
    Attachments:
    Encoder Position & Velocity (FPGA).vi ‏23 KB
    SINGLEMOTORMODIFIED.vi ‏17 KB

    Afai,
    As I allready suggested you here, call your local NI Office and ask for assistance!
    You really need assistence in a higher level that we can provide via the forums. Otherwise I don't see a chance for you to finish your project in time.
    1. Convert I32 to U8 to write it to the 9870 could be done like this:
    2. The vi to control the epos2.
    There is NO way ( absolutely NO way) to port this vi to FPGA. It's based on VISA calls, uses an event-structure, both are not available at the FPGA.
    The only thing you could do is to analyze the VI, the instruction set and design an FPGA vi which handles the specific instructions you would need.
    I have no experience with epos2 and I'm not 100% sure if this would work as you would like to use it. And doing this needs deep knowledge of LabVIEW, VISA, Instrument Drivers, the epos hardware, FPGA programming, and so on... 
    Christian

  • Can I read/write global variables that are in other PC?

    I attach the vis and the executables.
    My problem is that when I run( continuosly, because in other way, I read the default value of the variable) getvalue.vi and setvalue.vi, I don´t have any problem, I can read/write the global variables, the two vis is running in the same PC.
    But when I do the exe and I run them continuosly , it doesn´t work.
    Any solution?
    Thanks in advanced!
    Graci
    Attachments:
    Get_Value.vi ‏30 KB
    Set_Value.vi ‏30 KB
    Exe.zip ‏272 KB

    Hello Bichillo,
    By running the vis continuously you are running into race conditions. If you cannot control when you are writing to or reading from a global variable, you cannot know whether the value writen/read is the right one or not.
    In your case the global variable value that is read is sometimes the last value writen and sometimes an empty string.
    To make the global variable behave as desired, that is, keeping its last value, the global variable must be in memory when you access it using VI Server. If it is not in memory, the returned value is an empty string. That´s why you sometimes get a non-empty string: when you access the global variable to read its value, it happens to be in memory because you´ve just writen to it.
    To ensure that the global
    variable is always in memory and it keeps its last value, you must include the global variable into your block diagram. I am attaching modified vis that implement this.
    Hope it helps.
    César Verdejo
    Training and Certification | National Instruments
    Attachments:
    Get-_Set_Value.llb ‏48 KB

  • What's the best way to read/write data from a file (preferabl​y a *.txt file)?

    As in the title.  l have revived a couple of old VIs to read and write three numbers and a 1D array of clusters to/from a *.txt file.  The functionality is not very user friendly, and it would also be useful if one could open the text files (manually - not through LabVIEW) and still be able to see/understand what was there.
    I was wondering if anyone would be able to come up with a more efficient and/or user friendly method (compatible with lv6.1) 
    James
    Never say "Oops." Always say "Ah, interesting!"
    Attachments:
    Read Spec.vi ‏110 KB
    Write Spec.vi ‏58 KB

    My primary goal is to have something that works and is easy and comprehensive to operate.  Generating a human-readable file is just a bonus but would be nice if it could be achieved.
    I enclose pictures of the initial file dialog (for both loading and saving the data - referred to as Spec(s) from hence forth), and of the front panel screen seen when  a) loading a spec and  b) saving a spec.  In the file dialog, you have to already know the exact string to input else you'll just be told the file doesn't exist (applies for both loading and saving).  When saving a spec, you cannot see any files previously saved, nor even any previous specs saved within the file.  This means that one can unwittingly overwrite specs without realising it.
    I'm not sure if I've explained this very well, but the current functionality means that far too much can go wrong.  Additionally, if you forget the file name, you'll have no way of knowing what it should be (the data files are stored on a 'locked' part of our network accessible only by Admin or through the LabVIEW executable
    Never say "Oops." Always say "Ah, interesting!"
    Attachments:
    File Dialog.JPG ‏23 KB
    Select The Required Test Spec.JPG ‏10 KB
    Name of specification.JPG ‏6 KB

  • Can TestStand open, read, write and close binary files?

    From a TestStand sequence, I need to open, read, write and close binary files. Does TestStand support this capability?

    Christine -
    In the past I have used the C/C++ Adapter to call directly into the CVI RTE functions. The CVI functions I have used are OpenFile, WriteFile and CloseFile. The functions are exported from the DLL as CVI_OpenFile, CVI_WriteFile, and CVI_CloseFile. I just had to make sure that on termination of the sequence, that the integer handle was properly released by calling the close function.
    If you are using LabVIEW, you could call directly into the low level VIs to do a similar set of operations.
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

  • FPGA Read/Write Control Issues

    Hello all!  Rather new to using FPGA, but I have an interesting issue that's popping up.
    Currently pulling in RAW voltage data from a set of sensors (Pressure Transducers, Load Cells, etc) through a cRIO DAQ.  Have the FPGA file setup to pull in that data already and have the main VI and all the sub-VIs working just fine.
    What I'm trying to do is save the raw voltage data (TDMS files) on the lower level and the convert and display on the upper level so that I don't have to convert and save (speed up saving data).  So that leaves 3 distinct levels/sections:
    On FPGA that pulls in the raw data
    On FPGA that saves the raw data
    Main VI that does all the controls/conversions/displays etc.
    Number two is where I'm having an issue.  I want to save all the data in parallel so I'm creating a save FPGA for each I/O device (8 Relays to command solenoid valves, 3 Pressure Transducers, 1 Load Cell, 4 Thermocouples).  To do this I want to create a separate VI for each device (not sure if that's a smart thing to do).
    The issue I'm having is when I use the FPGA Read/Write control to read in from the Target and save to the TDMS.  When I only use a single FPGA target reference the lines are broken, but as soon as I switch to two targets, it now works.
    Any reason why it might be doing this?  Any ideas/suggestions at all on how to go about setting this up in general?
    Thanks!

    Hi,
    HySoR wrote:
    The issue I'm having is when I use the FPGA Read/Write control to read in from the Target and save to the TDMS.  When I only use a single FPGA target reference the lines are broken, but as soon as I switch to two targets, it now works.
    Could you take a screenshot and post this part of your code? I'm having trouble understanding what you are describing.
    Craig H. | CLA | Systems Engineer | National Instruments

  • How read/write matlab style WAV sound file?

    The supplied LabVIEW WAV read/write VIs require fixed sampling rates (like 8000, 11025, 22050, 44100), and use integer data (so the waveforms take on large +/- integer values).
    I need to read/write WAV files that are like those used in Matlab with its wavread and wavwrite functions. Those can use ANY sample rate, and the waveforms have decimal values between -1 and +1.
    Could someone suggest either how to directly write these standard WAV files with an existing VI, or how to write my own VI to do this?
    Thanks in advance.

    That's a great help! Thanks. I have made the changes to the supplied NI VIs so that any rate can be used. The new read/write VIs are attached and seem to work ok.
    Best,
    F
    Attachments:
    Snd_Read_Wave_File.vi ‏128 KB
    Snd_Write_Wave_File.vi ‏110 KB

  • Read & Write to Buffer an Image

    I'm newbie.
    I try to program an application(digital image processing). And I want read/write an image from/to buffer (physic memory) or temp file. Is there any one can help ?
    Thank you very much!
    Sorry about my English.

    Hello Trung,
    I am very excited to hear that you are interested in using IMAQ Vison for your image application and thank you for using our discussion forums. To answer your question, you certainly can use IMAQ Vision to read from a jpeg or tiff file, run your algorithm for processing the image and then save back your results as an image. Some of the VIs you will need to use are IMAQ ReadFile.vi, IMAQ Write JPEG File.vi and IMAQ Write TIFF File.vi. These VIs can be used to read and write image files. There are some examples included with IMAQ Vision that demonstrate how to use these VIs. One good example on reading image files is ..\Examples\Vision\2. Functions\Analysis\Histogram Example.vi, included as an example under your LabVIEW folder.
    For your application you will begin by creating a memory buffer for your image using the IMAQ Create.vi then read the file using IMAQ ReadFile, process the images, save your file and finally deallocate the memory associated with your image using the IMAQ Dispose.vi. The memory allocation, file read, processing and dispose part of this process is shown in the example I mentioned above. For more information about vision concepts refer to the IMAQ Vision Concepts Manual. This is the manual for the newest release of IMAQ Vision 7.1.1, but most of the concepts should apply to your version of Vision.
    For information about using the different VIs and functions refer to the IMAQ Vision for LabVIEW User Manual installed on your computer and found under Start>>Programs>>National Instruments>>Vision>>Documentation. I hope this helps you out. If you have more questions I would encourage your to continue using the discussion forums or if you would like one on one assistance from an Applications Engineer contacting your local National Instruments Representative and looking into the IMAQ Vision Standard Service Program (SSP). Have a great day!
    Regards,
    Nipun M
    Applications Engineer
    National Instruments

  • Avi read write example : playback missing chunk of data at regular intervals

    Hi,
    I am writing a waveform data into avi write in order to read back (with has data input on) as in example avi read write with data shipping example but the graph played back is missing some amount of data at regular intervals and hence the waveform read back is choppy. 
    I am writing the same data into tdms also. when i read back it with tdms file viewer, it shows that it has entire data.
    note: i am writing the waveform data and avi in two seperate loops and using the porperty node value of the waveform data in the video loop in order to insert data into avi write (has data input on) and have the (wait ms multiple) input =10 in both loops
    i would like to post the video but it is 50 MB, is it possible to upload that much.
    can any one help me how/why this is happening..
    Thanks,

    Can you post a VI(s) as I have trouble understanding what you are doing
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Different read/write VI's

    Hello,
    I notice that in labview, I can:
    read/write to a SPREADSHEET
    This requires FILE_PATH and FORMAT
    read/write to a FILE
    This requires a FILE_PATH and NO format
    (because it is binary data)
    I can read lines... BUT I CANNOT write lines
    First question: why can I not write lines?
    Continuing... there are other ways to read/write.
    I can OPEN a file
    And, then I can read/write
    So: how is THIS read/write different from the ones above.
    I can see that THIS read/write requires a refnum from the
    open... OK... one structural difference...
    This one does not allow for formatting... but yields a BROWN data.
    Now, what is this DATA... is it binary?
    What is the purpose of the OPEN/read/write/Close
    on the second lines of the FIL
    E/IO vi's
    Can someone describe these and how they relate to each other?
    Thanks,
    Tom
    Hello,

    Tom Impelluso wrote:
    > Hello,
    >
    > I notice that in labview, I can:
    >
    > read/write to a SPREADSHEET
    > This requires FILE_PATH and FORMAT
    >
    This is called a TAB delimited file that most spreadsheet applications
    can read
    there is a TAB between columns and and EOL between rows. Writes in ASCII
    (I should say ASCII printable since all chars are ASCII)
    >
    > read/write to a FILE
    > This requires a FILE_PATH and NO format
    > (because it is binary data)
    Yep
    >
    >
    > I can read lines... BUT I CANNOT write lines
    >
    > First question: why can I not write lines?
    >
    I found this strange also but, you can use the Write Char or generate
    your own VI from
    the lower level VIS. Which would be using the Write Char and adding EOL
    as the last character in the line
    There is a VI called Write + (String) that does not show up in the
    palette but is used in some of the other VIs.
    >
    > Continuing... there are other ways to read/write.
    >
    > I can OPEN a file
    >
    > And, then I can read/write
    >
    > So: how is THIS read/write different from the ones above.
    It is a byte stream which could be almost anything from ASCII to G
    datatypes
    >
    >
    > I can see that THIS read/write requires a refnum from the
    > open... OK... one structural difference...
    > This one does not allow for formatting... but yields a BROWN data.
    >
    > Now, what is this DATA... is it binary?
    Not always but it can be. If you open an Excel file in a text editor you
    will see
    what a complex byte stream file looks like. The data is interspersed
    with formatting bytes.
    >
    >
    > What is the purpose of the OPEN/read/write/Close
    > on the second lines of the FILE/IO vi's
    these are the primitives that are used in all of the other file
    functions.
    This is the most basic level of what file I/O does.
    >
    >
    > Can someone describe these and how they relate to each other?
    The Open/Read/Write/Close are the primitves. The others are built up
    from these
    for special file types (like spreadsheet). They use the primitives and
    add some formatting
    and other options.
    Dont reply to this e-mail address. My account is down and I am using
    someone elses.
    Kevin Kent

  • What property settings to I need to set in order for VISA Serial Read to read ASCII exactly like the legacy serial read vi?

    I have successfully built a vi which communicates with a piece of equipment via the serial port using ASCII characters. I am trying to replace the older versions of Serial Read and Write VIs with the VISA Serial Read and Write VIs. The VISA Write works fine, but the when reading data coming from the "box", the VISA Read VI returns string data with foreign looking characters instead of the usual correct ASCII characters as shown by a dumb terminal which is in parallel with the serial data line. Is there a special property node which needs to be configured on the VISA Serial Read vi, or do I need to set something on the VISA Configure Serial port v
    i?
    Why aren't the VISA serial vis compatible with the older serial vis?
    Thanks...

    Usually, garbage characters are an indication of a baud rate or parity mismatch, or maybe a stop bit or number of data bits setting. Make sure that you have configured your port correctly with VISA Configure Serial Port. I have used VISA serial successfully many times.
    - tbob
    Inventor of the WORM Global

  • How can my FP-2000 read/write to my FP-1600?

    I want an FP-2000 to be able to read and write to digital I/Os on an FP-1600. I created an iak file that listed both devices and their channels. The vi worked when running from LabView for Windows, but when I tried to run it on the FP2000 it would not create tags for the channels on the FP1600. It did not recognize the existence of an additional comm resource or its devices, even though I was careful to download the iak file before running the vi.
    What do I need to do to get the FP-2000 to be able to read/write to the FP-1600?
    Rich

    OK, I answered my own question. I knew that I could read from the FP-1600 via Datasocket reads using the Lookout protocol, but first attempts to write values this way failed. I made some seemingly insignificant changes to my vi, and now I am able to write values as well as read them. It would sure be nice to be able to use the FieldPoint vis to read data only when it changes, but I can live with the datasockets.
    Rich

Maybe you are looking for

  • Unable to ping ESXI host

    I have an out of state Esxi 4.1 host that is working fine with 12 virtual servers on it. The problem is I cannot ping (IP or name) or connect to it using vSphere from my current location. The only machines which see the host are the VMs it is hosting

  • *insert new line item in sales order*

    Hi guys, I have requirment where, user would enter a material and system determines if free material is to be added to it. thats standard based on configuration. the user is maintaing ztable for additional free product for the material. now, i want t

  • Time machine stuck on 'calculating changes'

    I have been using Time Machine backups to a 2TB Time Capsule for over a year, and one of my 4 computers has recently stopped backing up. The other 3 are still backing up fine, and I ran disk utility on the Time Capsule which stated that it was workin

  • Help with Background Color

    Posting this for a second time - If I change the background color of my document, I can't see it, nor can I see the different fill colors of any symbols I add to Scene 1. The colors show fine when I run the movie. It is using the outline color to dis

  • IE problem with Lightbox

    Hi there. My question concerns http://www.energywa.co.za You can click on any of the 2 images on the right. When clickin in FF and Google Chrome, the lightbox works 100%. But, when trying it in IE 8, the image opens on the same page. When clicking an