delay in the introduction of serial port to main loop

I have a main program which consists of a period of time cards each loop iteration that is NI DAQ data acquisition.

I want to have a serial port call that is executed only when a new value is entered.

I can use a shift register and compare the present value the value spent, and then run the serial port when the value is changed.

But when I do this, the program takes about 6-7 seconds until all the data is read on the ground after clicking the run button.

I found that, even if the serial port does nothing, that the delay is still there.

For example, I initialize the port series outside the while loop...

I'm dragging the sons mistake and resouce for the serial port through the while loop, then make the visa close outside the while loop.

NOR should not yet be it making any type of calculations on the serial port, whereas only the presence of wire delays the appearance of the program by a total of 6 seconds.

As soon as the wire is removed, the program is in normal operation.

What is going on?


Tags: NI Software

Similar Questions

  • Determine the number of serial port

    I need to test my Board on 3 PC randomly. Whenever I connect the jury that happens the number of serial port as "com 18. Now, the number of Compote I use is 40. Although I am not any other USB connection. Although I update, I always get data only if I set the port number as 40. is anyway to determine the port number. Also someone can tell me why this is happening?


  • HP dc 7800 how can I install the driver for serial port pci Windows 8.1

    HP dc 7800 how can I install the driver for serial port pci Windows 8.1 Please help

    Hello:

    Download and install the W7 AMT driver.

    http://h20565.www2.hp.com/portal/site/hpsc/template.PAGE/public/psi/swdDetails/?sp4ts.oid=3459243&spf_p.tpst=swdMain&spf_p.prp_swdMain=wsrp-navigationalState%3Didx%253D%257CswItem%253Dvc_78665_1%257CswEnvOID%253D4059%257CitemLocale%253D%257CswLang%253D%257Cmode%253D%257Caction%253DdriverDocument&javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken

  • setting the parameters of serial port VISA does not persist

    When I set the baud rate using the VISA's Interactive Control Panel for a serial port specific (ASRL) and then close the window for ASRL, baud rate goes back to the default value.  Why doesn't baud rate?

    Also when I change the port settings for a particular serial port (COM) on the side of Windows, why can't I see these same port settings when I look at them from the interactive panel of VISA?

    Also, when I set by programming the output baud rate for a particular ASRL (code C), why is it reset by default when I re - run my program and do a get on baud rate?

    Some information:

    My C program works on an industrial PC which has a PXI MXI connected to it expansion chassis.  Series 3 cards in the expansion chassis.

    When you close the VISA session and/or close your application, port settings in the system default values.  It is a very normal behavior.  As long as you keep your open VISA session, the port will behave how you already told (set Baud Rate, etc.).

  • the NI 9871 serial ports appear also in MAX with built-in serial ports of the target - under devices and Interfaces IS NOT? NO NEITHER 9871 (Scan Interface)?

    Hi - Have cRIO

    Can someone help me get the NI 9871 (Scan Interface) work?  My two 9477 and two 9425 and 9403, function with the scanning Interface.  In MAX > software > NOR-Serial RT 3.82 > NOR-Serial 9870 and Scan Engine Suport 3.8.2 9871 BUT NOT == MAX > devices and Interfaces > series & parallel = number of Ports Com for 9871 listed?   Project, 4-port RS-485 NI 9871 is in slot1?  Any help appreciated thanks

    the serial ports on the NI 9871 also appear in MAX with serial ports integrated target under devices and Interfaces

     

    NEITHER 9871 (Scan Interface)

    I left the Slot 1 Slot 8 9871 Know works and MAX displays 4 COM ports.  Something is misconfigured in Slot1?

    Solved!

    Thank you

  • On the PXI-8106 serial port connection problem

    Currently, I am trying to connect to the serial port on the PXI-8106 via RS232 module. However, when I try to run the Test VI opened for COM1 MAX (PXI Remote) running on a PC, I received an error like below:

    Returns the status code: 0xBFFF00A8

    Name of the State: VI_ERROR_NPERMISSION

    Access to the resource or the remote machine is denied. This is due to the lack of sufficient privileges for the current user or the machine.

    Right now I'm just a just loopback test to ensure that the interface for device is working before you start my labview code. I'm not sure what the problem is exactly, if it has to do with the PXI or PC. Could you please suggest a few solutions to this topic?

    Thank you.

    I managed to understand. It did not work on the right platform.

  • ESXi 4.1 supports the transmission of serial port?

    I'm having a bit to find this information...

    My ESXi server has a serial port that I want to be available to a virtual machine (guest).  Is this possible?

    I don't want to share the serial port or do anything "fancy".  I just want it to be accessible.

    Thank you!

    Starting with ESXi 4.1, you can go through a serial port.  Simply add a port series to virtual hardware for the virtual machine and choose the option 'Use the physical serial port'.

  • The VI "VISA set up the Serial Port" will only work at 9600 baud

    I wrote a Serial Port RS232 RW.vi monitor of ' "which works for most. The problem is that it will not meet the alternative port configuration settings... For example: the default RS232 serial port configuration is:

    (COM1, 9600 baud, 8 data bits, 1 stop bit, no without parity)

    As a test, I use a Null Modem cable to connect to my LabView Com1 port to another PC running RealTerm Serial Port Monitor... Using my "RW.vi RS232' newly designed with the port settings of (COM1, 9600 baud, 8 data bits, 1 stop bit, no without parity), I can send and cannot receive data back throughout the day no problem...

    However, if I configure the port "RW.vi RS232" all other configurations, such as (COM1, 2400 baud, 7 data, 1 stop bit, odd parity bits)... He will not take the expected risks and continues to operate @ 9600 baud rate etc.

    Then, I changed the settings default "RS232 RW.vi" (2400,7,1, Odd)

    He still refuses to derogate (COM1, 9600,8,1, no...)

    I also went in the Device Manager of Win XP on the system of LabView and configured manually Com1 2400,7,1, Odd

    and yet,... work at the "RS232 RW.vi" @ 9600,8,1, none

    Everyone can test my VI in the car and see if they have the same problem of not being able to see the new changes in the Port configuration settings... other than (COM1, 9600,8,1, no...)...?

    FYI... Unfortunately my LabView runs on Version 6.0, you may need to up-conversion of the attached vi

    Instead of simply appreciate the comments, you need to implement.

    Having closed VISA inside the loop is definitely the problem.  And Crossrulz is 100% correct about the problem being that the serial port gets zero to default baud rate after the closure of the port.  Here's the proof.

    Note that while may have set the port settings manually in the Device Manager, these parameters are reviewed by the pilot VISA.  If you look in the measurement and Automation Explorer under devices and Interfaces > serial and Parallel, you'll see the default settings using the VISA driver.  If you change this setting, your program will work as desired.  But this is not the appropriate fix.  The correct solution is to get the VISA close out of the while loop.

    The port settings are established in this order.

    1. by Windows device drivers.

    2. by the VISA driver as set in MAX.  Since you are using VISA, these settings will be automatically replace #1.

    3. by the port settings, you set programmatically in your LabVIEW program.

  • USB to Serial Port - Code 1, the driver Installation

    I have problems to install a USB driver for a USB Serial Port. In the divece Manager (Serial Port (COM & LPT) CODE of ERROR 1) appears an exclamation point and there is an option to reinstall the driver, but windows is unable to complete the installation. Please, help, thank you

    In Device Manager, delete all references to this port (remove entries) so it's as if the port did not even exist.

    Then click on start / Control Panel / Add Hardware and have it look for new hardware devices.  If all goes well it will go to the Port and ask drivers.  If it is not, select the option to find the device, and then select USB Serial Port (or which option he plans that comes closest).  Follow the procedures.  Try to install the drivers now that Device Manager is clean and if all goes well they will now install and you're ready to go.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • HP ZBook 15 G2: I can't find driver for Serial Port PCI

    After re-installation, my HP ZBook 15 G2 is missing the driver for "PCI Serial Port (COM5)".

    This unit has the following ID: VEN_8086 DEV_8C3D

    I installed all the drivers for chipset for the HP ZBook 15 G2.

    Where can I find the driver for this device?

    Hello:

    You need this driver.  If the driver will automatically install the driver for serial port, and then manually install the device by navigating to the folder of the driver that was created when you ran the file.

    This file will be located in C:\SWSetup\sp68428.  Make sure that the include subfolders is selected and the driver should install.  Then restart.

    http://h20564.www2.HP.com/hpsc/SWD/public/detail?sp4ts.Oid=6978815&swItemId=ob_137806_1&swEnvOid=4059

    The hardware ID you posted is supported by this driver if you look in the mesrl configuration file.

    [Intel.NTamd64]
    % SRL_DeviceDesc % = ComPort, "PCI VEN_8086 & DEV_1E3D & CC_0700"
    % SRL_DeviceDesc % = ComPort, "PCI VEN_8086 & DEV_1CBD & CC_0700"
    % SRL_DeviceDesc % = ComPort, "PCI VEN_8086 & DEV_1C3D & CC_0700"
    % SRL_DeviceDesc % = ComPort, "PCI VEN_8086 & DEV_1DBD & CC_0700"
    % SRL_DeviceDesc % = ComPort, "PCI VEN_8086 & DEV_1D3D & CC_0700"
    % SRL_DeviceDesc % = ComPort, "PCI VEN_8086 & DEV_8C3D & CC_0700"
    % SRL_DeviceDesc % = ComPort, "PCI VEN_8086 & DEV_9C3D & CC_0700"
    % SRL_DeviceDesc % = ComPort, "PCI VEN_8086 & DEV_9CBD & CC_0700"
    % SRL_DeviceDesc % = ComPort, "PCI VEN_8086 & DEV_8D3D & CC_0700"

  • Get information about the physical location (serial) Visa (slot) in PXI time real (Pharlab)

    Hello

    I PXI system with controller time real (OS Pharlab) and many maps series (about 6 cards).

    The maps in the series are two different models, which each contain several (8431/8 and 8421/8) serial ports.

    And the COM Port enumeration mix and I would like to know the link between COM numbering where it is linked.

    I have already dealt with a few methods:

    1. I've tried using the node property of Visa but he cannot know which card port COM belong

    2. I tried to use the Configuration Library system and don't manage to get general information of the card and not what ports have this card.

    3 try to fill you with the VisaConf.ini, but discovers that ASRL and COM Auto-enumeration is the same.

    4. I tried to look in NISerial.ini, NISerial.dbs and NOR - RT.ini and did not find any help here.

    Application engineer or support suggest to look in the registry of the operating system Pharlab because it is windows based and material information must be stored in the registry

    Further explanation on the problem of PXI enumeration:

    PXI produce enumeration auto for the ports series (COM3, COM4, COM5...) according to the card slot, but when there is a mix of the two models of the system would then list a model (8431) from 3 to 50 (6 cards and 8 ports) and the other model (8421) 51 to 98. so if I have 8421 in 2 and 8431 slot number in the slot number 3 it would list 2nd slot COM59 to COM68 and 3rd slot COM11 to COM19.

    Why not just use NOR-MAX to manually configure the ports?

    The system is essential and can not be stopped for a long time and he operated by people who are not very technical, so the customer who wishes to be able to exchange business cards without futher configuration.

    Thank you

    Or Hirschfeld

    Application engineer

    SK-Electronika, Israel

    www.LinkedIn.com/in/orhirshfeld

    Solved and download the example of solution of community

    Get the location COM (Serial Port) and Port physical location in the chassis

  • Measurement & Automation explore (MAX) cannot find any serial ports

    Hello

    I tried half of the internet, but I can't find a solution for my problem. Maybe someone of you have an idea :-)

    My System Information:

    OS: Windows 7 (64-bit)

    LabView: LabView Professional Development System 2015 (32 bit)

    MAX: Version 15.0.0f0

    NI-VISA: 15.0

    NOR-Serial 14.0

    I've attached a screenshot of MAX at the end of my post.

    All the drivers for serial ports are properly installed (see another screenshot). But Max, I can't find these ports. There is only the error code "0xBFFF0011 (VI_ERROR_RSRC_NFOUND). If I want to add the COM Port via 'Devices and Interfaces'--> 'New'--> ' Port (serial or parallel) ", I can only choose between COM1-COM4 and LPT1-LPT4. But I need COM9!

    Anyone have any idea what I did wrong?

    Thank you

    deZeus

    I looks like something is wrong with your installation OR VISA (as MAX does not find ALL ports).  Make sure that NEITHER VISA is activated (sometimes of other kinds of visa in the way), or try reinstalling NI VISA.  Serial number NOR is not necessary since you are not serial ports using OR.

  • Serial Port problems - carriage return and use as an executable file

    Hello

    I developed an application to send a few simple commands on the serial port and read the corresponding answers of a device that I am in communication with.  I have been using logical Port to watch the line TX of the serial port.

    By using the Visa configure Serial Port I set the stop character property allow true and used the hexadecimal value D trying to make the termination a carriage return characters.  When I sent the order, I'll send the cmd followed by Enter.  No matter if this property is set to true or the hexadecimal value is set to D for carriage return or line break is, the serial port would always send a line break.

    Then I got crafty and the string constant under normal display to hexadecimal display.  The ONLY way I could send a carriage return was manually putting 0x0D after ordering.  So my question is, why the Visa set up the Serial Port is not working correctly, and is there a better way to send a carriage return?

    My next issue is facing the construction of executable files.  I'm using LabVIEW 8.2 and wrote this program for another employee to use on his laptop computer.  I did install runtime Labview 8.2 and led to the executable that I generated.  I did-> the executable by clicking Tools build the executable.  The problem I noticed was that the executable would open and will work perfectly, but it would not send any data the serial port.  I then ran the executable on my laptop (which contains the full version of LabVIEW 8.2) and the serial port has worked well.  I guess my question is... Are there plug-ins that must be installed to use the serial port with the Labview runtime engine?  Or y at - it a step that I failed to do?

    Thank you

    Gary Still

    Not immerse in the first issue. The Knight will probably be galloping until shortly.

    For your second question, after building the executable, you must build the installer and includes support for the VISA. VISA is required for serial communication, and it does not accept American Express.

    It may be useful

    -AK2DM

  • Lack of Z - 400 serial port

    Hello

    I have a number of product Z-400 SG637UC #ABA

    Just updated to the latest version of the BIOS, was 1.17, I think.

    Manual maintenance and each user's guide I can find a reference to the serial port header (15-pin) construction which

    My motherboard has.

    However, I can't understand how to turn it on.  The security settings of the Bios do not list the serial port, and the Advanced Settings tab lists only the floppy drive and not the serial port.

    Are the parties other than the header not installed on the motherboard on this particular product number?

    Do not connect the pins of the rider 2 header and tell the BIOS the material is there?

    PIN 12 of the 15-pin header is labeled 'detect the com' on page 168 of the Z-400 maintenance manual.  I do not think it is a standard pins for communications series name.  Is it being stretched up or down to activate the port?

    I don't particularly want to spend money for the "2nd serial" material, when the first serial port is not working.

    Thanks for any help.

    PM

    AP_M,

    The Z400 has a 2 x 8 serial port header, you have found.  To access the serial port, one needs the HP, the PA716A Option kit serial port adapter.  This kit, described here, has a small PCB attached to a PCI card and cable to the PCB of the card mother Z400.  This PCB contains the RS232 serial port transceiver integrated circuit, so it is necessary to make the serial port work - a straight through cable from the motherboard to a will of connector serial port not working, to not try.

    Option kit that pa716a can be ordered as an option Z420.  The kit is not listed for the Z400, but the Z400 (and many other HP computers) use the same kit.

    To answer your technical questions:

    -IIRC, Windows requires masking devices that are not accessible.  That's why the serial port does not appear in the device without this option installed kit Manager.

    -12 axis, as you can imagine, is a "detect the com' which tells the system that the serial port kit is installed.  He is shot down (the Earth) when the cable attached to the motherboard.

    -If you want to experiment and see if the serial port becomes active, turn off the Z400, then put a jumper between the P52 12 serial port connector pin and ground.  Soil is on pins 8 and 7.  (The pins are numbered with strange pins on one side (row) and evens on the other kind of pin 2 pin 1 opposite.)  To determine which line is even or odd, pin 16 is the last pin and the missing key on the 'same' line).

    Then turn on the system.  After the Earth axis 12, the serial port should appear in the BIOS settings and certainly in the windows.

    * I think this is how it works, I have tried for a long time. **

    Does that answer your questions?

  • When a character appeared reading serial port

    How to wait for some specific characters occurred in the serial port (e.g. port COM1 RS232 on PC) and then they recover at the port?

    I want to communicate back with a motor controller that uses ASCII strings such as commands and responses. It formulates a response to any command sent, and the response contains exactly a termination character (that I can specify during installation) at the end of the response string. Sometimes also, it sends a message when there is no order issued, for example a disc error message. There is no simple way and reliable when the controller is going to speak, when he won't, and the message will be exactly how many time, but we do know that each message will have this stop only at the end character. I would like to interpret the entire message in my code, that is to say, I would like to retrieve the string of all the characters from the previous endpoint character up to and including the most recent stop character. I think it means that I would have a VI that returns the message string and does not stream until the stop character appeared and was added to the response string. Or, Alternatively, a loop that adds entire messages to a queue of strings.

    All the screw example I found seems to rely on a certain number of milliseconds to wait or to know how many bytes to read, in order to use VISA Read.

    So far, I use a loop which seeks bytes in the buffer, retrieves everything to add to a string of shift register and test if there is a character of the string endpoint, all extract up to and including the stop character, if so. This feels very awkward and expensive for what should be a common task. Is this general law approach, or did I miss something in a simpler way?

    I read on the communication by Message and characters of endpoint, approach that sounds functionally similar to this, but it seems around standards of SCPI and my motor controller does not support this. In any case example Finder does not get a single hit on 'Message '.

    Thank you!!

    It really looks like you are doing things a lot more difficult it must be. Look at the VISA configure Serial Port. It has a character of endpoints allow and end characters entries. If you wire a real (or leave that he unwired) entry activate, read VISA will end automatically when you specify the stop character is detected. As long as the number of bytes to read is larger that the largest string that you expect to read, there is nothing else you need to do. That's how examples of shipment are put in place and discussions about the characters of the termination. Should there be nothing related to sustainable intensification of CROPS. If you do not get a message in your specified time-out, you get a time-out error.

Maybe you are looking for