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.

Similar Messages

  • Sending ASCII commands through USB hub

    I am having issues connecting to hardware. I have 3 types of hardware connected to a Serial to USB converter hub. 2 of the hardware take ASCII commands while the other does not. I am able to communicate with the hardware individually without the hub but when I connect the hardware to the hub and the hub to my computer, it does not work. I do not think MAX sees the hardware connected. Any ideas?
    CLD Certified 2014

    When you say "hub", are you talking about a product like the QUATECH USB to serial adapter (4 ports)?
    If so, then each port has its own serial port assigned to it.  You should be able to communicate through it using a terminal emulator, such as HyperTerm, TerraTerm, ProCOMM, etc.  
    You do have to install the driver for the box and you can also configure the starting COM port number.  For instance, Port A on my box is COM-3.
    You can open multiple ports in parallel, as long as you select different COM port numbers.
    MAX should see the serial ports.

  • Print Report using ASCII command through printer selection available on windows

    Hi,
    I'm using Labview 2009 to create a report using Report Generation Toolkit.
    Creating a report is not the problem, the problem is I need to print the report manually by sending an ASCII Code.
    I noticed that there are few example on send ASCII code command, but neither of them are related to printing.
    The printer I use is Panasonic dot matrix printer KX-P1121E with USB port. (Fanfold type of paper)
    I used "NI_report_lvclass: Print report.vi" from Report Generation before this to print my report, everything is okay and not receiving any error.
    But I noticed that after finish printing, the paper will automatically feed out as if that VI (Print report.vi) is sending out "Form Feed" (FF) Command to the printer. 
    My application cannot use this method because I need to print a set of data in every minute. If the data only have 2 rows, then it will be a wasting a lot of paper if everytime finished printing paper feeding out. I want the printer to continue standby on the same paper after finished printing previous data. In other words, maybe just manually send "Line Feed or Carriage Return" to the printer.
    So I have a few things need to be clarified step by step;
    1. How can I send an ASCII Code to my printer? Do you have any example for this? link below is the character of ASCII Codes that can be use :http://webpages.charter.net/dperr/links/esc_p83.ht​m
    2. Can I send a report created by report generation to be printed using this ASCII command method?
    3. If my printer is setup by using windows (Meaning: Available on "Printer and Faxes" list), How can I configure the printer setup in sending the ASCII Code? 
    Really appreciated your reply
    Thanks!

    Hi Zwired1,
    Just to make sure I fully understand the situation - I am assuming since you say you are printing to two different printers that when you are using the Print Report.vi you are using the printer name string to specify which printer you would like to print on. And if the printer that you specify is not functioning it automatically prints on the other printer, is that correct?
    From looking at the code in the Print Report.vi, it looks like if you specify a printer name in the input string, if there is a problem with that printer or if that printer is unavailable, the VI should not print anything, so please let me know if that is not the behavior you are seeing.
    For your question about checking the health of printers, there is a VI in the report gen toolkit called Query Available Printers. You can find it if you open up the Print Report.vi and choose the Standard Report instance, the Query Available Printers.vi is on the block diagram of that VI. It will return the list of available printers and the default printer.
    I hope that helps,

  • Sending ASCII commands by tcp to wireless device

    Hi to all. I have some AVL (automatic vehicle location) devices. I work with them through GPRS by USB modem (Compass 885). I read data from them through UDP port and everything works fine. But I have to send a commands to the devices by TCP and I don't know how. All of examples are not helped. Ping test to IP of device is OK.  Hope to your help.

    You have the pointer to nmap.  But you could just try any search engine for more info.  That is now in your task to deal with the protocol for communication.  We can point you to how to use LV, how to find out certain information but you need to do the specific work for your task.  What port your AVL is on, is information specific to your problem.  It was a design choice by whoever wrote the software/firmware for the AVL device.
    nmap is a powerful tool and with great power comes great responsibility.  It is used by hackers and network administrators.  The full use of nmap is beyond this discussion group but you can use the link for more information.  This is not as good a solution as asking the designers for their communication protocol.  It is designed for communication and so it would be absurd not to publish it in a manual or keep it secret.

  • Sending linux command through labview

    Hi,
    I am using Labview Professional Development system and I have to create a VI that opens a command prompt window to session into a linux based device.
    I have used System Exec to open the window and got to "root-bash#" prompt.
    Question:
    - How do I send command to the linux prompt ? Do I need to buy the labview linux package for Pipe VIs ?

    How about a TCP connection?
    Ctrl-Space (open quick drop) and TCP give me the TCP vis ....
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • 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

  • How do I monitor serial port activity without first sending a command?

    In my application I am sending a command through the serial interface and I want to monitor the response. The response is not instant, in fact it is a timeout response indicating the requested action did not work. How do I monitor so I can parse what is coming in over the serial port without necessarily sending a command?

    You can always place a loop where you monitor the number of bytes at the serial port.
    After configuring your VISA serial port session, you can create a Property Node to get the number of bytes available at serial port.
    You can then process this information, for instance:
    1. Establish a timeout because you never get a response.
    2. Do serial port read if there is data available.
    You can exit the loop with a timeout condition or having processed the data.
    -JLV-

  • Send serial command in VBAI based off of calculation

    I am attempting to send serial commands through VBAI based off of a previous calculation step. For instance, my application will determine an objects mass center and then determine if it is to the left or right of my origin. From here, I would like to be able to send a serial command based on the left/right result. The command will be sent to an arduino which will controll a servo left or right based on the command it recieves. I think I have everything but linking to serial command to the calculation result figured out here. Any feedback or help with this would be greatly appreciated.

    In the Serial step, when you are sending a command (i.e. you press the "Send Command" button), you can press the "Insert Result" button to have the serial command you send out conatin a result from a previous step. There are even formatting options so you can have numeric previous measurements formatting into the string as you want. If you need to send results from other states, you can use variables to pass data between states since the Serial step doesn't currently support accessing results from other states.
    Hope this helps,
    Brad

  • Sending 'show' command outputs to console/terminal using EEM

    Hi Everyone,
    I'm new to EEM and was wondering if it would be possible to send 'show' commands  (like 'show interface' or 'show crypto ipsec sa') to the terminal/console session after every, let's say, 10 minutes using watchdog timer. I know how to send it to the flash but would like to know if something of this sort is possible.
    Any suggestions would be really appreciated!
    Regards,
    Nikhil

    Hi Nithakur,
    you can try the "action puts" from EEM
    event manager applet SHOWI
     event timer watchdog time 600
     action 1.0 cli command "enable"
     action 2.0 cli command "show int X/Y"
     action 3.0 puts "$_cli_result"
    for this to work, you would need to have "logging monitor informational" in your run and "terminal monitor" activated. The other option is to use IOS send command
    event manager applet SHOWI2
     event timer watchdog time 600
     action 1.0 cli command "enable"
     action 2.0 cli command "show int XY"
     action 3.0 set A "$_cli_result"
     action 4.0 cli command "send *" pattern "C:"
     action 5.0 cli command "$A\032" pattern "confirm"
     action 6.0 cli command "yes"
    Note that the \032 is an equivalent for CTRL+Z (^Z) so after you configure it, you will see this line as
     action 5.0 cli command "$A^Z" pattern "confirm"
    in your ruiining config.
    Regards,
    Alex

  • How to control RS232 Interface through LABView?

    Does LABView have the ability to control RS232 Interface? If it does, what version of LABView has this capability? The LABView versions that we have in the company are 7.2 and 8.1 only. The operating systems that we have are Windows and Linux.

    i have a question i am wanting to control an rfid reader/writer that has a  RS232 or USB connection through labview. Here are some specs on the product. is this possible for it to work.
    Key Features
     Fast data transfer
     Supports multi-detection
     ANT1015A for wall or desktop 
    mounting
     Baud rate: 19,200bps, N, 8, 1
     ABS housing
     RS232 or USB connection
     IP40 protection rating: waterproof 
    and dustproof
    Technical Specifications
    Frequency 13.56MHz
    Technical certificates CE, FCC
    Power requirements 12V DC, 300mA 
    Display 3 status LEDs
    Read/write distance 30cm, with ISO 15693 compliant transponders
    Technical Certificates CE, FCC 
    Antenna connection RP-SMA 50ohm
    Transponder compatibility HF, ISO 15693 compliant transponders
    Operating temperature 0 to 60°C
    Storage temperature -20°C to 70°C
    Humidity 10% to 90% relative
    Dimensions 345mm × 240mm × 20mm (L ×  W × H)
    The link below will take you directly to the product.
    Hf Rfid
    Attachments:
    13.56 MHz. High Frequency (HF) Reader RFID Writer with Antenna.pdf ‏389 KB

  • 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

  • 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

  • Can LabVIEW send an email through Microsoft Exchange server without an account set up in Outlook?

    I've found sample code that shows how to send email through Outlook using LabVIEW.  On any computer I log into on our network, my profile loads and I have access to the exchange server through Outlook so the code works.
    However, I am developing a program that will run on a lab computer with a generic PC login that is shared among everyone in the lab.  Exchange server/outlook is not set up for the generic user.
    Is it possible to have labVIEW send an email through the exchange server with a server name, username, and password coded into the executable?

    You would need to send a standard SMTP message via Exchange. The Exchange server will likely require authentication, so you won't be able to use the built-in SMTP VIs, as they do not support authentication. If you're on Windows you can use .NET (see this example), or use the OpenG SMTP VIs.

  • Send a Unix command through ARD that will change a OS X admin user to a standard user.

    I would love to send a Unix command through ARD that will change a OS X admin user to a standard user. The only thing I found close is
    sudo dscl . -delete /Groups/admin GroupMembership USERNAME
    which does remove the user from the list of admins, but they are still listed as an admin in the user preference panel, and can still use their account to authenticate for admin privileges.

    I'm not having any problems adding or removing users from the 'admin' group by using the syntax's
    dscl . -delete /Groups/admin GroupMembership ARDusername
    or
    dscl . -append /Groups/admin GroupMembership ARDusername
    What I'm saying is if a user is ticked as an Adminstrator in System Preferences and I run the
    dscl . -delete /Groups/admin GroupMembership ARDusername syntax and remove them from the 'admin' GroupMembership they still have the Administrator box ticked in System Prefs and can administer the machine.
    By the way the '/' doesn't work in the syntax in ARD.
    Thanks

  • Sending Data from BI to Third Party System through CIB Interface

    Hi Experts ,
    We have a requirement where we need to send data from BI to any Third Party System through CIB Interface . We do not have to use the OHD's . Please share the documents for the same .
    Regards
    Garima

    Hi,
          My problem is solved.
    Sol:  Getting wrong data from third party sytem. They are adding spaces in front of the payload and end of the payload so it was not processing. After deleting that spaces its is working fine.
            Thanks for your help.
    Thanks & Regards,
    Purshothamm

Maybe you are looking for

  • I installed Adobe Reader 9.20.  Docs have lines with black blocks. Help?

         I am not sure what to do.  I upgraded to the 9.20 and have had problems ever since.  I tried uninstalling all adobe products and reinstalling and am having the same problem.  Large portions of text in the documents are "blocked out" with a black

  • Camera connection kit USB

    Hello, When I'm travelling I like to make create music on my iPad. The USB camera connection kit is great even for plugging the tiny USB MIDI keyboards and work with GarageBand. I find unbelievable that the same USB camera connection kit doesn't work

  • Using a flash drive

    Aloha all, I can't believe this hasn't been asked before, but after 15 -20 min of searching the iPhoto forums I haven't been able to find a difinitive answer. So, can I store my library on a large flash drive, and use it to view my photos? I know I c

  • Can I disable the radio in iOS7 on the iPad?

    I use iPads with 4th graders in a 1 to 1 environment.  The radio is proving to be a distraction and I would like to remove the option for students to access it.  We have audio books that they listen to and some stuents are quite adept at looking as t

  • IMovie is speeding up my clips

    I have a series of clips that I've recorded on my camera that I'd like to import into iMovie. The problem is that every time I try to import them, they show up in iMovie as being shorter than they should be, because iMovie is speeding them up. For ex