Reading instruments with mutiple baud rates

Hi,
I have two pressure manometers with RS-232 ports.
One of them is 2400 baud rate while the other is 9600 baud rate.
They continously spit out data on the port and there is no way to send commands to the two devices.
Since i have only one serial port, i am using a usb to serial adaptor for one of the devices.
I want to be able to read the two devices simaltaneously in a while loop, i come across the following error.
The instrument with the higher baud rate (9600) does not respond after the first read value and displays wrong information while the one with lower baud rate (2400) does respond correctly. If you change the pressure on the lower baud rate meter the higher baud rate meter begins to respond.
I suspect there is a problem with the timming ? Any ideas how i can solve this issue and get a clean stream of continous data ?
Thanks
Gagan
Attachments:
water pressure and temperature.vi ‏328 KB

duplicate post

Similar Messages

  • Working with Hi Baud Rates Via 422/485

    Hi all ,
    I'm working with CVI 9.1 and i have 2 PCI Cards :
    Advantech PCI Serial port - RS232
    FastCom Async PCI-335 - RS422 / 485
    I know there is basic serial com lib which contains RS232 Funcs , i also know that those funcs work well with 422 / 485,,,
    My problem or Question is that i need to use 6M baud rate which reflects 50MH There is no option to chose this Baud rate at the rs232 func , if i'll enter it manually will it work ?
    Or maybe there is an 422 / 485 lib ?
    Thank You
    Kobi Kalif
    Software Engineer
    Solved!
    Go to Solution.

    You will need to set the FastCom board clock generator to a non-standard frequency. The manual for the card explains how to do this by using Windows API IOCTL function calls. There are also example programs on the CD supplied with the card.
    Martin
    Certified CVI Developer

  • Non standard baud rates serial support?

    1. I have a microcontroller board sedind data tp FT232R(usb uart IC) which then forms a COM port on PC to commnicate with labview serial visa.
    2. I am able to communicate with standard baud rates with any problem like 9600 or 38400 bps.
    3. I want to know can I can communicate wit non-standard baud rates like 500Kbps with labview also???

    Dennis_Knutson wrote:
    Where did I say that the VISA baud rate is an enum?
    My Bad - I wasn't paying attention!  No wonder I seldom attempt to correct you!
    So lets talk about serial baud rates.  LabVIEW does not have anything to do with it other than implement calls to the VISA API- VISA not LabVIEW handles serial communications.
    VISA does not limit serial baud rate to anything other than "a positive non zero integer "(Actually a 0 baud rate just garuntees a timeout error and is silly, negative baud rates are sillier still- think about it for a moment)
    Most hardware today detects the clock rate of the incomming TX and adapts baud properly.
    Some legacy devices exist that were designed prior to the advent of clock recovery.  These are mostly obsolete and should be considered for replacement.
    Some modern hardware that could support clock recovery has firmware developed without support for the feature either for "optimization" (it may be run from an underpowered CPU) or because the developer has been copy-pasting that same #include for decades.  Those firmware engineers are also mostly obsolete and IMHO should be considered for replacement.
    All that being said 500K baud is not inconcievable- but, you better watch out for noise in your cabling and inside the hardware too! including the COM port of the PC!
    Jeff

  • Change Baud Rate

    Hi!Could anyone tell me the way of changing the baud rate of the serial port from 6500 to 9600 with LabVIEW?thanks!

    Hi jinyih,
    I realize that you are asking about the baud rate, however, here is more info on how to setup & use the serial port:
    For your reading pleasure
    http://forums.ni.com/ni/board/message?board.id=170&message.id=111793&query.id=0#M111793
    Or, if you're using LV7 and VISA.. :  (It may be too much details, but have a look at the bottom to "VISA Bytes At Serial Port" & "VISA Read")
    Initializing the serial Port in LV7:
    1. Go to the block diagram.
    2. In the Functions Palette, select => Instrument IO => VISA => VISA Advanced and place the VISA Open vi on the block diagram.
    3. Wire a "VISA resource name" control to the VISA Open vi. Also wire the Error-IN / OUT clusters appropriately.
    4. Select the COMM port that you wish to use to connect to your instrument. (ex: COM1).
    5. In the Functions Palette, select => Instrument IO => Serial; this is where you will find most of the useful VISA vi's relating to the serial communication.
    6. Place the VISA Configure Serial Port.vi on the block diagram. You can wire the settings to this vi. You can use the Context Help for details (it is useful to show the connectors on the vi).
    You can start with the following vi's:
    a) "VISA Bytes At Serial Port" which indicates how many bytes are available top be read at the serial port buffer.
    b) "VISA Write" Wire the string that you want to transmit to this vi. This vi also provides a return count for the number of bytes at the serial port (echoed data for instance).
    c) "VISA Read" Reads the serial buffer as an output string. This is where you will want to wire the byte count (as an input) from the two vi's above.
    d) "VISA Close" A very important vi, because it closes the communication session to the COMM port. Very useful if you switch back and forth with a software like HyperTerminal.
    I think that this should get you going with the serial port communication. You may want to implement some sort of a loop (while for instance) in order to read the data from the serial port buffer until it is empty. Depending on the speed of the communication, you may also want to place a delay within the loop.
    JLV

  • Does labview 5.0 support serial communication at a baud rate of 115200?

    When I try to initialise my serial port at 115200 baud rate I get error 32, device paramter error. I'm running labview 5.0. Can anyone help me with this?

    I use Serial Port Init.vi to set the baud rate to 115200 with no problem in LabView 5.0 under Windows 95.
    I get error 38 when I try a non-supported baud rate.
    Do you get the error when you run Serial Port Init.vi directly or just when you call it from your VI? On the diagram where you call Serial Port Init.vi, try placing a probe on the wire going to the baud rate input of Serial Port Init to see what value it's trying to set. You will have a problem going to 115200 if the control on your VI is represented as I16 or U8 or if the data range max doesn't go to 115200.

  • What is the NI/Labview Limit on Baud Rate for a serial connection? Is 9600 the limit?

    Hello all,
    Is 9600 the max baud rate for LV? I'm currently using a LV RS232 cable in a loopback configuration to test...using 9600..and it works fine.
    What I wil be hooking eventually, they said they'd want to run it at 62,500 due to the crystal on the hardware this will be eventually hooking too.
    I just tried adjusting my baud rate on my loopback set up to 62,500....to see what would happen, and it error'd out.
    I'm hoping this can run faster than 9600...and when searching through the forum posts here...I seem to see things saying that it can......
    Any suggestions or links to info on this?
    Thanks in advance,
    cayenne

    It may be possible to do custom baud rates with standard hardware if you have the right hardware.
    I'm doing some cRIO/EtherCAT programming for an NI-9870 RS-232 module and got to wondering about some configurable properties called "Baud Rate Divider" and "Baude Rate Scaler" and found the following information on this page:  http://zone.ni.com/reference/en-XX/help/370984T-01/lvaddon11/crio-9870/
    Property
    Description
    Baud Rate (write only)
    Sets the target baud rate for the port. If you set the baud rate, the appropriate Baud Rate Prescaler and Baud Rate Divider are set automatically, and are calculated according to this formula:
    BaudRate = 3.6864 Mbps / (Prescaler * Divider)
    Note  The maximum Baud Rate for the NI 9870 is 921.6 Kbps.
    Baud Rate Divider (read/write)
    Specifies the divider for the baud rate as defined by the baud rate equation above. This property is useful for setting a custom baud rate programmatically. Use the C Series Module Propertiesdialog box as a calculator to find the appropriate divider for the desired custom baud rate. This value is an unsigned 16-bit value within the range 4–65535.
    Note  Any values outside of the valid range will be coerced into the range.
    Baud Rate Prescaler (read/write)
    Specifies the prescaler for the baud rate as defined by the baud rate equation above. This property is useful for setting a custom baud rate programmatically. Use the C Series Module Properties dialog box as a calculator to find the appropriate prescaler for the desired custom baud rate. This value is defined as a type def, either 1 or 4. A value of 4 is normally used only for very low baud rates.
    I'm fairly certain that the NI-9870 will work in other non-cRIO backplanes (like the USB-based NI cDAQ-9174) but whether or not it will support these same options in an alternate backplane is unknown to me. If you are interested, contact your NI technical sales person and ask them to get you an answer.

  • How can I connect the NI USB RS485 interface to an instrument with two wires?

    I am connecting the RS485 to a Dynisco UPR 700, but labview alway tell me that " Before the operation is completed, timeout expired", I donot know what is wrong. Thanks!

    That message indicates that a read timeout occured. This usually suggests either a cabling problem (the RS-485 pin-out is in the NI-Serial manual pdf), a port settings problem (baud rate, etc.), a COM port number problem (using COM3 instead of COM4, etc.), or a communication protocol problem (incorrect command sent to the device, etc.). I suggest double checking your cabling and port settings, then run your vi with NI-SPY open to see what type of port activity is occuring.

  • How to auto-detect a baud rate on UART or Serial port. and how to handle different baud rates for Transmission and Reception

    Hi,
    Till now i have used only single baud rate for opening a port, writing some stuff and reading back from other end.  This time requirement is little different, can SerialPort class
    be used to have different baud rates for Tx and Rx, I have not seen that in the msdn, but any other ideas also welcome!!!. I am experimenting!!!

    When I look in the Info.plist file for the AppleUSBCDCDriver kext, which is what the driver should be for a USB modem, there are three driver personalities listed: DeviceClass = 2, DeviceProtocol = 0, DeviceSubClass = 0; DeviceClass = 2, DeviceProtocol = 0, DeviceSubClass = 2; DeviceClass = 2, DeviceProtocol = 1, DeviceSubClass = 2. When I look at the info for the Phone with USB Prober, the class, protocol and subclass are all 0 and it is assigned to the AppleUSBComposite driver which appears to be a default when it doesn't know what else to use.
    Does that information come from the phone or is it assigned by the Mac? I'm wondering if the Mac doesn't recognize the phone and is assigning default values, or if the phone is responding with the wrong values causing it not to be assigned to the right driver. Are there other USB utilities out there which could possibly configure the phone's USB port to identify itself correctly?

  • Airobet 1142n erased flash and set baud rate to 115200, can't send any commands

    Hi,
    I erased the entire contents of flash and let the WAP boot to AP. I set the baud rate to 115200 now all I get is gibberish. Once it reads from eeprom this shows up:
    Waiting for PHY auto negotiation to complete TIMEOUT !
    done
    Ethernet speed is 10 Mb - HALF duplex
    The system has encountered an error initializing
    the Ethernet port.
    The system is ignoring the error and continuing to boot.
    If you abort the system boot process, the following
    commands will re-initialize Ethernet, TFTP, and finish
    loading the operating system software:
        ether_init
        tftp_init
        boot
    The system is unable to boot automatically because there
    are no bootable files.
    C1140 Boot Loader (C1140-BOOT-M) Version 12.4(18a)JA3, RELEASE SOFTWARE (fc1)
    Technical Support: http://www.cisco.com/techsupport
    Compiled Wed 14-Oct-09 18:59 by prod_rel_team
    ap: üüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüü
    *** line too large ***
    Unknown cmd: üüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüü
    ap: üüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüü
    *** line too large ***
    Unknown cmd: üüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüüü
    It can read from the WAP but doesnt allow me to send commands,
    Any ideas?
    Thanks

    Hi Tyresse,
    Please use this:
    https://supportforums.cisco.com/message/1255262#1255262
    Or
    Using the MODE button
    You can use the MODE button on 1100 and 1200 series access points to reload the access point image file from an active Trivial File Transfer Protocol (TFTP) server on your network or on a PC connected to the access point Ethernet port.
    This process resets all configuration settings to factory defaults, including passwords, WEP keys, the access point IP address, and SSIDs.
    Follow these steps to reload the access point image file:
    Step 1 The PC you intend to use must be configured with a static IP address in the range of 10.0.0.2 to 10.0.0.30.
    Step 2 Make sure that the PC contains the access point image file (such as c1100-k9w7-tar.122-13.JA.tar for an 1100 series access point or c1200-k9w7-tar.122-13.JA.tar for a 1200 series access point) in the TFTP server folder and that the TFTP server is activated. For additional information, refer to the "Obtaining the Access Point Image File" and "Obtaining TFTP Server Software" sections.
    Step 3 Rename the access point image file in the TFTP server folder to c1100-k9w7-tar.default for an 1100 series access point or c1200-k9w7-tar.default for a 1200 series access point.
    Step 4 Connect the PC to the access point using a Category 5 (CAT5) Ethernet cable.
    Step 5 Disconnect power (the power jack for external power or the Ethernet cable for in-line power) from the access point.
    Step 6 Press and hold the MODE button while you reconnect power to the access point.
    Step 7 Hold the MODE button until the status LED turns red (approximately 20 to 30 seconds), and release the MODE button.
    Step 8 Wait until the access point reboots as indicated by all LEDs turning green followed by the Status LED blinking green.
    Step 9 After the access point reboots, you must reconfigure the access point by using the Web-browser interface or the CLI.
    Regards
    Dont forget to rate helpful posts.

  • Serial baud rate vs. high speed CAN

    The bottleneck in my current app is the serial writes at 115200, to a custom device.  The program dramatically improves in speed as the baud rate is increases.  If i remove the serial write and read, the program loop time improves from 100 to 2000htz 
    The device also has a CAN interface.  Im debating trying to use the NI CAN interaface card to see if there are improvments in speed but want to get an opinoin first since this will require considerable reprogramming.  The can card appears to be just two serial ports but yet, accoring to specs, appears faster.
    http://zone.ni.com/devzone/cda/tut/p/id/2732
    Its difficult to try to compare serial and can speeds. CAN is up to 1mbits a sec while 115200 is measuring baud.  After considerable reserach to compare the two, i still am having difficulty. Im not sure these comparisions are even valid as Im more instrested in in sending one charcter and then recieving it rather than contual streaming of data whch is what these rates measure.

      This is a custom servotube powered by an amplifier.  The servo has a renishaw encoder for 1um resolution. The application requires reading the position of the renishaw encoder every iteration.  This positional information is then logged into the data.  The position is independent of the feedback loop but it is important for the research. The feedback loop itself is determined by a strain gauge and 9237 module which compute loading forces of the servotube, and this is converted to analog output value via pid and then sent via an ni analog output module to the differential input on the amplifier.  The differential inputs on the amplifier will create a current (I) for the servotube value based on the voltage it receives.
     The bottleneck only has to do with the serial port.  Reading the serial port can be accomplished with the serial or can interface.  Using the serial port, the commands to get the position and then read receive it back, can occur at a rate of around 350 iterations a second at the highest baud, 115200. This 350 iterations is if there is nothing else in the loop other than visa read and write of the serial port with no delays. Its the best case scenario and when the additional code is in place, we are getting more like 100 iterations a second. 
    So the baud rate speed dosent seem to apply?  It is really a delay in the send and receive each time the communication is initiated?  That is why the can interface might be better?    Programming the NI can card seems a little tricky and i want to be sure it will offer improvement before jumping into this task. 
    Maybe there is a chip or something NI has to read the position of the reinshaw on the available NI AD cards we have on the system.?  It would then reduce the bottneck?
    Message Edited by Biosolutions on 10-15-2009 07:47 AM

  • Slow Baud Rate serial port (VISA)

    The last version of LabVIEW, 7.1, has the serial functions incorporated on VISA Resources, and it doesn´t possible to work with baud rate lower than 110 bps. I have a big stuff of applications that works with 5 bps. It´s a serial protocol that send a byte, e.g AA (hex) via serial line, with 5 bps, and after the rate is increased.
    I tried to use dll (CIN Function) but I think is impossible, cause the resource declared at the c code, so Im thiking to use a dedicated COM Dll, and use Call library Function)
    I´d like to know if somebody has a tip or similar problem.
    Thanks in advance
    Fabrizio
    Test Engineer

    Matthias Müller writes:
    > Hello,
    > I'm using LabView to controll a spektrometer through the serial port. I
    > use VISA for the communication with the device. Unfortunately, the
    > device is always in 9600baud mode after power on. So I have to change
    > the baud-rate each time by a command i send to the device. So I open a
    > VISA session in 9600 mode and communicate with the divice to set it to
    > 57600baud. After that, i have to reset my local serial port to the same
    > baud-rate. I do this with an property-node, where i change 'Serial Baud
    > Rate'.
    > Unfortunately, after I did this, the vi's that want to communicate after
    > the reset of the baud-rate stop with an error:
    > -1073807298
    > VI_ERROR_IO
    > Could not perform read/write operation
    because of I/O error.
    >
    > (I try to write to the serial port after change of the baud-rate)
    >
    > I would be very glad, if someone could give me an advice, why it doesn't
    > work, or how to make it work.
    > Thank you a lot.
    > Matthias
    Matthias,
    my first approach would be to close the first VISA session after the
    property node. Data dependency is achieved by the error cluster feed
    into a new session with the new properties.
    IMHO you've discovered another bug in serial VISA.
    HTH,
    Johannes Nieß
    P.S:What brand/modell of spectrometer are you programming for?

  • Termios.h and 921600 baud rate support

    Hi,
    I've been porting my application from Linux to Mac OS X when I got stuck with serial port support, the lack of 921600 baud rate in particular. There are no definitions of speeds higher than 230400 in the termios.h file. Defining it manually using the constants from Linux doesn't help either.. as it's simply not implemented. Is there any way I can get this?
    Thanks in advance,
    Piotr

    Starting with Tiger, the IOSSIOSPEED ioctl can be used to set arbitrary baud rates other than those specified by POSIX. The driver for the underlying serial hardware ultimately determines which baud rates can be used. This ioctl sets both the input and output speed. The speed will not be reflected in the termios structure.
    <pre>
    speed_t speed = 14400; // Set 14400 baud
    if ( ioctl( fileDescriptor, IOSSIOSPEED, &speed ) == -1 )
    printf( "Error %d calling ioctl( ..., IOSSIOSPEED, ... )\n", errno );
    </pre>

  • RS232 baud rate

    Hello,
    I am using the javax.com package in order to manage serial port. My application is well running when I use standard baud rate (9600, 19200...).
    I have a problem because I need to transfer data with a non standard baud rate (in this case the value by default is 9600).
    Is there a mean to program a non standard baud rate?
    Thank you

    Baud rate is a mess, it goes back to the OS. Most provide a set of constants such as
    B0
    B50
    B75
    B110
    B134
    B150
    B200
    B300
    B600
    B1200
    B1800
    B2400
    B4800
    B9600
    B19200
    B38400
    B57600
    B115200
    B230400
    which define the standard baud rates. There are sometimes ways around these, often you can just use the next higher than your hardware needs. See "man termios" to see what's behind javax.comm.

  • Need std and non-std baud rates on PXI-8420 (16 channel RS232)

    I found a similar request on the knowledge base, and the resolution was possibly NI would make a card on a case-by-case basis.
    I need the forementioned PXI card to support std and non-std baud rates (i.e. not a simple xtal change, and the software sets up for 57.6 Kbaud, and it is really 62.5 Kbaud) that is easily configured in LabVIEW/VISA.
    The rates I need are as follows:
    All std rates (i.e. 1200,2400,4800,9600,...)
    10.4K (possible with std ports, but unsure about NI hardware and VISA).
    62.5K
    Thanks.
    62.5K

    The golden rule in serial (UART) communication, is that if two communicating partners are within +-2% of each other, they'll happily communicate error-free. Since you often only know one side of the equation, the window narrows to +-1%.
    Next, take a look at how baud rates are calculated. On most NI-Serial hardware, there is a 7.3728 MHz oscillator that is divided by 16 (to create the what I'll call the 'base' frequency), and then divided again by a divisor latch. A divisor latch value of 1 yields 460800, 2 = 230400, 3 = 153600, etc. This is where the 'standard' baud rates come from.
    However, on some OS's, we divide the clock source again by 4 before it hits the divisor latch. This means 1 = 115200, 2 = 57600, etc. While this does creat
    e a set of 'standard' baud rates, it also limits the number of possible baud rates. This is something that will be fixed in the future.
    Now hopefully the following table will make sense. In systems that have a base of 460800, we support baud rates that are within +-1% of the following (baudrates marked with * are supported in 115200 base systems):
    110-9216*, 9404, 9600*, 9804, 10017, 10240, 10472*, 10716, 10971, 11239, 11520*, 11815, 12126, 12454, 12800*, 13165, 13552, 13963, 14400*, 14864, 15360, 15889, 16457*, 17066, 17723, 18432, 19200*, 20034, 20945, 21942, 23040*, 24252, 25600, 27105, 28800*, 30720, 32914, 35446, 38400*, 41890, 46080, 51200, 57600*, 65828, 76800, 92160, 115200*, 153600, 230400, 460800.
    10.4k is supported in both systems at the baud rate 10472.
    If you're running at 62.5k when set to 57.6k, then you're likely using a 8 Mhz Oscillator. In this case, you have a base of 500000, and with a divisor latch value of 48 you'll be running at 10416. This cor
    responds to a 'normal' baud rate setting of 9600. So if you set your modified card to 9600, you should get 10.416k.

  • What is the minimum baud rate that PXI 8461 CAN support

    what is the minimum baud rate that pxi 8461 CAN support

    Hi,
    The PXI-8461 is the high speed CAN. The minimum baud rate is 5kBits/s. Refer to the following Knowledge base article:
    CAN Physical Layer Standards: High-Speed vs. Low-Speed/Fault-Tolerant CAN
    Hope this helps.
    DiegoF.
    National Instruments.

Maybe you are looking for

  • Keyboard Going Crazy.

    Hi, I own a MacPro 06/07 edition... I recently upgraded or downgraded (whatever) my videoboard from a x1900xt to a GT8800 because I couldnt stand the noise anymore... so far so good and silent... what happened reasonably after that, I have no Idea if

  • Importing issue, trash issue, and music store issue.

    1. When importing a song from a CD it imports most of the song then "unexpectedly quits" not importing the song at all. 2. My trash can won't "see" some items when I try and throw them away from my itunes, so I have to "move to trash" rather than dra

  • App updates not appearing

    App update shows 2 updates pending but nothing shows up for updating. iPad has been restarted and recharged. Any ideas?

  • T420 DVD eject button - terrible placement; driving me insane

    Every time I pick the laptop up or am laptopping in bed I am constantly hitting the DVD eject botton on the T420.  This is my 10th ThinkPad over the years and have never had this problem. I'd even prefer a blank to fill the slot  or a battey option t

  • Trusted Authentication

    Is it possible to open session with BO server using Trusted Authentication? Regards, Aleksejs