How to send this command to RS232 Port

I want to use LV to control a label printer to print what I need. Following info is from printer user manual.
From RS232 port:
If Codex has been used with the controller then the simple serial protocol will need to be enabled by sending ESC Z SWITCH ON <CR> (without spaces). Codex automatically disables the simple protocol for security reasons, so it is a good idea to start all sessions with this command.
ESC Z S W I T C H O N <CR>
à From BASIC the first line would be CHR$(27)+”ZSWITCHON”+CHR$(13)
Send the following ASCII data to the RS232 port:
ESC J 0 C H R I S T M A S <CR>
ESC J 1 A N D   S E A S O N S <CR>
ESC J 2 G R E E T I N G S <CR>
ESC J 3 T O   M Y   H E L P E R S <CR>
ESC J 4 0 9 8 7 6 5 4 3 2 1 2 1 <CR>
à From BASIC the first line would be CHR$(27)+”J0CHRISTMAS”+CHR$(13). Etc.
In VB I can use this command to control the printer. But In LV how can I do?
I'd appreciate it if anybody give me a simple sample.

A string control or constant in LabVIEW can be set for normal, hex, or '\' code display by just right clicking on the control constant. CHR$(27) is the the ESC character and the hex equivalent of 27 is 1B. The CR is hex  0D. So, a simple way to do this would be to have a hex display constants for the ESC and CR character and a normal display for the the command. Use the concantanate string function to build one string.
Message Edited by Dennis Knutson on 10-10-2007 09:57 PM
Attachments:
String Display Options.PNG ‏5 KB

Similar Messages

  • JDev TP4 DVT:Map Component: How to send a command to Mapviewer Server?

    How to send a command to Mapviewer Server programmatically using a DVT:Map component? ( for example : To capture a Theme info when i clicking in the a map theme position?
    Juan C LLanes

    Hi Juan,
    Are you trying to click on a point in the map and update another control on the page?
    This is available today, if you create a master-detail binding and bind the master to your map theme, and detail to another view e.g. a table, and check the checkbox "Enable row selection" when you create the map theme binding, then you will get this behavior automatically.
    If this is not what you are looking for, please clarify.
    Thanks
    Katia

  • Ready to print. Now, how to send this to the printer?

    Hello Again,
    The little program is 5.5 x 8 inch pages (letter size paper folded in half). They must to
    print it in 4 pieces of paper letter size, put them together and then fold them in half, (staple it).
    I am using 1/4 inches in bleed and I would like to have crops marks. Must to be PDF!
    I have no idea how to send this to the printer. Any help?
    Thanks a lot!!
    Jesus

    First, ask your printer.
    Second, printers generally want unimposed PDF. IOW, export regular pages and let your printer arrange them the way they want it.
    But definitely ask them first. And make sure you mention the bleed.
    Ken Benson

  • How to send a command in Hex to serial port

    I need to send the following command to serial port
    [SS] [1] [CR] to serial port , how do i do that in Hex

    Norman,
    Learn to write a single commands and get back a valid replies first, before
    you try to develop an app to continuously communicate with the instrument.
    Once you get the command set down, you can plug them into your state
    machine.
    Attached is a VI about ASCII to HEX and Carriage Returns.
    Parks
    "Noman" wrote in message
    news:[email protected]..
    > I need to send the following command to serial port
    > [SS] [1] [CR] to serial port , how do i do that in Hex
    [Attachment SS1 to Serial Port.vi, see below]
    Attachments:
    SS1_to_Serial_Port.vi ‏30 KB

  • How to send AT Command in fax modem from fax api?

    hi,
    i want to send a dial pad number in my fax modem.
    i am using Interop.FAXCOMEXLib dll in my C# Project.i can send and receive fax.
    i want to send a number of dial (after 20 sec dialing) for example send 5 number or send at command : "AT5" for dialing pad.
    can i send AT Command in Interop.FAXCOMEXLib ?
    please help me.
    Thanks.

    Hi Ali,
    I am not expert on AT Command.
    I have seen
    Send and Read SMS through a GSM Modem using AT Commands and
    AT commands Send/receive SMS. But i have never seen send AT Command in Interop.FAXCOMEXLib. I am afraid this is not support.
    Actually, this case related to desktop. If you still not resolve this issue, please redirect to
    Windows Desktop Development  >
    General Windows Desktop Development Issues
    forum for better support.
    Thanks for your understanding.
    Good Luck.
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to send a command from a vc++.exe to LABVIEW.exe in order to control the button on the LABVIEW.exe

    Hello, everyone. Using VC++, I have gotten the handle of a *.exe(built by Labview), but I cannot get the button handle. I want to get the button handle and post the message to control the button. How can I do that? When I use the SPY++, the *.exe(built by Labview) have not any child windows which is very different from the *.exe(built by VC++). In SPY++, what is the LVDChild class? How can I send the message to control the button on *.exe(built by Labview)???
    That is  to send a command from a vc++.exe to LABVIEW.exe in order to control the button on the LABVIEW.exe. How can I get it ?
    Thank you!

    hummingbird wrote:
    Thank you! But I dont kown how to use vi server to raise a value signalling event. Can we put vi server into the vc program? Can you give me some more information or some examples, hehe!
    hummingbird
    Checkout the LabVIEW ActiveX server interface in the User Manual in Chapter 20, Windows Connectivity and the VI Server Reference in Chapter 17, Programmatically Controlling VIs.
    There is a sample for Visual Basic under examples/comm/VBtoLV.frm, which should be quite simple to translate to Visual C as long as you can figure out the basics of ActiveX programming in VC (I have never done anything with ActiveX in VC). For those basics I would recommend some text book or MSDN.
    Rolf Kalbermatter 
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Send Ascii command Through RS232 Interface in labview

    Hello,
    I tried to use labview to control the CD2A Compudrive.
    Actually I found the driver of CD2A online in the following link
    http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=266
    but however, I still can't use this driver to send the command and adjust the parameter.
    p.s. Use only "CD2A Setup" or "CD2A Init" should be enough to set the parameter and command, right?
    The command code written in the CD2A Manual is, for example,
    <STX>ST600<ETX><LF>   which is Start of Message,Start Position 600 nm, End of Message, Line Feed
    I've tried to send this using MAX (Measurement & Automation Explorer), but the signal I got back is
    −1073807298
    = Could not perform operation because of I/O error.
    For the command in the driver above,
    The code is written in number form of ascii format  >> e.g. <STX> = ascii 02
    and The Code is written as
    \02ST600\03\r
    But sending this code>> nothing happens
    Which is quite confusing for me.
    1. Is it general to write \02  to send <STX> signal??
    2. actually <LF> = ascii 10  >> so why does it use    /r         instead?
    3. What should I do, is my format correct???  I can't even send one signal to operate it at all.
    Thank you very much for help

    A string control can set for 4 different types of display. When you right click on it, you can select Normal, '\' Codes, Hex, or Password. Normal is ASCII character and the unprintable characters such as <STX> cannot be entered. The <STX> is hex 02 so you enter this as \02. The '\' says to interpret the next byte as hex. A <LF> is not ASCII 10 at all. It is hex 0A. For readability, it was decided a long time ago that certain '\' characters could be represented a bit differently. If \n, that was hex 0A. A \r is hex 0D or the CR. You can find documentation on these stand C Escape Sequences. In LabVIEW, you can type \0A into your control and it will automatically convert or \n.
    Your other option is to use hex display. You just enter all of the hex equivalents though it makes entering the ST600 a bit more difficult in your case.
    I'm not sure if the data entry in MAX is set for '\' Code Display and whether it is interpretting your string correctly. I know that the Basic Serial Write and Read example in LabVIEW is set this way and you might want to try that.

  • How to send SCPI commands to a VXI instrument

    I am using a VXI Interface tech SR2510 LVDS card with teststand and keep getting the following error when the intial diagnostics test trys to run. "Device I/O Driver error" I tried to use the Visa Interface and the interactive control in NI MAX but was not able to send SCPI commands. What can I use to communicate with this card. The resource manager does successfully execute and I see my instrument in the devices list so I am confident it is not a VXI problem.

    Hello DF1963,
    Can you communicate with the card through its driver/interface? Also, please review the following NI-VISA Help topic: Introduction to Programming VXI Devices in VISA to ensure that correct commands are being sent. If your device is correctly configured in MAX, I would also recommend verifying with the card manufacturer as well.
    Best regards,
    Ali M
    Applications Engineer
    National Instruments
    www.ni.com/support

  • How to send AT commands with JAVA?

    Hi,
    to get the cell id on a mobile phone I would like to send "AT+CREG=2" as an AT command to the mobile phone.
    Is there an API for getting network registration things like the cell identification of a gsm mobile phone or is there a possibility to access the mobile phone with AT commands?
    In MIDP 2.0, there is the possibility to access serial ports of a mobile phone. Probably this will work?
    I would be glad, if anyone could give me an idea. I'm investigation since weeks.
    greetings,
    Ralf.

    Hi
    i really don't know, but when i read your posting i thought that this may not be possible because it would break the java security concept.
    I guess, if you'd like to get any plattform/device related information you would need to have a vendor/device specific api.....
    but as i said, i don't know, i just guess...

  • How to send multiple commands throught the Instrument I/O Assistant

        I am using the Instrument I/O Assistant to set up an instrument driver.  I am only using two rs 232 commands. The way I have the Instrument I/O Assistant setup is: first I have a default instrument setup step then I use a write step with the first command, then I read and parse, then I do a write command again with the second command and finally I read and parse again.  All of this works fine inside the window but  when I run it in my program  only the first  command's response it outputed . The second command's response is not outputted it just sends a null. Can the Instrument I/O Assistant only handle one read and write, or is my logic wrong?
    Thanks for your help
    Ian

    Hi Ian,
    You should be able to perform multiple reads/writes with the Instrument IO Assistant.  What termination character are you using?  I have seen cases where different termination results in different parsing, which may explain why you're only receiving a null character on your second read.  Thanks!
    Regards,
    Anna M.
    National Instruments

  • How to send ATA Commands in MAC OS X

    Hi,
    *Our end target is SSD(SATA device. Our requirement is to write some data into SSD using ATA Write. We know in windows we can use DeviceIoControl(...) and ATA passthru commands for write. If any one knows how this task achieve in MAC OS X. Is there any interface supporting this task. Our SSD using AppleAHCIPort driver. Please find the following few more information below regarding our SSD(Information from IORegistryExplorer).*
    *IOClass: AppleAHCIDiskDriver*
    *IOProviderClass: IOAHCIDevice*
    *please respond...*
    *Thanks in advance.*

    Good answer. I despise the hall monitors in these forums. (Relax, cut back on the caffeine, go outside there's this big ball of file in the sky you might find interesting). I might understand if someone is abusing the forums with repeated and unnecessary cross posts. But come on... this person, for example, has a sincere question that may be better served because the question is posted on a couple of different forums.

  • How to send two commands within one URL call

    Hey gurus,
    I was wondering if it is possible to concatenate two commands in one url call:
    SAPBWOpenURL(SAP_BW_URL_Get() &DATA_PROVIDER=DATAPROVIDER_1
    &CMD=EXCHANGE
    &IOBJNM_2=GROUP1
    &IOBJNM_1=GROUP2
    &FILTER_SIGN_1=E
    &FILTER_VALUE_1=
    &CMD=REMOVE_FILTER
    &IOBJNM=GROUPX);
    The URL should exchange 2 infoobjects and remove the filter of one specified.
    Can anyone help me out?
    Thanks,
    Andreas

    Thank you Chandran - you saved my day
    Will dedicate this day to you
    Cheers,
    Andreas

  • Acessing a website using a boomark generates a message "There was a problem sending this command to the program"

    Problem only occurs with Firefox - not with Explorer.
    If I access the website directly and not through a bookmark, there is no error message.
    The website is still accessed properly, but I have to click on 'OK' to get rid of it.
    Deleting and reforming the bookmark does not solve the problem.
    If I disable the Roboform extension, the problem goes away.

    Hi bob1935-
    I did some research and found a couple of previously answered questions that have multiple options for solving your problem. Please look at these:
    - https://support.mozilla.com/en-US/questions/760489
    - https://support.mozilla.com/en-US/questions/809976
    I hope one of those fixes your issue!

  • Want to use dotNet with teststand, but unsure how to send commands through serial port

    I have a loCom communication dll used to send and recieve commands through serial comunication for a particular product.  I the past they have used a LabVIEW wrapper to send and recieve commands, using this particular dll.  I would like to just use testStand for the DOTNET Dll.  I can get the commands, know the inputs and outputs required, however I can not figure out how to send the commands to the serial port.  Anyone have any exprience doing this in TesSTand?

    hallawt,
    With your .NET code module, you should be able to call it directly, most likely as a parameter in the .NET method.
    What are the inputs for the method you're trying to use?
    Also, could you clarify where you're starting to have problems in your project?
    Regards,
    Renée M
    Applications Engineer
    National Instruments

  • How to send command to the control board?

    Hello everyone
       I am developing pci-7344`s driver under RTX.It says in the DDK that
    command and data passed to or from the controller is handled in a
    packet format. A packet consists of resourceID,commandID,data etc.Now I
    know the information of resourceID,commandID,data etc.DDK or the
    hardware user manual does not mention how to send them in a packet.
      Moreover The command buffer register is 16-bit.
      I try to send them one by one but it indicates "modal error" in the
    csr.Since I have not programmed "error-handling" part of the driver ,so
    I do not know what the error codes are.
    Hope some advice on how to send the command packet? It is best if there
    is an example !!
    Thank you!!!

    Sandy,
    Here is a modified version of the example I suggested. It includes the  option of using the parallel port for communication. I am in the process of getting some example ZPL for you for the label formats that you are using.This example should give you everything you need to communicate with the printer.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot
    Attachments:
    Basic Serial Write and Read (8.6).vi ‏24 KB

Maybe you are looking for

  • Java WebDynpro - Sneak Preview

    Guyz, I installed java stack (sneak preview) couple of months back and when now i'm switching it on, my J2EE Server is automatically switching off after certain time..... upon checking logs in 'Developer Trace', it says its shutting down while licens

  • Apple Remote Desktop CANNOT observe/control/curtain 30" Cinema Display

    Apple Remote Desktop CANNOT observe/control/curtain 30" Cinema Display. All my other pc's (G4, G3, titanium, 17" Powerbooks and Macbooks) can be observed, using identical settings. i figured out that it may be the graphics card while trying to Micros

  • Very low volume on hp pavilion dm4-1160us, idt high definition audio codec v 6.10.6289.0

    Hi There, Initially when I bought my dm4-1160us, the volume was better but I don't know what happened in between, now the volume is very low. I have re-installing the driver by un-installing and also using the recovery manager but still it didn't hel

  • HT1831 Can I listen to Itunes u on my shuffle?

    I would like to at least listen to the Itunes U on my Shuffle? Is it possible? If so, How...Thanks

  • Flash Preloader not working anymore

    The final and most crucial part to completing a project I have is the preloader. When I first developed this, the preloader worked fine. a 1.7MB file later, it shows a blank screen, and then the preloader shows 100% and the page loads. I was given ad