Termination character

Hello,
I'm communicating with an 20 years old optical spectrum analyzer with GPIB connection using VISA.
I having trouble reading the entire data. I've try to use the termination character options to solve this but my instrument use both line feed and EOI termination codes.
I've found this help text: http://www.ni.com/white-paper/4256/en/
but could understand it to the end.
what is the symbol accepting the arrow symbol at and zero constant at the end? where should I put this property node in case I want to read many bytes ending with the above characters? before VISA - WRITE? after VISA read? and how can I combine two termination character? how do I represent two EOI?
thanks, Avishay

Specify too many bytes to read and the visa read wil stop on the first end character or eoi that appears.
For two eoi's read twice.
greetings from the Netherlands

Similar Messages

  • How can I define more than one termination character for RS-232 interface communication?

    Hi,
    I have to communicate through the PC's RS-232 interface with a microprocessor board. I am using the "Advanced Serial Write and Read.vi" out of the LabVIEW examples and it works on principle.
    My problem is the termination character: It looks like I just can set one termination character, EITHER 0xA (so LF / newline) OR 0xD (CR / carriage return), but I have the need to react on various termination characters like "<CR> <LF> <CR> <LF> OK <CR> <LF>" or "<CR> <LF> <LF>"; which I would like to set in a control (this VI will be used in a TestStand sequence).
    Is there a way to do that, so that I can set wichever termination character(s) I need? The property node in "VISA configure serial port" just accepts an unsigned integer, nothing else. Sure I can get it running with the timeout - but this is not very nice and extends testing time unnecessarily.
    Thanks & Regards!
    Regards,
    gedi
    Solved!
    Go to Solution.

    That would be for the write. The poster is asking about the read. For the read you will need to write your own read routine. You will basically need to use a loop and inside the loop use the VISA Bytes at Serial Port to see if there's any bytes available. Read that many bytes, and append them to a string that you build up in a shift register. After concatenation check to see if you've got the termination characters. If so, the read is done. Fairly simple. Be sure to turn off the termination character enable in the VISA Configure.

  • Why do I get a "termination character was read" warning with VISA read and TCPIP?

    I am using VISA Reads with TCPIP raw sockets without issue with NI-VISA 3.0.1 but when I moved to NI-VISA 4.4 I was getting timeout errors.   The timeout errors went away when I set the termination character enable property to true (which seemed to be default in NI-VISA 3.0.1), but now I get a warning stating that the "termination character was read".   
    Can I disable this warning?   Can I set the termination character enable to default?   How can I get rid of this annoying warning?
    Solved!
    Go to Solution.

    Hey Dagwood,
    Unfortunately there isn't a way to globally change the attribute VI_ATTR_TERMCHAR_EN to VI_TRUE.  I spoke with R&D about possible use of the registries and they say it's not accessible through that.  To address why this change was made, the developer who made the switch isn't around anymore so I can't find his reasoning as an explanation for you.  The best this for you to do in your code would be while initializing, use the VISA Property Node to make the change and until that VISA Resource is closed, this change will remain set to the value you assign.  I'm sorry we cannot provide any other solution for this inconvenience.  Also, if you feel this is a large burden on your programming practice you can definitely submit a product suggestion for the ability to change global default values for VISA attributes.
    Thanks,
    David Pratt
    AES - Test Side Products
    NIC

  • Send/receive data without a terminating character

    I am trying to use the visa driver to send hex data over a serial port. I have tried to disable terminating characters but when I read from the port the trasnmission still terminates with a 0x0A character. How can I send/receive data without a terminating character???

    You need to call viSetAttribute with VI_ATTR_ASRL_END_IN set to VI_ASRL_END_NONE. In LabVIEW, use a write property node with the Serial End In mode set to None (0).
    Dan Mondrik
    Senior Software Engineer, NI-VISA
    National Instruments

  • How can I change the termination character (Hex 00) in LabVIEW?

    I'm talking to a 3rd party device over USB where I make function calls to their DLL. I send and receive Hex commands as Strings data type. I can send without problem however when I read back a string that should be Hex "FF 00 FF", I get back "FF" because LabVIEW sees 00 as a termination character so I don't get any data past the 00.  Likewise if I'm supposed to read "00 FF", I get back nothing!   The following KB linked below explains that LabVIEW sees 00 as a termination character.  It shows where using Serial to change the termination character to something else.  I don't have this option using my 3rd party USB device.  Is there a way to change what LabVIEW sees as it's termination character?
     http://digital.ni.com/public.nsf/allkb/9A3589A05F21A1B186256CE9006448D4

    That article is talking about two things. The first has to do with the fact that in C strings are terminated using 0x00. The second part has to do with a serial port read terminating once it sees 0x00. Based on what you described, I don't believe the second part does not apply to you since you are calling a third-party DLL, so it's doing the serial port read. Is this correct? Or, are you actually doing the serial port read yourself using VISA functions? If you are just calling their DLL, then the issue has to do with the string being passed back from the DLL to LabVIEW. You're probably passing in a string datatype. You should simply change this to a byte array so you get all the values.

  • Serial port termination character status?

    Hello,
    I need to read a message from a serial port and I'm having some problems. I used the advanced serial communication example and came up with the attached program. Everything works perfectly fine except for the fact that if no message is sent for 10 seconds as designed the serial read outputs an error. I know normally I can check to make sure there are bytes at the port before I do a read operation which solves this problem. However, when using the buffer to terminate the read once a termination character is provided the bytes at port property always returns 0 so I can't use this as a conditional for reading the port.
    Is there a way to prevent the serial read from timing out in the attached program? Thank you.
    Attachments:
    serial_buffer.gif ‏19 KB
    serial.vi ‏15 KB

    Let me maybe give a bit more details about the application. I want to be able to get any amount of characters as a string that someone inputs in to the serial port. This will be a computer so I can expect the commands to usually be valid but I want to provide some additional redundency incase a person at a terminal is writing commands. The commands might be "measure 110" or it might be "set 23 34". So the amount of bytes being sent will depend on the command. I used 1000 as the byte count on the read just to provide as much room as possible, setting it to 100 doesn't really make a difference in this application, the same thing happens. If someone starts typing in a terminal "measure 110" (for example) but forgets to hit enter for the termination character the program will time out since the error cluster is connected to the stop button of the loop. When this happens the entire program needs to be restarted. Not really ideal.
    If I disconnect the error cluster from the stop button I noticed it works perfectly fine. After 10 seconds of the terminator character not being entered the buffer clears and the loop simply restarts. What I worry about is if there is some other fatal error (such as not being able to connect to the serial device) that the program will keep running. Is this something I even need to worry about?
    Attached is a screenshot of my latest program which works great but like I said I'm just worried about not wiring the status from the error cluster to the stop button since that seems to be what I've always been taught to do. If I wire the byte count to the number of bytes property it will only collect the number of bytes I set, since this will vary based on the command that won't really work in this application.
    Attachments:
    serial_buffer.gif ‏20 KB

  • Serial Recieve with termination character

    Hi All,
    I have developed a seqence fileto transmit data on the serial port and loop back to recieve the data on reciever of same port. I'm transmitting "Test
     Serial" (Note: I'm not transmitting "Test\\rSerial") and recieving the data with termination character "carriage return".I'm using ASCII value 13 for the carriage return,but the recieve is not terminating on carriage return.
    It seems Teststand is not able to recognize "13" or "\r" is seen as 2 character.
    I'm attaching the sequence file for your perusal.It would be great if somebody can suggest me ways to make this work.
    Thanks in advance.
    Regards
    VDC
    PS: IVI serial driver need to be installed.You need to select Serial driver in device driver installation
    Attachments:
    SerialReadWrite_Term.seq ‏23 KB

    HI,
    I tried to find this dll, where is it located?
    If this is using "IVI" then you could see every action in NI-Spy !
    I watched you code. Another thing you could try is disabling the caching. Try Cache=0
    now data shold send very time to your device by the IVI engine
    Juergen
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

  • Utl_file.putline  - platform specific line termination character

    PUT_LINE terminates the line with the platform-specific line terminator character or characters.
    But the porblem is this.
    The file generator application can run in different platform,and hence it means I can have different line termination character.Is there anyway I can force it to generate Unix only line termination character (line termination char in Unix I guess is \n) .
    In short programatically I want to control it.
    I looked at UTL_FILE.PUTLINE but it doesnt have any option to control the line termination char.
    Help.

    here is the example, i am on HP UNIX
    SQL> DECLARE
      2     l_text   VARCHAR2 (32767);
      3     v_file   UTL_FILE.FILE_TYPE;
      4  BEGIN
      5   -- OPEN FILE to write
      6     v_file :=  UTL_FILE.FOPEN (LOCATION          => 'NOTIFICATION',
      7                        filename          => 'Test.txt',
      8                        open_mode         => 'w',
      9                        max_linesize      => 32767
    10                       );
    11     UTL_FILE.PUT(v_file,'Hello' || CHR(10));
    12 
    13     UTL_FILE.PUT(v_file,'how are you' || CHR(10));
    14 
    15     UTL_FILE.PUT(v_file,'I am fine' || CHR(10));
    16     UTL_FILE.FCLOSE (v_file);
    17    ---- open file to read
    18    v_file := UTL_FILE.FOPEN (LOCATION          => 'NOTIFICATION',
    19                        filename          => 'Test.txt',
    20                        open_mode         => 'r'
    21                       
    22                       );
    23     BEGIN
    24        LOOP
    25           UTL_FILE.GET_LINE (v_file, l_text, 32767);
    26           DBMS_OUTPUT.PUT_LINE (l_text);
    27        END LOOP;
    28     EXCEPTION
    29        WHEN NO_DATA_FOUND
    30        THEN
    31           NULL;
    32     END;
    33      -- READ LAST LINE
    34    -- DBMS_OUTPUT.PUT_LINE ('Last Line : |' || l_text || '|');
    35     UTL_FILE.FCLOSE (v_file);
    36  EXCEPTION
    37     WHEN OTHERS
    38     THEN
    39        UTL_FILE.FCLOSE (v_file);
    40  END;
    41  /
    Hello
    how are you
    I am fine
    PL/SQL procedure successfully completed.
    SQL> ed
    Wrote file afiedt.buf
      1  DECLARE
      2     l_text   VARCHAR2 (32767);
      3     v_file   UTL_FILE.FILE_TYPE;
      4  BEGIN
      5   -- OPEN FILE to write
      6     v_file :=  UTL_FILE.FOPEN (LOCATION          => 'NOTIFICATION',
      7                        filename          => 'Test.txt',
      8                        open_mode         => 'w',
      9                        max_linesize      => 32767
    10                       );
    11     UTL_FILE.PUT(v_file,'Hello');
    12     UTL_FILE.PUT(v_file,'how are you' );
    13     UTL_FILE.PUT(v_file,'I am fine' );
    14     UTL_FILE.FCLOSE (v_file);
    15    ---- open file to read
    16    v_file := UTL_FILE.FOPEN (LOCATION          => 'NOTIFICATION',
    17                        filename          => 'Test.txt',
    18                        open_mode         => 'r'
    19                       );
    20     BEGIN
    21        LOOP
    22           UTL_FILE.GET_LINE (v_file, l_text, 32767);
    23           DBMS_OUTPUT.PUT_LINE (l_text);
    24        END LOOP;
    25     EXCEPTION
    26        WHEN NO_DATA_FOUND
    27        THEN
    28           NULL;
    29     END;
    30      -- READ LAST LINE
    31    -- DBMS_OUTPUT.PUT_LINE ('Last Line : |' || l_text || '|');
    32     UTL_FILE.FCLOSE (v_file);
    33  EXCEPTION
    34     WHEN OTHERS
    35     THEN
    36        UTL_FILE.FCLOSE (v_file);
    37* END;
    38  /
    Hellohow are youI am fine
    PL/SQL procedure successfully completed.

  • Termination character for serial write

    Hi there,
    (LabView 6.02 on Win2k)
    Trying to communicate with a serial device I open a VISA-session on
    COM1 and it all works fine except that I'm not able to configure a
    termination character.
    I've tried the as well as the VISA property
    nodes. But I never get the desired termination characters (0xA or 0xD)
    sent to the port.
    What am I doing wrong?
    Thanks in advance,
    \Ulli.

    finally I found out the following:
    For the VISA session you have to setup (by means of property nodes)
    not only and
    but also set to "TermChar". Now everything
    works fine :-)
    Bernd-U. Seifert wrote:
    > Hi there,
    >
    > (LabView 6.02 on Win2k)
    > Trying to communicate with a serial device I open a VISA-session on COM1
    > and it all works fine except that I'm not able to configure a
    > termination character.
    > I've tried the as well as the VISA property
    > nodes. But I never get the desired termination characters (0xA or 0xD)
    > sent to the port.
    >
    > What am I doing wrong?
    >
    >
    > Thanks in advance,
    > \Ulli.
    >

  • Termination character enable

    I am connected to hardware via an RS-232 cable and am using VISA’s to request and read information from memory addresses. When I encounter a 0x0a (hex) in memory, the VISA Read stops reading because it thinks it has read the termination character. This only happens when a 0x0a is encountered, all other characters from 0x00 to 0xff are read in correctly (provided there isn’t a 0x0a in the location).
    I have set the Termination Character Enable property node to FALSE and it doesn’t seem to help (Ver 6.0.2). Any help on disabling the Termination Character would be appreciated.
    Thanks,
    DH

    I would think that setting the Termination Character Enable to false would prevent this. Maybe something else is turning it back on. If you use the VISA Configure Serial Port.vi (In instrument I/O>>Serial) it will turn this setting back on. So make sure you turn it off after any of these functions. One other thing that have done is set the Termination Character to 0x00, although I'm not sure what would happen if you got a 0x00 (NULL?) back from the port. Also check for other functions that may alter these settings after you set them.
    Hope this helps!
    Brian

  • Termination character enable is FALSE but active

    When opening a new VI and starting to write code (in the other words, no special initialization is done to the serial port settings, as yet), the Term Char Enable indicates FALSE. The reads do get terminated with \n (\x0A). After a little while, I found in the support that actually one needs to check a different attribute (ASRL End In), in order to have the correct picture. Is this behaviour by design (??!!!???), or is it a bug?
    Sincerely,
    Albert Lysko

    In VISA Configure Serial Port, setting Enable Termination Char to true (the default mode) does two things. It sets the VISA Message Based Settings property Termination Character Enable to true, and the Serial Settings property Serial End Mode for Reads to termchar. The serial end mode for writes is not set in the function and if you want to terminate each write operation with a termination character, you have to set Serial End Mode for Writes to termchar.

  • Termination character for RS232 Instrument

    I have an instrument that I am trying to communicate with via RS232.  I am having a difficult time figuring out how to write a command to the instrument using the VISA write VI.  I am able to successfully communicate with the instrument using a software program called Terminal (similar to hyperterminal).  A typical command starts and ends with ^m in Terminal.  For example, here is the command ^md01v00,00^m that returns the heat rate.  How do I write this command in the VISA write VI?  Is the ^m an unprintable character in LabVIEW that is represented in some other format?
    Attachments:
    Screen Shot.jpg ‏30 KB
    test.vi ‏26 KB

    Hi SumTumWong,
    I'm thrilled to hear that you resolved your serial communication issue.  As for your framing error that occurs, this is a common issue and we have a Knowledge Base article that explains what this error in full and how to resolve it.  The most common reason why this error occurs is that your serial port and device are configured to use a different settings.  The article shows how make sure that the settings of both your serial port and device are configured properly using Measurement & Automation Explorer (MAX).  Let us know if you have any more questions.  Have a great day!
    Regards,
    Todd Venable
    National Instruments
    Applications Engineer
    NI Prototyping Community

  • Terminal - character spacing

    Hello,
    Leopard has changed my carefully arranged terminal windows and now they overlap.
    No problem, I thought, there is a character spacing option to correct this.
    If the multiplier is set to 0.99, the windows are far too wide.
    If the multiplier is set to 0.98, the windows are far too narrow.
    Well, anything in-between (e.g. 0.988) reverts to 0.99 :-[
    Does anyone know a workaround?
    Thank you,
    Mike-oz

    Eldanen wrote:Tried something different with urxvt, which I know does xft...  Came up with this, and still some odd character spacing:
    http://img264.imageshack.us/img264/5003 … iv1.th.png
    It happens with some font sizes/types...
    Try putting something like this in your .Xdefaults:
    xft.dpi:: 96
    xft.antialias:: true
    xft.hinting:: true
    xft.rgba:: rgb
    and then either
    urxvt*font:: xft:Monospace:pixelsize=11
    or
    urxvt*font:: xft:Terminus:pixelsize=14
    reload .Xdefaults with
    xrdb ~/.Xdefaults
    You'll have to experiment a bit and figure out what works best on your screen.
    Last edited by fwojciec (2007-09-10 15:54:40)

  • Character mode Report in Landscape Format

    Hi All,
    I want to print my character mode report in landscape format. But I am not getting it. Everytime I get print as Portrait. I am printing from live previewer of report builder.
    I am using Oracle 9i and Report builder 6i (6.0.8.11.3).
    I have done following settings:
    System Parameter ORIENTATION=Landscape
    DESFORMAT=DECLAND.PRT (Given by Oracle)
    In the object navigator I have set following properties for Main Section
    Width=11
    Height=8.5
    Orientation=Landscape
    Char Mode Width=132
    Char Mode height=66
    I have done same settings for Header Section and Trailer Section. Please help me.
    Thanks in advance.
    Regards
    Mona

    You will need to edit prt files to add the printer escape sequences to change the page orientation to landscape. Printer escape sequences can be obtained from the printer manual, or the printer vendor.
    For instance, HP printer escape codes can be obtained from the HP website under the printer support links.
    The steps below describe how to print a landscape, character mode report from a Windows NT PC on an HP 4100N Printer. The 4100N is a dual mode printer that can use either PCL or Postscript printer language.
    1. Use a web browser to navigate to the HP website and obtain the printer escape codes for the HP 4100N. If you are unable to locate the HP4100N printer, look for generic PCL information. The HP site also includes detailed information on the printer command syntax.
    2. The HP4100N printer command for landscape page orientation is "ESC&l1O" - where ESC indicates escape, '&' (ampersand) is the parameterized character, 'l'(lower case letter l) is the group character, '1' (number one) is the printer value character and 'O' (upper case letter O) is the termination character.
    NOTE: The HP documentation uses "EC" to signify the escape character.
    It also suggests pressing CTRL and the letter P together, then
    releasing both keys and pressing the ESC key. If this is done in
    a dos editor, a left arrow will actually be displayed on screen.
    This character cannot be interpreted by Oracle Reports and will
    cause printing errors if used in a .prt file. Instead, just use
    the letters "ESC" to indicate that the code that follows is a printer
    escape sequence.
    3. Make a copy of the wide.prt file and rename it to "mywide.prt."
    4. Add the page orientation escapes to mywide.prt file:
    printer "mywide"
    height 66
    width 132
    before report esc "&l1O" *** Puts Page in Landscape Orientation***
    after page control(L)
    after report esc "&l0O" *** Resets page orientation to Portrait ***
    return control(M)
    linefeed control(J)
    SYNTAX NOTES: The escape sequence must be enclosed in double quotes ("). The above comments regarding page orientation are used to clarify where the escape codes gets added, but they should NOT be used when editing
    the actual .prt file.
    5. Save mywide.prt file to the $ORACLE_HOME\report60\printers\ directory.
    6. Go to Windows PC -> Start -> Settings -> Printers and open the properties for the HP printer. Ensure that the option to "Always Spool Raw Data" is checked. This option is usually under the General Printer
    Options, or Spool Options. On Windows NT, you must have Administrator privileges to change this setting.
    7. Test running the report to the printer and specify desformat mywide. It is not necessary to include the file extension (.prt).
    8. The report will now print in landscape orientation.

  • Phone numbers with "pause character" not working same as first-gen iPhone

    Is this a bug?
    When I configure a phone number in my contact list to use the "pause" character (which shows up as a comma character in the display) a number of strange things happen.
    For instance, if I configure the following: (###) ###-#### ,,**2216464#
    where (###) ###-#### is my office phone number
    ,, is a pause to allow for the automated attendent to pick-up
    ** is recognized by my phone system as a transfer to my voice mailbox
    2216464 is my voice mailbox
    # is a termination character recognized by my phone system.
    Using my first-generation iPhone, this worked fine.
    Using my new iPhone 3G, this no longer works.
    Some observations:
    When directly using the touchpad on the iPhone, it appears to send DTMF tones as quickly and for as long as you hold your finger on the keypad. But, if you configure a phone number in the contact list and that phone number has a pause in it, each number configured after the pause will actuate for several seconds. The tone for each number (in this case, the 2216464) last SO long that my phone system gives up on the call and, basically, terminates the call. In addition, the inter-digit time is SO small as to be non-existant. In other words, in my sample phone number, the leading two digit of my mailbox number sound like they are expressed by the iPhone as a single, extra-long tone. There should be a longer pause between the first two digits. If I attempt to break them apart by inserting a pause (displayed as a comma), the pause is SO long that, again, my phone system gives up.
    So, in summary:
    Why did this change between the first generation and second generation iPhones?
    Also, why is the pause "character" SO LONG? Instead of making a pause character, say, four seconds, why not make it one second and let the user put in four pauses if they want a four-second pause?
    Why does the character length appear to extend after use of a pause character?
    Why is the inter-digit pause practically non-existant?
    Thanks.
    Ken

    I'm having the same issue. I just got the phone last week and was trying to call a number with an extension. After realizing that Address book does not have an extension field I reformatted the phone number using the "pause" (comma). With this in place it will not dial the number. Remove the pause however, and it will dial the root phone number.
    Please tell me this is just a bug and will be fixed soon. It's bad enough that I've had to spend the last week reworking my contacts in Address Book after having to jump ship from my Palm software. As a business user it is a regular piece of daily business to encounter the automated receptionist asking for someone's extension. Since the iPhone doesn't show the number you just dialed (the extension is in there after the "x" but it doesn't recognize it) you end up having to memorize the extension prior to making each call.

Maybe you are looking for

  • Passing request value into a query

    Hi, I was wondering whether it was possible to pass a request value into a report query in apex 3.2. I have a button with a submit value of "ALL" which when pressed i need to open up all the contents of a query as opposed to on those that have been c

  • I have only sound and no picture coming through via air play

    I have only sound and no picture coming through via air play. It started after I updated all software on all my devices. What is wrong?

  • Why myThread.sleep(60000) Hangs Computer?

    I have been battling a thread hanging problem in my application for several days now. It appears to be hanging when I tell my second thread to sleep, but not all the time -- only after about four hours of running does it hang. The application is like

  • Sap  printer issue

    hi experts i am facing a problem,i am in IS-U ELECTRIC company having mass billing scenario.we r having 5 printer's which will print bulk of bill's every month.the problem is when we give print on 1 printer  in a lot (of 2000 bills) then the whole pr

  • Why no trial? If I don't like, what is the refund policy?

    Please provide details of refund policy and process for refund request. I don't want to buy a product that I can't try. FYI... I am currently evaluating Docudesk PDF Converter, which is working great. I will pay twice what Adobe wants for ExportPDF,