Sync write with Visa 2.6/LabVIEW 6i

I setup a vi with 2 parallel paths; one sends 100 bytes at 300 baud to COM 2, and the other 100 bytes at 9600 baud on COM 3. The path for 9600 baud should complete before the 300 baud path, but no matter what setting I select for VISA write (sync/async), the 2 paths will not run separately.
What am I doing wrong?

LabVIEW-man:
You're not doing anything wrong, at least not based on what you've said here. Asynchronous Serial VISA writes aren't really completely implemented in NI-VISA 2.x but we're working on a better implementation for our next version (NI-VISA 3.0). Fortunately, there are a couple of possible solutions (workarounds) for you in the meantime.
1) Put each VISA Serial write in a separate VI in a separate LV execution system. You can set this in the VI properties. LV will then call each VISA Serial write from a different thread. This is not the most elegant solution because it requires you to redo parts of your code.
2) Assuming this is Win32, go into MAX and choose Tools>>NI-VISA>>VISA Options. Change the Minimum Async Transfer field from 102
4 (the default) to something lower like 64. NI-VISA will then perform the Serial writes in separate threads even though LabVIEW makes all VISA calls to viWriteAsync from the same thread.
Regardless of your platform, you should probably call VISA Set Buffer Size with mask 32 (I/O output buffer) and set it to a non-zero value. The default is 0, which tells VISA to not return from a VISA Write (sync or async) until all data bytes have been sent from the OS to the UART. In this way it is equivalent to other buses (such as GPIB) and if you are doing a query then you can immediately start your VISA Read operation. If you set the output buffer to a non-zero value (the exact value really isn't important because most OS's ignore it), then VISA will let its Serial write operations potentially return sooner. You should then call VISA Flush Buffer with mask 32 to guarantee that the data has been sent. This last part will likely *not* change in 3.0 because most users prefer knowing that th
e data has been completely sent.
Hope this helps,
Dan Mondrik
Senior Software Engineer, NI-VISA
National Instruments

Similar Messages

  • Working with VISA resources in Labview 6

    I am having difficulties programming through VISA in Labview 6.0.2. I have installed MAX 3.2, and have configured my two devices going through USB:
    1) an Agilent 82357A USBtoGPIB adapter connected with an Agilent 53131A Universal Counter
    2) a USBtoRS422 converter registered as serial COM4 connected with a Rainin Peristaltic pump
    I can open communication with both devices from within MAX, and send/receive data with no problem.
    When I try to program in Labview 6, I cannot communicate with either VISA device, even though I am using VISA instrument IO vi's with the configured VISA resource name from MAX. I'm not sure what I'm doing wrong.
    Is there an incompatability between MAX 3.2 and Labview 6.0.2, or have I configured something wrong?
    Thank you for the assistance.

    Hello,
    I think we can defeat the problem with Device 1 fairly quickly. If you have established that you can communicate with the device in MAX, I think we simply have a small programmatic change to make in LabVIEW. I am interested in having you attempt using the VI I have attached, which allows you to specify the bytes you would like to send in an array, and then simply sends the corresponding the string of ascii characters (the characters corresponding to the values in the array); this way we can be sure to send exactly what we would like. The following link has an ascii table in it, which you can use as a reference when putting the values into the array: (where the first byte specified will be the first character in the string)
    http://www.ni.com/pdf/manuals/371253a.pdf
    Simply change the VISA resource name to reflect your device and give it a try.
    As for Device 2, let's try using the same VI (attached) and write a command which the device is known to understand. A simply query would be approprite, where you can write using the attached VI, and then read using another VI which literally only has a VISA Read function in it (and a resource control or constant connected with your resource specified).
    One thing to verify before reposting is whether the devices you have use EOS (end of string) and/or EOI (end or identify) termination of GPIB operations. For EOS, a character is sought by the listener to indicate the end of a transmitted string, such as a linefeed or carriage return (or both). EOI termination is defined by the talker asserting the EOI line when the last byte to be transmitted is sent; the listener knows it has received the last byte of that transmission.
    Definitely repost; it is likely that we are only few programmatic changes and perhaps a spec check (for the devices) away from dependable communication
    Thank you,
    JLS
    Best,
    JLS
    Sixclear
    Attachments:
    WriteByteArray.vi ‏14 KB

  • Vision builder AI 2011 incompatib​le with Vis created by Labview 2011 ?

    Hi,
    I have some issues to drive some motor by a Vi created under Labview 2011 using an inspection built under vision builder AI 2011
    The step for running  a Labview Vi said me that it only support 2010 VIs or earlier ? How two NI softwares 2011 can be incompatible ?
    So I try to save under a old version but this vi is part of a huge LLB...Is it possible to save this LLB as a 2010 version without saving all subvis .ctl etc.. ? I am a little confused...
    Thank you for your help

    You should be able to save the top level VI for previous to LV 2010, and all VIs from that LLB will also be saved to a LV 2010 version LLB that can be used by VBAI. There is a restriction that any VIs from a toolkit that you have to pay for (i.e. Vision), even if they are in your LLB will not be saved for previous, but driver VIs (i.e. Motion, DAQ, NI-IMAQ) if they are in your LLB will be saved in the resulting LV 2010 LLB.
    I realize this isn't ideal and VBAI will be supporting LV 2011 or a future version later. Another option will be to use the VBAI API in LV 2011 to have VBAI do just the image processing portion of your control system and do Motion, or other functionality in LV environment and control VBAI from LV using the VBAI API (this allows you to load inspections, run them, get images, and results, etc.), which does support LV 2011.
    Hope this helps,
    Brad

  • 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.

  • Creating a drop down menu configured with VISA write

    Hi I'm using the Basic Serial Write Read example vi in LabVIEW to communicate using the serial port. Instead of having a write box on the front panel connected to the VISA Write in the program I want to create a drop down menu on the front panel to be able to choose from a variety of commands. Is there a way I can program multiple commands into the block diagram and choose one of them on the front panel to send to VISA Write? For example, the commands to choose current are I/E\s0\r for 1 A, I/E\s-1\r for 100 mA and so on. I want to be able to choose between 1A, 100mA, etc on the front panel and have the code send the corresponding function to VISA Write. Is this possible?

    Okay, please let us know the solution you came up with, so we might be able to use it sometime.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • Labview USB with VISA on Mac OS X

    Hi-
    I have a 3rd party USB DAQ device that I'm trying to make work within labview 7.0. I've gone through the device tutorial on creating a driver with Windows2000. With Windows 2000 after using the VISA driver wizard the subvi "visa find resources" finds the DAQ device and I can talk to it
    with a bulk transfer with VISA write.
    With a Mac OS X (10.4), the system profiler sees the DAQ but I the VISA driver wizard won't allow me to check the usb button. The labview subvi "visa find resources" doesn't find the
    DAQ. What equilivent steps do I need to do with OSX so that the find resources vi finds my DAQ?

    Finally fixed the PermGen errors. I can run all day now without crashing. It turns out the eclipse.ini file is very tricky! You have to have carriage returns in the right places. Run the jmap -heap <pid> on the eclipse process id. It will tell you if your PermGen memory is actually setup how you thought it was supposed to be.
    Here's my final eclipse.ini
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    892m
    -vmargs
    -XX:PermSize=128m
    -XX:MaxPermSize=892m
    -Dapple.awt.graphics.UseQuartz=true
    -Xdock:icon=../Resources/Eclipse.icns
    -XstartOnFirstThread
    -Dosgi.requiredJavaVersion=1.5
    -Xms40m
    -Xmx892m

  • Problem on WinXP / Labview 6.1 with VISA (serial port)

    There is a problem on WinXP / Labview 6.1 with VISA which i use to poll the state lines of the serial port. The only functions that i use are "VISA Open", "Find Resource", line state properties and "VISA close".
    On my own machine (WinME) it works fine as a standalone application (with runtime engine in the same direction), even if i rename the Labview directory so that Labview is not found.
    From my VXIpnp directory i deleted all but these files:
    directory "Win95",
    subdirectory "Bin" containing "NiViAsrl.dll",
    subdirectory "NIvisa" containing "visaconf.dll".
    When shipping this to WinXP (and copying "VXIpnp" to the root directory), the serial port was not found, so i renamed the direction "Win95" to "
    WinNT", but this did not work also.
    I installed the VISA server, although it seems not to be required -- no result.
    Final question:
    What must i do for distributing the program as a standalone application for all windows platforms?

    Hey Joachim,
    In order to create an installer that includes the VISA Run-time engine for serial IO you will have to purchase LabVIEW 7.x. See screen shot. This packages a small compact version of the run-time that can only be used for serial, but it takes up much less space. The installer that I created has my application, the LV Run-time, and the VISA run-time and it is about 26 MB.
    That is much smaller than if I had to include the 32 MB LV 7.1 run-time and the 14 MB VISA run-time separately. It would have been even smaller if I would have uncheck some of the items that I wasn't using.
    -Josh
    Attachments:
    advanced.JPG ‏31 KB

  • What i need to write when i buy with VISA - ( country - ? AAO? or .... ) in Kazakhstan ????

    What i need to write when i buy with VISA - ( country - ? AAO? or .... ) in Kazakhstan ????

    Well, then your question is a different one: "What do I need to make a web application with ERP data".
    In NetWeaver everything is contained that you need technology wise, but no business applications (almost, there is a grey zone coming from the ABAP world).
    If you want to access also business data there are two ways:
    1. You can access existing R/3 environments from there via RFC and BAPI
    2. You will have to wait for mySAP ERP to run it directly on NetWeaver 04
    Regards,
    Benny

  • Problem with write key VIs (config-file)

    Hi
    My problem is this: when I use the write key VIs to write to an ini-file, the values are not written/updated in the ini-file. Does
    anybody has a solution???
    thank YOU!!!
    Attachments:
    writetest.vi ‏32 KB

    astroboy wrote:
    Hi Dennis, writing key updates or add lines, but the problem is that it also causes all lines to be clumped together, making it unreadable.
    What's the better way?
    Clement
    I was complaining about the poor formatting of the .ini files myself a couple years ago in this thread. http://forums.ni.com/ni/board/message?board.id=170&message.id=273552
    I found the offending piece of code was buried pretty deep in the Config File VI hierarchy.
    One idea is to go back after the file is written and find where all the section headers are and insert your own blank lines.
    Also look at this thread http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=408776
    You may also want to add kudoes to the config file idea in the Idea board.  http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Comments-in-configuration-file-ini/idi-p/927874#A614 
    Message Edited by Ravens Fan on 09-17-2009 10:29 PM

  • Compare VIs with same name under LabVIEW 8?

    Hi,
    if I remember correctly, LabVIEW 8 can now load VIs with the same name into memory, which means that a comparison between two VIs having the same name should work. Nevertheless, I get the same message like in older LabVIEW versions when trying to load those two VIs. Is there a fast and simply way for such a comparison without renaming one of the VIs?
    Regards,
    Gabs

    Of course gmart is right, I was talking of the project libraries. I know I should not have called them Vi libraries
    Here is soem information as it can be found inside the LabVIEW help:
    LabVIEW Project Libraries
    LabVIEW project
    libraries are collections of VIs, type definitions, shared variables,
    palette menu files, and other files, including other project libraries. When you
    create and save a new project
    library, LabVIEW creates a project library file (.lvlib), which includes the properties of the project
    library and references to the files that the project library owns.
    Project libraries are useful if you want to organize files into a
    single hierarchy of items, avoid potential VI name duplication, limit public
    access to certain files, limit editing permission for a collection of files, and
    set a default palette menu for a group of VIs.
    You can view the structure of a project library from the
    Project Explorer window or in a stand-alone project library
    window. If the Project Explorer window is not open, navigate to
    a project library file to open it in the project library window.
    You also can create
    project libraries from folders in a project.
    Use project libraries to organize a virtual, logical hierarchy of
    items. A project library file does not contain the actual files it owns, unlike
    an LLB, which is a physical file that contains VIs. Files that a project library
    owns still appear individually on disk in the directories where you saved them.
    A project library might have a different organizational structure than its files
    on disk.
    Use project libraries to qualify the names of VIs and other
    LabVIEW files. LabVIEW identifies VIs by filename. If you load a VI with the
    same name as a VI already in memory, LabVIEW uses the VI already in memory, an
    issue known as cross-linking. When a VI is part of a project library, LabVIEW
    qualifies the VI name with the project library name to avoid cross-linking. A
    qualified filename includes the filename and the owning project library
    filename.regards
    Ingo Schumacher
    Systems Engineer Sound&VibrationNational Instruments Germany

  • Documentation for programming a PXI card with VISA in LabVIEW.

    Hi,
    Where can I find a documentation for programming a PXI card with VISA in
    LabVIEW?
    Thanks.
    Denys.

    Dan,
    Thank you for your answer, short but useful to start.
    Denys.
    "Dan Mondrik" a ecrit dans le message news:
    [email protected]..
    > Denys:
    >
    > Our NI-VISA documentation for PXI has been somewhat scarce. We are
    > improving it in the next version. In the meantime...
    >
    > Call VISA Find Resources with "PXI?*INSTR" to find all PXI devices.
    > Call VISA Open with a device string like "PXI::devicenum::INSTR" or
    > "PXI[bus]::devicenum[::function]::INSTR". In LabVIEW, use the VISA
    > class "PXI Instr", available since LV 5.0. (The generic "Instr" will
    > also work but will also present GPIB and VXI options and may be too
    > confusing.)
    >
    > The property node has all the available PXI properties such as
    > BAR0-BAR5 base/s
    ize/type, and also manufacturer ID and model code.
    > You can use all the register based in/out/peek/poke methods, just make
    > sure to use the appropriate address space for your device.
    >
    > Dan Mondrik
    > Senior Software Engineer, NI-VISA
    > National Instruments

  • Memory leak with Visa Close in loop

    I read the other posts about the memory leak problems with Visa Close, but eliminating the Visa Close from VI causes problems with read & write (it seems to go out of sync). Any suggestions? Example attached.
    Attachments:
    MKS_651C_Serial_Communication.vi ‏144 KB

    Solved the problem. I had to change the bit count and adjust sort. Removing the Visa Close did eliminate the memory leak.

  • LVDiff with VIs in library

    Hi, 
    I've successfully setup both LVDiff and LVMerge with TortoiseSVN and I'm using it heavily, but I get an error from LVDiff if the VI belongs to a library:
     Error 1004 occurred at Open VI Reference in NI_procmphier.lvlib:CMP compare two VIs.vi->lvdiff.viPossible reason(s):  LabVIEW:  The VI is not in memory.
    To load a VI into memory with the Open VI Reference function, a path must be wired for the VI Path input.
    VI Name: TMCalc_Qp.vi
    Has anyone changed LVdiff so that it works with VIs in library?

    I just had the same problem, strange that no one has seen it before...
    The correction is committed in the project's repository since 2 years, but the download archive contains an older version.
    You can download the right version from this link. Just replace the vi in the lvdiff directory!
    Charles

  • How can I unlock ipod touch 5th gen currently disabled and never sync'd with itunes

    Basic situation. Ipod touch 5th gen. Passcode forgotten and tried too many times such that ipod is disabled and requested to connect to iTunes.  Problem is that the ipod was never sync'd with iTunes so the connection fails.  I've only owned it for 9 months or so.  I know I can recover all my music through iTunes and my applications through the app store since all of my content was legally purchased.  The problem is that I need to also recover my contacts and pictures since this is the only place they exist.
    I have read about methods up to 4th generation where you can access a particular file on the device via computer and rename it to unlock the device. That would most likely allow me to then sync/backup via iTunes and recover my data.  Problem is that I can only access the DCIM folder via windows manager and it contains no data. Perhaps there is a way to access the device a different way?
    Is there a way with the 5th generation to either reset the lock (from disabled to locked with a 1 min wait for retry as an example) to allow me more opportunities to try other passcodes that I may have set (including mistypes etc) or to remove the passcode completely and let me set it to something I will write down this time?
    Please do not reply with the standard apple responses of 'sync with itunes' or 'factory reset' and no, I did not sync with the icloud either (I tried but it was unsuccessful for some reason).
    The answer doesn't even have to be a free one as I would be willing to pay for the solution if it were guaranteed to work.  Since apple seems to want to charge for any type of support, even to ask a question, I am relying on the community for help.  Thanks much.

    You have to place the iPod in Recovery mode as Apple says and erase the device. It is a security feature.
    or
    If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone and use Remote Wipe to erase the contents of your device. If you have been using iCloud to back up, you may be able to restore the most recent backup to reset the passcode after the device has been erased.
    You can also wipe the iOS device by installing the FindMyiPhone app on another iOS device and using that app to wipe the device.
    There is not other way

  • Please Help... Sync BB8900 with Outlook 2007 and Vista.

    I have trawled the web looking for an answer to this question and can't find any answers, please can somebody help me !!!
    I have owned my 8900 Curve for about 2 months and love it, I used to sync it with my old computer running Windows XP and Outlook 2007 and had no problems.Unfortunately that computer died and I have upgraded to a new PC unning Windows Vista, my problem is this... When I try to set up the sync options for my calendar,contacts etc I don't get the option to sync it with Outlook, I only get the option to sync it with
    1... ASC II Importer/exporter
    2...Yahoo.
    I rely heavily on my BB being up to date and without this function may as well go back to my old PDA.
    I have tried re-installing Desktop Manager a few times and even downloading older versions of it to see if this fixes my problem, all to no avail.
    Please,Please can somebody help.
    Thank You In Advance.
    Stuart

    Hi,
    By the "media control" I take it your were referring to the Vizkids Post, suggesting the mediad manager not be installed?
    I didn't say that, I agree with it, but I didn't say it.
    Stulew99 Wrote:  
    "Why we should have to do this I have no idea, surely if something is
    sold with an application then it should work with the latest operating
    system and latest outlook version)."
     A friendly tip as this is your first thread, The User who suggested that has 4 more posts than you. He is new to the forum as well.
     What worked for his problem, might not work for yours, in this case it wouldn't have affected it at all. When you get stuck or need some
    research go to the upper left hand corner where the grey search box is. Type on keyword for your problem, I would put vista outlook 2007
    desktop, to start. You will see the history of the problems reading those subjects. You will see green resolution marked on most
    Follow those resolved threads and see how it relates to yours, and how it was resolved in the past.  Be sure to write your search results in  you thread other users can then see what you've tried and found and help you quicker
    As you get more experience you will get good use from the Support and Services grey tab at the top of the page.
    That's where the link I posted came from.  Please take my comments the way they were intended, as helpful advice, OK?
     I need some specifics on your Vista OS 32 or 64 bit?What version of desktop manage have you tried, removed reinstalled etc.?
    Okay flesh things out a little, you installed desktop manager with full access rights as an administer on Vista,correct?
    The installation was error free?
    You setup the   your email and when you went to configure the synchronization options, you had what options, I know
    you didn't have Outlook.
    What steps did you try to resolve the problem? 
    Did you change any settings in Outlook, review the desktop setup in the manual?
    How far did you get on article I left you regarding MS Outlook tips?
    Ok let me know the detail for those questions,thanks,
    Regarding the clean procedure post, The first part of the procedure states:
    "To install BlackBerry Desktop Software on a Windows® based computer that
    had a previous version of BlackBerry Desktop Software installed,
    complete the five tasks outlined below. These tasks should also be
    completed if the BlackBerry Desktop Software installation or
    uninstallation procedures did not complete successfully."
    Going on, it explains and shows how to make sure all the registry entries, program files and remnants , along with file traces
    were made In Vista and are completely removed. A lot of desktop manager issues especially in the Vista OS can be traced to old
    registrations made by a previous DM installation.
    Please let me know what parts are not clear.
    Thanks,
    Bifocals
    http://na.blackberry.com/eng/deliverables/5837/BlackBerry_Desktop_Manager-4.7-US.pdf
    Message Edited by Bifocals on 05-12-2009 03:29 PM
    Click Accept as Solution for posts that have solved your issue(s)!
    Be sure to click Like! for those who have helped you.
    Install BlackBerry Protect it's a free application designed to help find your lost BlackBerry smartphone, and keep the information on it secure.

Maybe you are looking for

  • How can I make space in my full HD finding the FATTY folders?

    Hi everybody... I have my 80G HD almost full, only 1.1G free. This happened suddenly without me doing nothing. I know I have to have at least 25% free. So I started checking my folders to choose which delete. The biggest one is iTunes with 3.5G. I RE

  • Goods receipt check box in PO

    Hi, I want to flag the goods receipt check box in PO under delivery tab.But in me22n it is showing in non editable mode..please help me how to do it? Regards Prabha

  • Hyperlink position in document

    How can the insertion point be relocated in a Word document to where it finds a hyperlink? E.g. I would like to add some text after each hyperlink in a document. So I traverse the hyperlinks using For each hLink in Selection.Hyperlinks But when I try

  • Installing 2 blank copy of iphoto to external harddrive

    My iphoto library is full and taking up all my space. can i install a 2nd BLANK copy of iphoto on my external harddrive and start using that for new photos as opposed to deleting some to get more room. Is this possible and how would I do it? thanks

  • How to filter a char in a LVA??

    Hi all!! I've a LVA with char columns, and, when I filter one, there're no result... But if i filter with AAA* or *AAA It shows all the AAA fine... Why??