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?

Similar Messages

  • How to abort serial port VISA from wating.

    Hello All
    How can I abort serial port VISA while wating for a byte to arrive.
    Lets say I have timeout set for 3 min. but I want to cancel it before that , how to do it programatically?
    I tried to set timeout to 0 while wating for data, and it works, but I do not like this method.
    Thanks in advance
    Pawel

    Hi again
    I have made some investigations, and here is what I found:
    None of Serial Port Brake nor Set Time out work while the "VISA read" is active. All property node can access VISA class only when the "VISA read" is finished.
    Therefore, it looks like there is nothing I can do when VISA is active. The only solution is not to allow VISA read.vi to activate. I think I can use your idea and monitor the amount of bytes at the port.
    I wanted to avoid it.
    Thank you for your help
    Pawel

  • Adapt QCM serial port VIs for USB QCM

    I am trying to adapt Labview VIs that use a serial port and use them a QCM that uses a USB port. Does anyone know how I can do this. I have limited labview experience.
    The USB QCM gives me data for the thickness and mass gains of the materials deposited but I cannot correlate those mass gains with the pressures in the reactor. I need to correlate the mass gains with the pressures so I can know the pressure profiles of the materials I deposit. The serial port VIs (for a different QCM) save the data for the mass gain and the corresponding pressure but I cannot do that with the USB QCM. That is why I want to adapt the older programs which store all the information and use it with the new QCM.
    Thanks
    -Sicelo

    You would likely want to use VISA to communicate with this USB device.  If you get the VISA alias for the device, you should be able to replace your serial code with VISA code that does very similar things (such as read and write).  This link shows the kind of thing you should encounter when using LabVIEW to control a USB device.

  • 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

  • Changing Parity on Serial Port (VISA)

    Hello all,
    I'm having a problem with some parity bits on my serial port. What I need to do is send the first byte of data with mark parity and then all remaining bytes with space parity. I have tried using a property node to do this and it seems to work with one small problem: the system is changing the parity to space before the first byte (the one with mark parity) has finished transmission. As a result, the first byte is ending up with space parity instead of mark. How do I wait until the first byte is finished transmission so that the parity change isn't applied to it? I have tried flushing the transmit buffer on the visa. Is there a way to use the event system to solve my problem?

    This is just a shot in the dark.
    Try right-clicking on the VISA write and select "do I/O syncronously".
    If this works, please let me know. I have been trying to figure a good reason to do serial I/O "syncronously" but was not able to come up with one until I read your question.
    Curious,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • My Application gets Error 37 when using Serial Port VIs.

    My Application works fine developed with LV 6.1. Then I updated to LV 7.1 and now the Executable of my application gets error 37 when using the old serial port functions. The "serpdrv" file is located in the application directory and is from 02/2002. The application runs well in the development environment after I placed the "serpdrv" file in the LabView directory. I tried to put a line with "serialDevices=..." in the .ini-file of my application but this did not cause an improvement. I also tried to rebuild the EXE with this line in the "labview.ini" file but nothing changes.
    Does anybody have another idea ?
    Many thanks for help
    Thomas

    >Did you actually replace the old serial functions that come with 7.1 with the functions from 6.1?
    Yes. E.g. "open serial driver.vi" uses "open device" with "serpdrv" as device string.
    I had the same problem running my application as VI´s. After the copy of serpdrv into the LV 7.1 directory everything works fine.
    I don´t understand why the application running as a .exe doesn´t find the serpdrv when it is in the same directory....
    Nevertheless many thanks for your answer
    Thomas

  • Serial port logging baud rate setup

    I need to use the COM1 port to output the alarm log.  Is there a way within Lookout (maybe in the .ini file?) to set the baud rate of that port, or do I need to adjust it from Windows before I start Lookout?
    David Dudley

    Problem is, this is not a 'Lookout Object'.
    Under Options->System I have the 'Log Alarms to:' set to COM1 in order to output an alarm log to my Linux box so I can generate my 'active alarms' webpage.  Whenever the system is reset after a crash (which happens every week or two), Lookout starts up automatically, reloads the application, and begins outputting a list of all alarms (quite a long list, sometimes), at a very slow baud rate (300 I think).
    I'd just like Lookout to set the baud rate when it starts up if possible.
    David

  • Change programmatically the baud rate in the COM port

    Hello everyone,
    here is my application: i have a PC application designed with labview which communicates with an embedded board through UART, the embedded board is configured to support automatically any baud rate (9600, 4800.....).
    My problem is how to make labview detect automatically the new baud rate when selecting in the panel (9600, 4800...) and send new COM configuration the embedded board?
    I need and urgent help.
    Best Regards.

    I'm not sure what you mean by disconnect and connect.  You don't need to close and reopen the port.  You can just change the baud rate with a VISA property node.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • TROUBLE BUILDING VISA Configure Serial Port .vi

    I posted by mistake in DAQ.  My application Builds fine in LV 7.0, however in LV 8.2 using the Project folder, I receive the following :
    Polymorphic VIs cannot be used as Startup/Exported or Dynamic VIs for applications or shared libraries.
    C:\NEM DS18S20 TEST-8.20\NEM0775B\NEM0775B.llb\VISA Configure Serial Port
    Visit the Request Support page at ni.com/ask to learn more about resolving this problem. Use the following information as a reference:
    Error 1035 occurred at ABAPI Dist Check if PolyVI.vi -> ABAPI Load All Libraries And VIs.vi -> ABAPI Dist Build LLB Image.vi -> ABAPI Copy Files and Apply Settings.vi -> EBEP_Invoke_Build_Engine.vi -> EBUIP_Build_Invoke.vi -> EBUIP_Build_Rule_Editor.vi -> EBUIP_Item_OnDoProperties.vi -> EBUIP_Item_OnDoProperties.vi.ProxyCaller
    Possible reason(s):
    LabVIEW:  Operation is invalid for this type of VI.
    I am using, Polymorphic VI = VISA Configure Serial Port to configure my serial port and then count bytes received for certain serial Port CmDs.
    I am only using the Serial Port (Instr) of the Polymorphic VI.  What is the easiest way to BUILD a application that will work????   I've used this method back to 4.1.  Can I change VISA Configure Serial Port .vi from a Polymorphoric to a Non Polymorphic and still initialize the Serial port??  This new BUILD/PROJECT METHOD is not good. 
    Please Help
    Brian Campbell

    Briancam-
    Have you set the VISA Configure Serial Port as a startup VI in your build specification? If you are using that VI as a subVI in one of your VI's, then you do not need to manually add it to the startup list, LabVIEW should automatically add it as a dependency.
    Xaq

  • 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

  • [Linux] Serial Ports

    Hi,
    are the PC Com1 & Com2
    serial Ports still supported
    under LV Linux version ?
    I dont find the Serial Port VIs anymore ?
    The idea was to move a LV .vi from WinX to Linux.............
    any experiences ?

    In both Windows and Linux, you are supposed to use the VISA functions. It's almost the same, and there is a compatibility menu, with wrapper VI's that simulate the old functions. I'm currently developing an application in windows (old habbits die hard), and I'm running it under Linux without any serial problems.
    Regards,
    Wiebe.

  • The "VISA Configure Serial Port" VI will only run at 9600 Baud

    I have written a Serial Port monitor "RS232 RW.vi"  that works for the most part. The problem is that it will not respond to alternate port configuration settings.... For instance: the default RS232 Serial port configuration is:
    (COM1,9600 baud,8 data bits,1 Stop bit, None no parity)
    As a test, I am using a Null Modem Cable to connect From my LabView Com1 port to another PC running RealTerm Serial Port Monitor.. Using my newly designed "RS232 RW.vi"  With port settings of (COM1,9600 baud,8 data bits,1 Stop bit, None no parity),  I can send and receive data back and forth all day long no problems....
    However, if I configure the "RS232 RW.vi"  port to any other configuration, such as (COM1,2400 baud ,7 data bits,1 stop bit, Odd parity).. It will not take the expected chances and continues to operate @ 9600 baud etc.
    I then changed the "RS232 RW.vi"  default settings to (2400,7,1,Odd)
    it still refuses to deviate from (COM1, 9600,8,1,None...)
    I also went into the Win XP  Device Manager on the LabView system and manually configured Com1 to 2400,7,1,Odd  
    and still,.... the "RS232 RW.vi"  will only operate @ 9600,8,1,None
    Can anyone else test drive my VI and see if they have the same problem of not being able to see new changes in the Port configuration settings ..other than (COM1, 9600,8,1,None...).... ?
    FYI.. Unfortunately my LabView is running on Version 6.0 so you may need to up-convert the attached vi
    Solved!
    Go to Solution.
    Attachments:
    RS232 RW.vi ‏102 KB

    Instead of just appreciating the comments, you need to implement them.
    Having the VISA close inside the loop is definitely the problem.  And Crossrulz is 100% correct about the problem being that the serial port gets reset to the default baud rate after closing the port.  Here is the proof.
    Note that while you may have set the port settings manually in device manager, those settings are revised by the VISA driver.  If you look in Measurement and Automation Explorer under Devices and Interfaces >> Serial and Parallel, you'll see the default settings that the VISA driver uses.  If you change the setting there, your program will work the way you want.  But that is not the correct fix.  The correct fix is to get the VISA close out of the while loop.
    The port settings are established in this order.
    1.  By the Windows device drivers.
    2.  By the VISA driver as established in MAX.  Since you are useing VISA, these settings will automatically override #1.
    3.  By the port settings you set programmatically in your LabVIEW program.
    Attachments:
    Example_VI.png ‏18 KB

  • 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?

  • Reading/writing to serial port w/ VISA in Labview

    I'm writing a Labview program to control and to read data from a Varian vacuum pump controller. It is connected to the serial port in my computer, and I have been trying to open a VISA session to communicate with the instrument. So far, however, the computer cannot see the instrument--I get the same error messages reading and writing to the instrument as I do to an empty serial port. Does anyone have any suggestions on what the problem might be? Thank you.

    There are a lot of possiblities. Is the cable correct? You probably need a crossover cable (TX and RX) swapped. You also need to check and make sure the serial ports on both ends are set the same (i.e. baud rate, handshaking, stop bits, etc.). Make sure that the port is enabled. I've seen people try to use a comm port only to find that a modem card installation caused the port to be disabled. You could also try using hyperterminal to talk to the instrument. If you can communicate there, you can eliminate any hardware problem.

  • How can i delay the line and charactor rate of my serial port transmisio​n?

    In hyperterminal I can pick the line and charactor rate , but I can't seem to slow down the rate when using the serial port by itself.
    Attachments:
    remod_chan_4.txt ‏1 KB
    serial_INT_chan3.vi ‏31 KB
    read_text_file.vi ‏20 KB

    There's nothing built into the VISA or old serial functions but it's pretty simple to program yourself. Here's a VI for specifying a delay between characters. It uses VISA but you can easily swap that out with the old serial write if you want. It just breaks out the text string character by character and adds a delay before each character is written. To add a line delay, just add another delay after the entire string is written.
    Attachments:
    Serial_Write_With_InterCharacter_Delay.vi ‏45 KB

Maybe you are looking for

  • My MacBook Pro has been incredibly slow and laggy

    So my MacBook Pro has been pretty much inoperable for a couple of months. The computer crashed and afterwards it would constantly lag. I did a fresh install thinking it would solve the problem, but it did not do anything. I took the computer to the G

  • Confirmation  - error in process - idoc status 29

    HI , i got one new problem today. This is one of the case when one user createsconfirmation of the Purchase order and then Confirmation status goes to error in process. i check in RZ20 and found error in Idoc which is generated from that confirmation

  • Error during runtime when using BULK collect

    Hi CREATE OR REPLACE TYPE VAR_ROW AS OBJECT   VAR_1 VARCHAR2(20),   VAR_2 VARCHAR2(20) CREATE OR REPLACE TYPE V_TAB AS table of VAR_ROW CREATE OR REPLACE FUNCTION get_id RETURN var_tbl   PIPELINED AS   /* declaration */   i INTEGER;   --TYPE x_t IS T

  • File Change Event Notification

    Hi, Is file event notification available on Solaris 10? If it is not, could someone help me on this - I want to monitor a directory for a new file addition event. Once a new file is added, i want to do some processing. How to do this? Edited by: Prat

  • How do I get started

    On 1 Feb 14 I took out a GBP 63.49 new subscription Updated Plan: Adobe PDF Pack, Annual Order Number: AR015309821US. When I try to convert a Word document to Pdf, when I bring the document into the Select File window, there is no action designated f