VISA Close sending 0x0 character

Hi,
Labview 8.5.1
I open a serial port with VISA open, send and receive data, and then close things down with a VISA Close.
However, the VISA Close is sending a 0x0 character on the serial line which is confusing the target instrument.   I can replicate this behaviour with MAX and with the serial port examples.
How can I prevent the VISA Close from sending the rogue character?   It's important that I do close the resource without closing the program in this instance.
TIA,
Richard.

Eric,
Thanks for the reply.
I first noticed the issue communicating with a homebrew embedded processor, but I can demonstrate the effect by running the Basic Serial Write and Read.vi, hooking the outgoing COM port back to a second incoming COM port (crossing the TX and RX lines, of course) and monitoring that with Com Port Toolkit.  I see the outgoing *IDN?<carriagereturn><newline>
Timestamp                                 Hex chars received                                ASCII representation
 08:16:21.124                             2A 49 44 4E 3F 0D 0A                            *IDN?..
and then about half a second later, the 0x00.
08:16:21.655                               00            
Manually inserting a x second wait before the Visa Close delays the 0x00 by a corresponding amount. 
If I use the Measurement & Automatum explorer, select the com port,  open the visa test panel, select the viWrite tab, and Execute the test repeatedly, I get repeated *IDN?.. strings and it's only when I close the test panel that the 0x00 comes through.  ( I can also see a 0x00 coming through when I Validate the session - I assume it's opening and closing it?)
I have attached a Capture.spy session.
Thanks,
Richard.
Attachments:
Capture.spy ‏4 KB

Similar Messages

  • The TCP/IP connection does not closed after a VISA close

    I am using the VISA functions to communicate with a Sorenson SGA power supply from a Windows XP computer.  I have the VISA TCPIP Resource defined in MAX and use this alias name in the VISAResourceName for the input to the VISA Open.  Then I write a SCPI command, such as *IDN?, and read the repsonse.  Then I close the VISA session.  When I look at the TCP statistics using the netstat -n command, I get the following response:
    Proto           Local Address                 Foreign Address    State
    TCP            10.10.10.9:3881              10.10.10.1:111       TIME_WAIT
    TCP            10.10.10.9:3882              10.10.10.1:111       TIME_WAIT
    If I query the ID again, I get 2 more TCP connections with different local ports numbers.  Every time I perform the query, I get 2 more TCP port connections at different local ports.  It takes about 1 minute for the TIME_WAIT's to time out.  If I query the Sorenson enough, I can fill up my allowable local port connections.
    1)  Why doesn't the TCP connections go away after the VISA Close?
    2) Should I be opening and closing the VISA session every time I want to talk to the Sorenson?
    3) What does the VISAResourceName control or constant actual do to resolve the alias into a IP?
    This Sorenson power supply does not seem to be very quick to repsond to TCP requests.  If I set the timeout on the VISA Open to anything less the 100ms, I cannot get a session open every time.  It will fail about 50% of the time.
    Has anyone had experince talking to the Sorenson power Supplies using VISA TCPIP?
    Thanks,
    Julia

    Hi Julia,
    Let me try answering your questions here.
    1) I'm actually currently looking into this to see if this is expected behavior, and I'll definitely post back to let you know what I find.
    2) You do not need to close a VISA session everytime you want to communicate with the device, you can leave the same session open and keep using that session, instead closing it out at the end.
    3) The VISA aliases and what they correspond to are stored in a visaconf.ini file. There is more information about this file and where it is located on your hard disk in this KnowledgeBase article here. This visaconf.ini file is checked to see what the actual resources being looked up are.
    Let me know if I answered your questions, I will write back with more information on question 1.
    Rasheel

  • How to send a character mode report from Oracle Form 10g to a printer.

    how sending a character mode report from Oracle 10g report to a printer.
    I'm sending to a printer located in the network
    i have theses parameter report
    desformat = prtname
    desname=??????
    destype= ?????
    mode=character
    i would like to preview the report before to send to a printer
    slds

    ACCOUNTING SYSTEM
    2006-2007 From Date : 01-JUL-06
    Printed On : Friday August 31 2007 11:13 AM To Date : 30-SEP-07
    G A/C. Code 99-99-9999 Description: xxxxxxxxxxxxx H
    -- DOC. # -- -- DATE -Chq/Slip# ---------- N A R R A T I O N -- -- DEBIT -- -- CREDIT -- -- BALANCE --
    Opening Balance: -999,999,999.00 Cr.
    G *** Total *** 0.00 0.00 -999,999,999.00H
    ================= ================= =================
    when i run character mode report in browser then display this output properly
    but sir problem is that when i print the report
    G(use for bold)
    is not working
    means not print in bold format in printer
    same character print G
    do you have any idea when i print through browser to printer G for bold purpose its work to printer ?

  • Error message firefox has encounted a problem and will close send don't send

    error signature code 0xc000000d flags 0x00000000
    When I go to the web I get this error message: Firefox has encountered a problem and will close send or don't send .When you click either it closes

    It's possible that you are having a problem with some Firefox add-on that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?
    Whenever you have a problem with Firefox, whatever it is, you should make sure it's not caused by one (or more than one) of your installed add-ons, be it an extension, a theme or a plugin. To do that easily and cleanly, run Firefox in [http://support.mozilla.com/en-US/kb/Safe+Mode safe mode] (don't forget to select ''Disable all add-ons'' when you start safe mode). If the problem disappears, you know it's from an add-on. Disable them all in normal mode, and enable them one at a time until you find the source of the problem. See [http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes this article] for information about troubleshooting extensions and themes and [https://support.mozilla.com/en-US/kb/Troubleshooting+plugins this one] for plugins.
    If you need support for one of your add-ons, you'll have to contact its author.
    If the problem does not disappear when all add-ons are disabled, please tell me, so we can work from there. Please have no fear of following my instructions to the line, as all can be easily undone.

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

  • How to send ASCII character to the read buffer?

    how to send ASCII character to the read buffer?

    I assume you mean the serial port read buffer. You can't the only way data gets there is by coming in on the receive line.
    What exactly is it that you are trying to do?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • VISA close error

    Hello,
    I use simultaneously the attached 3 VIs. Each of them is a PID loop, reading data from some Keithleys, and driving the loops using Keithley 2400 sourcemeters. So there are 3 2400 sourcemeters in my project. The data communication is via GPIB (NI HI-USB GPIB controller)
    I use the official VISA drivers for the Keithley 2400s (some minor modifications in the "configure output" VI, I use double precision instead of single precision as in the official driver).
    Everything works perfect, the three VIs run parallel, no communication error, so all is good.
    But, randomly, lets say 50 percent of the time, when I want to shut down only one of the VIs, I get the VISA Close error in the error output. 
    Here is a screenshot when I get this error: http://dl.dropbox.com/u/8148153/Untitled.jpg
    What can cause this such a error? The same VISA drivers are not allowed to be used parallel?
    Thanks for help!
    Attachments:
    waterloop1.vi ‏34 KB
    Base_loop_coarse.vi ‏34 KB
    Base_loop_fine.vi ‏35 KB

    Hello,
    The Automatically close VISA sessions is unchecked (i think it is also the default state). So this cannot cause the experienced problem. So far this problem is not that serious, since I am at just the prototyping phase in my project (that is why i run the 3 VIs separated), the final MAIN VI will close all the VISA resources at once at shut down.
    But I like to learn, so i am still curious about what this strange problem with VISA...
    Regards,

  • Sending Japanese Character From XI to SAP 4.6C

    Dear Expert,
    I have a requirement here to send Japanese character from web application --> XI --> IDOC(in 4.6C).
    However, it always fail, and I could only see garbage character.
    I have tried the suggestion to put the logon language as JA in the RFC destination, but it is not working.
    Please kindly help with your suggestion.
    Thank you very much.
    Best Regards,
    Y

    Please check this How to read oracle database contain Chinese Character ?
    I have done scenario JDBC ---> XI -
    > ABAP Proxy. All the data in oracle database is in chinese character.
    Regards
    Ferand
    Edited by: Fernand Lesmana on Jul 22, 2010 11:04 AM

  • Visa close won't return

    Hello NI community,
    While developing my LabVIEW application I encounter the following problem:
    If I call the VISA Close I occasionally have the problem that the call won't return. Below are screenshots from NI-IO Trace.
    As visible on the 2nd screenshot the "output" tab is missing. Also a start time is filled-in but the finish and call duration are missing (as in the 3rd image)
    The hardware setup is a FTDI FT232RL connected via USB. From this a board based on a RS485 is connected.
    The drivers of the FTDI chip are version 2.8.30.0 (latest VCP drivers on FTDI web-site and Microsoft update)
    Edit:
    As long as the VISA close won't return my program hangs so it is not possible to quit in any orderly fashion (except for a reboot)
    Do you have any suggestions where I can start debugging this problem?

    So here is my write-up of the fix I used (it worked so far).
    Note:
    !!!These actions might damage your system, may break your computer or do other unwanted stuff. You are responsible for the result (nor me nor NI)!!!
    Note 2:
    This will remove the drivers so make sure you have a copy of them before proceeding.
    With that out the way here are the instructions for windows 7 (vista and 8 should look the same, XP might be a bit different), the OS language is Dutch but the locations of the buttons is the same:
    Part of these of the instructions are from this document 
    1st add the option to show all disconnected devices by opening the system Environment Variables:
    right mouse button on "my computer" and select properties.
    In the system property select "Advanced system settings"
    If requested accept the UAC prompt.
    Select the advanced tab, Select the Environment Variables.
    In the Environment Variables window select the lower New button
    Add the variable "DevMgr_Show_NonPresent_Devices" (without quotes) and a value of 1.
    Ok all dialogs and open the device manager.
    In the device manager select view and select "Show Hidden Devices"
    The list will now get extra long since all devices that where ever connected to your computer will show up.
    For the next step disconnect all (USB) serial ports from your computer.
    All serial ports that where connected will now show up under "Ports (COM & LPT)" and under "Universal Serial Bus Controllers"
    For every "USB Serial Port (COMxx)" port and "USB Serial Converter" that is semi-transparent (disconnected) do the following steps:
    Right-mouse button on the port or converter and select property's
    The general tab should give a code 45 that the device is not connected.
    Select the "Driver" tab next and select "Remove"
    In the confirmation dialog select the checkbox (if present) and select "OK"
    Once this is done for all "USB Serial Port (COMxx)" ports and "USB Serial Converter" devices you should be good.
    Optional part
    Download the FTClean tool from here: http://www.ftdichip.com/Resources/Utilities/FTClean.zip
    unzip and run the tool (as administrator) more information can be found here.
    http://www.ftdichip.com/Support/Knowledgebase/index.html?ftcleanutility.htm
    Download the latest VCP driver from the FTDI web-site and install it. (although windows update should take care of this)
    Optional part end
    Plug-in a USB serial converter and if everything went well you should be greeted with a "found new hardware" dialog and drivers should install automatically. (or you can re-install them manually)
    This fixed the problem for me anyway.

  • Serial VISA not sending output until closed

    Until recently, I used the outport.vi to control the pins on the parallel port for controlling a stepper motor. Now however, I find much better control of the motor, with a faster speed and more evenly-timed pulses, if I use the VISA serial commands to toggle the pins.
    My problem: I can give my vi the number of steps and how long each pulse should be, but it does not actually send the data to the serial port until AFTER I close the VISA session. This means that I do not know when the last byte is sent to my controller.
    The string that I send is "ggghhhggghhh" with the number of g's and h's in a row controlling how long the logic level of the control pin remains before switching. I am not using a termination character
    of any sort, I tied the "Busy" and "Paper End" pins (11 and 12) to ground on the port, and the VISA serial properties are the defaults --
    ASRL XON character: 17, ASRL XOFF character: 19, ASRL Data Bits: 8, ASRL End In: 2, ASRL End Out: 0,ASRL Flow Control: 0, ASRL Parity: 0, ASRL Stop Bits: 10.
    I am using winXP, VISA 2.01 and Labview 5.1.
    How can I send my output to the parallel port when I want it sent, without closing the VISA session, and how can I determine when the last pulse goes out the port, so that the program will resume only after the last pulse is sent?
    Thank you,
    Scot

    I upgraded my VISA to 2.6, which seems to work fine with Labview 5.1 (I couldn't find version 2.5 for Windows).
    I still have the same problem. If I use serial VISA, I can get well-timed pulses at up to 62kHz out of the parallel port, connecting it as given in the Using the Parallel Port in LabVIEW tutorial and using their vi. NI-Spy shows that the commands are sent as they are generated, but the pulses do not actually go out the port until after the VISA session closes. I have tried flushing the buffer after every write. As a result, I can get the requested pulses, but with no feedback as to when they are complete.
    If I open VISA
    , write a number of steps to VISA, then close again, I get a 50ms gap between segments that I write. I want the output to appear seamless.
    In the past I have used the outport.vi, but to get evenly-spaced steps, I have to use the wait-ms.vi This limits my pulse frequency to 500 Hz. To go faster, I have used a for loop with several hundred iterations -- this leaves an erratic pulse train and is difficult to control and ties up the processor. 500 steps/second is also too slow when you consider that a typical scan requires 120,000 steps, each direction.
    So if anyone knows how I can get a regular pulse train out of the parallel port (or is their another port that would work -- not the serial though) and know when it completes so I can continue my program, I would appreciate some help.
    Thanks,
    Scot

  • Unable to send 'Chinese Character' in plsql send mail program

    Hi All,
    I am sending mail through plsql.
    in mail body, i need to send some chinese character. I have compiled the package in Toad 9.5
    but when i received mail, it is showing just ???????????????.
    Details are as below:
    Application: 12.1.1 ,
    Database : 10g
    Toad 9.5
    how can i send that chinese words in mail? please suggest me.

    Hi;
    I suggest close your issue here as answered than move your issue Forum Home » Database » SQL and PL/SQL which you can get more quick response
    Regard
    Helios

  • Send special character by mail

    We are creating an XML spreadsheet that is sent by mail, and we are requested to show in a cell the special character Delta (u0394).
    The overview of the process is the following:
    - We create an XML file through IF_IXML interface, with enconding UTF-8 Little Endian.
    - Then we render XML into an internal table.
    - At last, we send the XML spreadsheet (the internal table) as an attached file by mail through SO_NEW_DOCUMENT_ATT_SEND_API1.
    The problem we are facing is the following:
    If we try to put Delta (u0394) as a character in a data tag (it's a variable of type String), SAP is turning it as '#', and not showing the character.
      DATA: o_cell TYPE REF TO if_ixml_element,
            o_data TYPE REF TO if_ixml_element,
            v_string TYPE string.
    * Crea una celda
      o_cell = o_xmldoc->create_simple_element( name = 'Cell'
                                                 parent = o_row ).
    v_string = 'u0394'.
    *   Crea un dato
        o_data = o_xmldoc->create_simple_element( name   = 'Data'
                                                   parent = o_cell
                                                   value  = v_string ).
    When you open the file in Excel, the '#' character is shown instead of  'u0394'.
    How can I show that Delta character (u0394) in the XML spreadsheet file I am sending?
    Please tell me if more information is needed.
    Thanks in advance,
    Martin

    I tried like you said:
      DATA: o_cell TYPE REF TO if_ixml_element,
            o_data TYPE REF TO if_ixml_element,
            v_string TYPE string.
    * Crea una celda
      o_cell = o_xmldoc->create_simple_element( name = 'Cell'
                                                 parent = o_row ).
    v_string = '& #916;'.                                           'Added a space in the middle to show the HTML entity code in the forum
                                                   parent = o_cell
                                                   value  = v_string ).
    But SAP is tranforming my XML text to:
    <Cell>&amp;#916;<Cell>
    ( &amp; is the HTML entity for '&')
    How can I put Delta character so that SAP turns it in the right HTML entity &#916;
    Or how can I manage so that the cell value generated is:
    <Cell>&#916;<Cell>

  • Not able to send euro character ' €' via socket

    OS : Solaris - The solaris login profile is set with LC_CTYPE, LC_CTYPE, LC_LANG=ISO-8859-15 and we are able to see this when we run the set command and also locale in solaris.
    JRE : 1.6
    Application deployed in Weblogic 10.3
    I m trying to send a euro character in java via socket, but in the receiving end not able to receive properly. Even I have to tried to set the Charset ( in the java code )
    as ISO-8859-15 , but still it didn't work properly. Code snippet for the sample program to display euro symbol
    import java.io.UnsupportedEncodingException;
    import java.nio.charset.Charset;
    public class Euro {
    public static String createString( byte[] bytes, String enc )
    String CResult = null;
    try {
    CResult = new String( bytes, enc );
    } catch (UnsupportedEncodingException e) {
    e.printStackTrace();
    return CResult;
    // ISO8859-15 is same as ISO8859-1 but with EUR character
    public static String createStringISO8859_15( byte[] bytes )
    String CResultISO = null;
    CResultISO = new String( bytes, Charset.forName("ISO-8859-15" ));
    return CResultISO;
    public static void main(String[] args) throws Exception {
    //String enc = "€";
    byte[] iso8859_15 = { (byte) 0xA4 }; // euro sign
    //byte[] iso8859_15 = "0xA4".getBytes(); // euro sign
    /*     String Cresult = Euro.createString (iso8859_15, enc);
    System.out.println("createString Result : " + Cresult);*/
    String CresultISO = Euro.createStringISO8859_15(iso8859_15);
    System.out.println("createStringISO8859_15 Result : " + CresultISO);
    When I 'm running the above code in windows it is working fine whereas in Solaris it is not working. The console just displays ?, rather than the actual '€' symbol. Is this a display problem in console of vt100 or porgramming? Kindly suggest. How to make this work in Solaris.

    Please repost or edit that mess with {noformat}{noformat} tags and proper indenting so it can actually be read.
    And then explain what sockets have to do with the price of fish.                                                                                                                                                                                                                                                                                                                                                                                   

  • Sending pause character on BT SmartTalk Android ap...

    In my Samsung Sii I store something like the following to remotely control the heating in my house: "<+44 normal phone number> ; <a pin number> ; <command codes>".
    When I ring the number from Contacts using the mobile phone connection, the mobile dials the number and pauses at the semi-colon while the remote system sends me a confirmation beep. I then press a 'Continue' button after which it sends the next part of the stored number. When I try this with SmartTalk the call fails as if the number is unobtainable.
    Does anyone know if there's another pause character that the Android SmartTalk app will recognise?

    ok on the 4th attempt I got the 2 MyBt accounts linked.
    I then went back to the App on the phone, but  after successful home phone and text, "ok we'll set up the account for you" I still get: "Sorry but we've checked your BT account and there's something stopping you.."
    I'll keep trying with the App I suppose.
    I don't know if what I've done is correct, but here are the steps I've taken.
    Downloaded App
    Tried to login with my MyBT account but registration failed.
    In the App made up a new MyBT account for the mobile phone with a different email address after deleting and reloading App.
    Opened the new account online. 
    Linked the new account with my "real" MyBT account. (4 attempts before it worked.)
    Gone back to the App to go through the registration again. (3 attempts and still not worked.)

  • Javail sending international character

    Hi,
    for a while I'm looking at how to send a message with french characters. My issue is sending international characters with javamail API.
    Could someone give me an example on how to set the character set.
    Do I have to go through an encode of the subject and the body.
    TIA

    Two things...  It sometimes helps to decompose complex statements into separate lines; break up the set interval ... line into one step that gets the text and and another that converts it to a number. Also, try using real rather than number. Number is intended as an abstract class, and applescript may be having a problem deciding whether to cast odd unicode to real or integer. A script with both changes looks like so:
    set theResult to display dialog "Please enter a number" default answer foo
    set interval to (text returned of theResult)
    if button returned of theResult is "OK" then
              try
                        set interval to interval as real
              on error
                        display dialog "Whoops"
              end try
    end if
    Also (just to be sure) in your original script if you press a button other than "Ok" interval is never defined at all, so in your error block you either need to set interval to a default value or add a return command to exit the script.

Maybe you are looking for

  • New officejet 6600 - Can't scan or fax, printing A-ok. Using wireless.

    Hi I have read and tried every thread on this topic. it is now 6 hours later and about 30 restarts, installs, re-installs and re-re installs, oh and full uninstalls, each time turing off firewall and anti-virus. Microsoft paint won't work either, but

  • No sound when recording videos with iphone 4s - ios7

    Since I have downloaded ios7 to my iphone 4s I am no longer getting any sounds when recording videos. When looking back at past videos I have recorded, they still have sound in the playback. I have tried resetting my phone and reseting it to factory

  • Can I use iChat to chat with someone using gmail's chat utility?

    ...and how? Thanks.

  • Select namespace attributes from xmlns:

    How do I select this information? <data>   <element xmlns:mynamespace="http://my.namespace.com" >mynamespace:Stuff</element>   <element xmlns:mynamespace="http://other.namespace.com" >mynamespace:Stuff2</element> </data>I want to come up with an xpat

  • ORA-1652: unable to extend temp

    Hi, We faced a problem with one of r billing process which normally takes 25-30 min was running for over 5 hrs and in the end gave a rollback error....when the process was re-started it got completed in 35 min.... Tue Jan 1 22:48:33 2008 ORA-1652: un