Communication through serial

hi everyone,
My name is Zhi and I have another problem with on my senior project. Right now, we are trying to make labview communicate with an old stage. Its model is Neat_310M ( I have its manual uploaded). I have beening trying to make an simple communiation like wake up x-axis stage and ask it to move relative 10000 steps. However, I can only sucessfully do these two actions in hyper-terminal. When I used the VI i have set up, the stage  does not responding at all. 
my concern is that I did not open the serial port properly because while I continuely run the VI, I can still open and run  the hyperterminal together. (i believe two programs cannot share the port at the same time).
my other concer is that  since the stage controller echo back whatever command i type , for example,  I want to ask stage to move relatives  10000 steps, when I type the command, "mr",  then the controller will echo back "move relative". After it is echo, I enter the number and the stage moves.  I obeserved this kind of respond in hyperterminal.  I am wanderin if this kind of responds will cause the problem that i have.
thanks
Message Edited by zhao.lin on 05-12-2008 07:14 PM
Attachments:
test 1.vi ‏22 KB
Neat_310M_Manual.pdf ‏1120 KB

Hi zhoa.lin,
Yes, after you use Serial Write to send a command, you have to use Serial Read to read anything that is being returned.  You should use "Bytes At Serial Port" to find out how many bytes to read.  And use a string indicator to show what was read.
Remember to close (or hang up) Hyperterminal before running LabVIEW's serial communication.
RayR

Similar Messages

  • Transmitting more than 8 bits in labview through serial communication

    hello,
    i am working on communication through microcontroller and labview. My data is greater than 8bit. Can anyone may please help me in suggesting how to do it. Also i am interested in getting the real time images of the front pannel during the run time.
    Thanks

    You're going to have to split up your data among multiple bytes.  If you are sending 16 bit data, send it as two bytes.  32 bit data, four bytes.
    Look at split and join numbers VI's and also typecasting.
    You'll have to provide a little more description about what you mean by "real-time images of the front panel".

  • Send DAQ measurement results through serial ports

    Hi, All
    I use PCI-6034E for measurement. After DAQ gets data, I send them to another computer through serial port (com1). I write a Virtual C++ program, which calls NI-DAQ library functions to implement DAQ data sampling (multiple channel scan) and sends measurement data to another computer through serial port under request. DAQ data sampling and serial communication are implemented in two threads. They are running concurrently. They share a global memory for measurement data. The serial communication thread will do infinite wait and send data only when another computer sends a request through serial port.
    I met two problems. First, when I reduce the size of DAQ measurement buffers (piBuffer and halfpiBuffer, I us
    edouble buffer model), DAQ measurement is often interrupted by the message "[DAQ_DB_HalfReady] returned NI-DAQ warning 10846. Your application was unable to retrive data from the background acquisition buffer fast enough so the unretrieved data was overwritten with new data. ...". I want to get run time data so I need to reduce the buffers as small as possible. How can I solve it ? The second problem is that the serial port gets error data (nothing) from measurement computer sometimes, especially when DAQ initializes itself and finishes work. It looks like that there is a conflict between DAQ and serial port. Does anyone have similar experience about this? Any suggestion?
    Thank you in advance.
    Le Cai

    Le Cai,
    You are correct that the number of scans to read is equal to half of the buffer in double buffer mode. I was mistaken and referring to a standard (non double buffered) operation. However, you can increase the size of your buffer without affecting the period of your acquisition. A buffer of 60 is quite small and, as such, will be more prone to overflow errors. The rate is actually set through the DAQ_Rate() and DAQ_Start() functions. For more information on these functions and how to configure the scan rate, please see the NI-DAQ Function Reference Manual.
    NI-DAQ Function Reference Manual for PC Compatibles
    http://digital.ni.com/manuals.nsf/websearch/1630A0B68738B269862567C1007A2912?OpenDocument&node=132100_US
    A good place to start would be the example titled, "DAQdoubleBuf.c" which ships with the NI-DAQ driver. If you installed the examples for Visual C++ when you installed the NI-DAQ driver you should be able to find this example in the \Program Files\National Instruments\NI-DAQ\Examples\VisualC\AI folder on your computer. This example would be a good template as it is very close to what you are trying to do.
    If you observe that you only receive the overflow error when you are operating the two threads, thus ruling out the buffer size as being a potential problem, you may want to examine whether or not your second thread is placing a lengthy exclusion on your data buffer during the period when your first thread is trying to move the data. If your first thread has to wait during the half-buffer transfer this could easily cause the overflow, as the acquisition would be running but the transfer would be paused. Instead of placing a mutual exclusion around one piece of global memory you could try using a queue instead. A queue approach will allow you to pass the data from the first thread into a queue to be read, when convenient, by the second thread. In this method the first thread would never have to wait as the transfer would just be a handoff.
    Regards,
    Justin Britten
    Applications Engineer
    National Instruments

  • 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

  • Reading Pulsewidth Through Serial

    I am using a Parallax accelerometer to measure acceleration and the output of the accelerometer is a TTL Pulsewidth.
    I am wondering if it is possible to read the pulsewidth in through Serial DB9 connection and measure the actual pulsewidth.
    Thank you for any help.

    The short answer has been given. You can't do what you asked directly with a serial port. You need a device between the digital logic (TTL pulses) and the serial port - specifically a Digital Input DAQ. There are scores of these available for under $100. Trouble is, accelerometers are high speed devices, so you'll be limited by what you can detect by the speed of serial port communication, and DAQ's sample rate. Look for >1000 samples per second, assuming the Parallax can run at 115,200 baud.
    Richard

  • File transfer of larger size through serial port

    Hi
    I need to transfer files of larger size may be around 20Kb through serial port. Can some one suggest some idea or can provide any sample VI for achieving this. i guess we cannot send the complete file at a stretch, so we may need to form some packets and then send. If i am right i need some help for achieving this.
    Padhu

    You may want to use something like the XMODEM protocol. 
    I believe you can find a version of XMODEM that can be used with an NI-VISA session located here on the OpenG forums.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • UDP communication through proxy

    Hello,
    I've been struggling for hours now trying to work out how to use UDP communication through a proxy. It took me quite a bit of work to get it working for HTTP, but it's working fine now.
    I'm trying to use the DatagramSocket class and there's no option to use a proxy anywhere. I tried setting the proxy globally by doing:
    properties.put("proxyHost", "proxyAddress");
    properties.put("proxyPort", "proxyPOrt");
    properties.put("proxySet", "true");
    but it doesn't work. I get errors on name resolution when I try to connect.
    I'm looking for a global (programmatical) way to set up the proxy, so that I can use the InetAddress too to get IP addresses and such.
    Cheers.

    properties.put("proxyHost", "proxyAddress");
    properties.put("proxyPort", "proxyPort");Those two properties are just equivalents for http.proxyHost/proxyPort. They come from the defunct HotJavaBean (1997-8) and somehow leaked into the JDK, maybe because books of the era mistakenly documented them as part of the JDK, or maybe because part of the HJB implementation leaked into Java.
    properties.put("proxySet", "true");That property has never done anything in the JDK. It did something in the HJB which is no longer with us ...
    There is no support for UDP proxying in Java.
    but it doesn't work. I get errors on name resolution
    when I try to connect.That's a DNS topology issue, nothing to do with proxying really.

  • LV acquire the print information from the embed board with Linux system through serial port

    I want to acquire the print information by LV from the embed board with Linux system through serial port, like the window hyperterminal tool?
    I try to use VISA serial config function to achieve it ,but lost and prompt that is error like attachment.
    I can't sure that my idea is reasonable.
    help me
    thanks a lot!

    I ended up finding the answer to my problem. After pointing a client directly at one of the DPS systems, I saw the following error in the logs:
    [27/Jul/2009:17:11:47 -0400] - OPERATION  - INFO  - conn=3688 op=4 BIND RESPONSE err=12 msg="The server is not configured to pass through control 1.3.6.1.4.1.42.2.27.8.5.1" etime=0After adding that control OID to the allowed-ldap-controls, I could login via password auth. Adding this control also allowed for password changes to work from a client system.

  • Communicating through the iPhone photos app

    I upgraded my iPhone and gave my wife the old one. How do I change my name to hers on the photos app? She has her own account and so forth. It is only the photos app that still thinks it is my phone.

    Hi, AyaniB_VZW
    The app on her iPhone is called Photos, not iPhoto. (It is one of the apps
    that comes with the iPhone, and it cannot be deleted and reinstalled.) I
    reset the phone to factory settings before activating it for her. In fact,
    I did it again yesterday, just to make sure.
    Jursi
    2013/10/16 Verizon Wireless Customer Support <[email protected]>
        image: Verizon Wireless Community<http://community.verizonwireless.com>  <http://www.verizonwireless.com/b2c/index.html>
    <http://www.verizonwireless.com/b2c/explore> <http://www.verizonwireless.com/b2c/store/controller?item=phoneFirst&action=viewShopIndex> <https://wbillpay.verizonwireless.com/vzw/nos/topline.jsp> <http://support.verizonwireless.com/clc/>    Re:
    communicating through the iPhone photos app  created by Verizon Wireless
    Customer Support<https://community.verizonwireless.com/people/vzw_customer_support>in
    Apple - View the full discussion<https://community.verizonwireless.com/message/1008320#1008320>

  • How are we every supposed to develop a community through Ping?!

    I could give a crap if this is a sound statement or not, I run a few mixes that I update frequently through Ping and the server is so slow and does not update effectively when creating or managing playlists! How the **** are we ever supposed to develop a sense of community through Ping when its this awful!!? Comon Apple, you can do better than this!!

    http://www.apple.com/feedback/itunesapp.html

  • HT201472 how can I track my lost iPhone 5 through serial number?

    How can I trace the location of my lost iPhone5 through serial number?

    ouch How can I find it through Find My iPhone if its offline?

  • Communication through RS232c serial interface using labview

    i am trying to communicate with a device through RS232c serial interface using labview 6.1....i have tried to run the example "Serial communication.vi" provided in 6.1 and it doesnt work....do i need any special hardware or do i need to configure my hardware to communicate through RS232c...
    thanks in advance
    shri

    Seems like I placed a small (maybe 30ms) delay at the end of the serialcommunications.vi structure.. for some reason my PC didn't like running as fast as it tried to go. Also look into the actual serial communication.vi and open the vi's inside it - check that the port setting (0 or 1) are ok, the baud rate (probably 9600) are ok. I'm running with only three wires in my application, TX, RX and Common. The PC may need to be rebooted to enable the com port - or use device manager and see if it says the com ports 0 and 1 are both OK..
    Try buildinga loopback plug with TX to RX, RX to TX, and Common to Common and see if hyperterminal (or other serial communications program works - there is also Loopback.VI in the NI library somewhere that can be used. Good Luck!! Dave

  • User-specified DAQ interruptions, instrument control through serial communication

    I'm working on an instrument control program, and I've run into a structural problem that I cannot figure out.
    The instrument in question is effectively a thermostat.
    The program has two functions:
    1.)  Background sampling to record temperature in a log over time.
    2.)  Adjust temperature according to user input
    The issue is that the instrument uses EIA-232 serial communication to talk to the PC.
    This prohibits simultaneous execution.  Attempting to send a command while the program is taking a sample will result in serial blockage errors.
    So the program must interrupt background sampling until the specified command has been completed.
    I can't figure out how to do this.
    My best idea was to create a manual pause control.  If the user wants to adjust the temperature, he hits a switch to pause the sampling, sends the appropriate command, then hits the switch again to reinitiate sampling.  This method will suffice, but is not ideal.
    Beyond that, I really have no idea how to prevent the two functions from running into each other.
    Help structuring this program would be greatly appreciated,
    Thank you

    Look into Semaphores (icons with traffic light glyphs)
    Set up a Semaphore resource to the COM port that is wired to two parallel structures.
    One structure would do the background polling, the other would handle setting changes.
    Prior to background poll, lock the resource, then unlock it after the poll. Likewise for the setting change command.
    When a resource is locked, the other process cannot access it until it is unlocked. Be sure to dispose of the Semaphore when ending the program.
    -AK2DM
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    Attachments:
    SempahoreExample.jpg ‏256 KB

  • Communication from a fieldpoint also acting as a OPC server to a simatic 545 through serial?

    Hi...
    I'm supose to control a breweri, and right now it is controlled by a simatic 545.
    Is it possible for fieldpoint and connect directly to the PLC with OPC using serial?
    I have the software to run NI's OPC server, but haven't bought a fieldpoint yet.
    So i was wondering if this is possible to reuse the I/O oirts of the PLC instead of buying new I/O boards for the fieldpoint, which is very expensive.
    Thanks..
    Carsten Toft
    Aalborg University Esbjerg, DK

    The easy scenario is to use FieldPoint with the OPC server to provide distributed I/O for your HMI/SCADA application.  The same HMI/SCADA application can communicate via OPC to the Simatic 545 thru serial.  In this scenario, the data move from FieldPoint to Windows XP to Siemens.  For slow processes and current computing technology, this scenario typically works well. 
    If you need FieldPoint to communicate directly over serial to the Siemens Simatic, you will need communications support in LabVIEW RT for the Simatic PLC.  Typically what is recommended is to use a Modbus gateway and the LabVIEW RT modbus VIs to communicate Modbus protocol from Fieldpoint to the gateway, and the gateway then communicates over serial to the Simatic. 
    here are the modbus vis
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/201711
    here is a reference for gateways
    http://www.woodhead.com/products/automation/gateways/
    Preston Johnson
    Principal Sales Engineer
    Condition Monitoring Systems
    Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
    National Instruments
    [email protected]
    www.ni.com/mcm
    www.ni.com/soundandvibration
    www.ni.com/biganalogdata
    512-683-5444

  • Serial Communication through TCP/IP Socket

    There are several companies offering a serial to ethernet software solution--emulating a terminal server, however they are all for Windows or MAC. I am looking for a starting point, examples, or a final solution (yeah) that is 100% java. In the field, the device is a RS232 LED board connected to a hardware terminal server. The message software writes to a TCP/IP socket. For testing, I would like my notebook's serial port to emulate the terminal server (I have been using TCP/COM from TAL tech for Windows). I bounce back and forth between Windows and Linux (dual boot) and would like one consistent solution for testing on most any platform/flavor.

    Check out this link:
    http://kaffe.iocon.dk/serialjavademo.html

Maybe you are looking for

  • How to insert data from a table into itself if they don't already exist meeting a certain condition

    First, let me apologize as I did not write/design this mess, just inherited this terrible design and legacy application! I have table of companies and a table of suppliers with various attributes and of them being a bit column of is_public.  The publ

  • How To Create A Website Background Video In Adobe Edge ?

    Hello, I have video file in my computer SSD drive and i want it to play as background on my web page (page that i am creating).I did try to follow this video: How To Create A Website Background Video In Adobe Edge Animate Using Edgehero - YouTube but

  • HP ENVY (or lack of) m6-n113dx multiple issues!

    I purchased this lap-top in Nov. of 2014 only to have to return three weeks later only to  have all the same issues!there are several so ill number them for simplicity. 1.The mouse pad is completely useless. It jumps/skips all over the screen, and op

  • AE CS4 Won't open with my Snow Leopard Install

    I just finished installing Snow Leopard and a fresh install of my Production Studio CS4, everything works accept for AE. It just bounces on the start bar, then stops. Nothing more. Any Ideas why?

  • Wbs settlement auc

    HI, we are using different currency for company code and controlling area. when we try to settle the wbs element,  we are getting error " no area exists for cost accounting value" thanks you