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

Similar Messages

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

  • How to hide the PORT NUMBER from the URL

    Hi,
    We have Application on Node 1 and Database on Node 2
    Apps Version: 11.5.10.2
    DB: 9.2.0.6
    We recently added a new node to act as web server for iSupport.
    Now we are able to access the url using public Ip-address which looks like
    http://<Internet Ip-Address>:<PORT NUMBER>
    Eg: http://******.com:8000
    But we dont want the *'PORT NUMBER(8000)'* to be displayed.
    How to hide the port number ?..
    Thanks in Advance,
    Mahesh

    Hi Hsawwan,
    Can you plz explain me the steps how to hide the port number from the url as our network administrator is not aware of this.
    Regards,
    Mahesh

  • How to cancel serial no. profile from material master ?

    dear all SAP experts,
                I have 1 mateial in which i assign serial no. profile in work scheduling view in material master. So how can cancel serial no. profile from material master ?
    Suggest me
    regards,
    Nitin Nerkar

    As long as no serial numbers exist for the material you are able to cancel or change the serial number profile.
    As soon as serial numbers exist for the material and you want to change or delete the serial number profile, you must note the following:
    The previously assigned serial numbers are no longer suited to the current serial number profile.
    The indicator for the stock check may have changed. If this is the case, you can copy the profile settings in the serial number using the executable report program RISERNR9. However, you should only start this program once the changes have been updated in the material master record.
    You can no longer delete the serial number profile in the material master record. Instead of this, you create a serial number profile without serialization procedures in Customizing and enter this in the material master record.

  • How to empty Serial port buffer ???

    Hi!
    I am having problems with serial port. I want to clear i
    serial ports buffer, but i dont know how to do this. I am receiving NMEA data through that port and every now and then i need to clear it because there are too much data and i dont need them all. Could someone please help me?

    Hi,
    Take a look at this link.
    http://www.sc-systems.com/JavaDoc/Serialio.SerOutputStream.html
    flush
    public void flush() throws IOException
    Causes any buffered data on the output stream to be written. Note: when using txDrain be advised that some OS's (like WinNT) do not provide a timeout on the OS level drain/flush call. In this case if handshake (flow control) is disabled from the far end your txDrain call will block until drain can complete. (i.e. until the handshake state changes). Because of this the default mechanism for flush is to watch the txBuffer. This will allow you to abort a stalled OutputStream since your code will not be locked up at the native level.
    Throws: IOException
    if an error occurs. Overrides:
    flush in class OutputStream
    However the above function and the class defining this is not provided by SUN.
    I hope this helped.
    Roopasri Vittal
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • How to read serial port only when new data has been sent to it

    I've written this very simple vi to read the serial port whenever the MKS Helium Detector sends a new value.  The timing of new data is controlled directly from the front panel of the MKS instrument.  I thought it was as simple as looking at the "bytes at port", and reading the port only if the value is not zero.  The problem I'm having is that the read function is occuring whether I want it to or not.  Consequently, the "Scan from String" function is returning an error (0) once in a while, because it's reading the serial port as it's being updated (I think).   Apparently, when the port is in the process of being updated, it is not zero.   Anyway, I'm assuming there is a simple fix, but I'm having no luck finding the Easter egg.  Any help would be, as always, very much appreciated. 
    Attachments:
    MKSRead.vi ‏55 KB

    You can approach your problem in a couple of ways. The way you've got it written now, as soon as the number of bytes is non-zero, you read and convert. This means that when a partial string is there, you conversion is nor correct. One way is to wait until non-zero bytes like you do now, and then in another loop, read until the byte count is equal to zero and then do the conversion. You can also read until the cr\lf is detected and then do the conversion on the string. You can also enable the termination character for the read but then you'll have to increase the number of bytes to read to something other than just the number of bytes first available. If the instrument always returns the same number of bytes, you can use that as a constant for the VISA Read. Then the read will terminate whenever the byte count OR the termination character is detected.
    I modified your VI to show you how you might put it in a loop and what for the CR/LF to be detected. You would want to add a timeout to this so that if the character does not show up, the loop will not run infinitely
    Attachments:
    MKSRead_mod.vi ‏68 KB

  • How to read serial port and substring

    I am new for labview .I send data from microcontroller with C languange every 1 minute this codeprintf("T%3.2f,H%3.2f",fTemp_true,fRh_true);
    And I read data with Hyperterminal it show this T29.11,H67.88 I want to show 29.11 and 67.88 only and stroe in database. I study connect serial port in example and I have a question. If I use this code.Can I auto read every 1 minute or this code can read 1 time only and I have to click every 1 minute.How to auto read when I send data to serial port with microcontroller every 1 minute. And I cannot substring 29.11 and 67.88 because %3.2f can show T29.11,H67.88 or T129.11,H100 . and  How can I simple send data to database. Thank you . 

    No, you don't have to click run every minute. You just need to place a while loop around the VISA Read. You could use Wait (ms) but it would be better to use something like the Elapsed Time function and wire the time has elapsed output to a case statement with the VISA Read inside the true case.
    This is one way to parse the string:
    If you have the database connectivity toolkit, you can easily write to a database. There is also something called LabSQL.
    Message Edited by Dennis Knutson on 01-22-2010 01:42 PM
    Attachments:
    Parse String.png ‏16 KB

  • Writing to serial port 1 from a PDA

    ok this program is driving me NUTS! i have this microchip which uses a certain protocol... now this protocol requires that you send it some characters in hexadecimal so it'll reset... afterwhich it'll send you a data packet containing the version of the microchip etc etc (it's an aduc812... which you can find on www.analog.com)... anyway, that's not important... i am having trouble actually WRITING to serial port 1... i noticed that doing it through an actual PC requires some sort of "open serial port.vi" which is not available in the pda version... all i have is init.vi which is apparently not enough from what i am told... i thas to be opened first... initialized next... then written to then read from... does anyone know how i can acc
    omplish this open procedure with the pda module? is that some sort of software i'm missing? why isn't it included with the pda module add on... etc etc... thank you in advance... i really need help with this so as much information as possible would be appreciated... let me know if you need further info...
    christina

    Hey Christina,
    Here is a link to a knowledge base one simply writing to the serial port from a PDA.
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=E011F478861443EFE034080020E74861&p_node=%20DZ52363&p_source=External
    Hope this helps.
    Brett

  • 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

  • Multiple serial ports reading from a shared USB port

    I have a program that reads from 4 flow controllers, which send data through RS232 serial ports. Because the computer is located pretty far away, the vendor suggested to use an Edgeport box to convert RS232 to USB, then convert to ethernet port using a SuperBooster converter. The signal travels long distance in ethernet cable to the computer and get converted back to USB, then to the computer. In MAX, I was able to see 8 com ports from the Edgeport box, and I was able to communicate with my flow controllers.
    The problem is, it will give me some error message occasionally. Sometime it's a VISA Read error, sometime it's a VISA framing error. Could this be caused by the way the signal is transmitted?
    In the program I have four parallel WHILE loops that constantly do READ and WRITE to the 4 flow controllers. Could this be causing the errors? If so, what is the best strategy to design this program?
    Thanks

    I agree with Mike, you will need an error handling strategy that accounts for these errors.  And retries the communications.  This can be a little tricky, but very doable.  I believe some sort of statemachine approach will work best for this. 
    As for your heated probe.  I would make some sort of hardware interlock that will shut it down in case of a coolant failure.  NEVER, EVER trust the computer to be running where safety is concerned, either for personal or hardware.  There are plenty of ICs that can monitor temperature, and have warning, and alarm outputs!  Another option is some sort of watchdog on the communications bus for the coolant control, but I think this is a bit more tricky. 
    Paul <--Always Learning!!!
    sense and simplicity.
    Browse my sample VIs?

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

  • How do I remove a Visa from my Apple ID?

    Hey Guys!
    How do I remove a Visa card from my Apple ID? Thanks in advance!
    Adsa

    Change or remove your payment information from your iTunes Store account (Apple ID)

  • How to access serial port using servlet

    I want to communicate with a microcontroller connected to the serial port of my computer.
    *I am using the following:
    Windows 98 operating system
    Tomcat web server 4.1
    *The directory structure is as given:
    Tomcat 4.1/webapps/myjsp/web-inf/classes/remoteservlets.
    I have placed my jsp files in my jsp folder and classfiles in remote servlets folder.
    **my java program has compiled correctly.**
    ** my simple java application which accesses the serial port works fine.***
    *when I start tomcat I am able to access the sevlet as the servlet responds with the button name i have pressed.
    **** I have also tried the following
    Copied file comm.jar in <JAVA_HOME>\jre\lib\ext
    Copied file javax.comm.properties in <JAVA_HOME>\jre\lib
    Copied file win32com.dll in <JAVA_HOME>\lib and also in c:\windows\system32 and c:\windows\system
    ***************which helped me do away with errors.
    still I don't get any output. I dont get any errors either.
    PLEASE HELP. URGENT. i am at my wits end.
    Thank you.

    Servlet is the one which runs in the server side...if u want to comunicate with the serial port of the server in which ur servlet is running can be done but making use of Communication api available....
    U can download the Api from http://java.sun.com/products/javacomm/index.jsp
    There are three levels of classes in the Java communications API:
    High-level classes like CommPortIdentifier and CommPort manage access and ownership of communication ports.
    Low-level classes like SerialPort and ParallelPort provide an interface to physical communications ports. The current release of the Java communications API enables access to serial (RS-232) and parallel (IEEE 1284) ports.
    Driver-level classes provide an interface between the low-level classes and the underlying operating system. Driver-level classes are part of the implementation but not the Java communications API. They should not be used by application programmers.
    regards
    shanu

  • Communicate via serial port/ethernet from client app

    Hi
    Is it possible to communicate between the client serial port and an Apex application?
    (or from the application to an ethernet device).
    I need to link an application to a weighing machine and send/receive information via an Apex application. The interface will either be a serial port on the client or the weighing scales could also be connected as a network device.
    Any ideas?
    Thanks
    Kathryn

    There are active-x controls that you can use (http://www.activexperts.com/activcomport/howto/html/).. Otherwise you could try writing a small java applet to do this on the client end, don't know enough about your requirements to offer more.. Does the vendor of hardware have a solution?
    (Issue with this would be, non-ie browsers MIGHT not want to run vbscript or active-x controls..)
    Thank you,
    Tony Miller
    Webster, TX

  • "how to read serial port using labview 6.0"

    sir i am doing a project and is in a need to extract data from serial port. can anyone help me

    This link, and the links from it, are a great place to start:
    http://zone.ni.com/devzone/conceptd.nsf/webmain/8DECBF3E0B714BF3862568F9006E7851?opendocument
    2006 Ultimate LabVIEW G-eek.

Maybe you are looking for