cRIO serial

Hello

I am trying to send data via the serial port of a cRIO 9024 using RT and confronted to synchronization problems.  I use the VISA drivers in a vi of RT to get the number of bytes to the serial port, and then read the data and plot it (and move to an FPGA vi).  Reading the serial port and the cards are in a while loop and I use the wait function (ms) to set the speed at which it checks the data to the serial port.  It works fine, except for the fact that occaisionally there is the only character available to the serial port, and I find myself with zeros or weird values here and there. When that happens, I get an error related to the buffer - I inserted a clear vi buffer so that it clears the buffer after each iteration of the While loop, but still get the same error.

I see that the routine running on the Arduino is very stable - 205 ms more or less of one millisecond.  In addition, by using the serial monitor in the Arduino development environment I see all the data without problem.  There is no flow control in the serial monitor, but I guess I wouldn't be able to see the delays between some of the characters because it is running so fast.

The transmission speed is 115 200 Baud, 8 data bits, 1 stop bit, no flow control.  I have experimented with different transfer speeds and see the same question.  I guess I could try to implement using CTS/RTS flow control, but before I take a couple of digital lines on the Arduino, I wonder if I'm missing something else.  Any help would be appreciated.  Thank you!

Pictures say a thousand words, so here is a an example quick and dirty playback of a serial port to a string buffer. It then checks the buffer of channels for delimeters before moving the data to a second loop that would write the data to the FPGA. Don't take that as gospel but, he was untested and incomplete! Note that the string "\r\n" is set to display escape characters.

To read an exact number of characters from a serial port, simply wait until the bytes to port is greater than or equal the number of bytes desired, then read the number of bytes using the series read VI. The above code is based on the formatting of the message serial and the delimiter, rather than it's overall length, so it is a little more flexible in this regard.

Regarding the bad numbers that crosses, VI string analysis probably rise an error. You can use this to throw bad values.

Tags: NI Software

Similar Questions

  • The cRIO serial port can be used for the CAN bus communication?

    I would like to order a CVC with a CAN of network device and would like to know if this can be accomplished by using a serial port integrates the cRIO (OR cRIO-9024 in my case). Is it possible, or would need a C Series module CAN?

    You need a C Series module. Series and CAN use a DB9, but they do not have the same physical layer.

  • serial port cRIO

    Hello

    Can someone tell me how to access the serial port of the crio 9024. I pass the data to the serial port of the controller. This transmission must be by crio serial port and not by module CSeries.

    Thank you

    Hello mimran,.

    cRIO controllers run LabVIEW Real-time.  Therefore, you perform series read/write through the range of NI-VISA in LabVIEW.  All data collected from the port, or sent to the port will have to be given "String".

    There are examples for reading installed with LabVIEW series.  These are only a few small changes to work as in real time.

    Follow these steps for an example:

    1. Launch LabVIEW.
    2. In the main menu, go to the 'Help'-> 'find examples '.
    3. In the upper left corner, click on the tab "search".
    4. Search for the term "series".
    5. Open the example called "basic series write and Read.vi.

    Kind regards

  • RS232 port on the cRIO-9074

    Hello everyone!

    I have a cRIo-9074, with on the frame a RS232 port. I'm trying to use it, but without success... I have already installed NI-Visa. But what do I do now? When I create a new project, I can't find the serial port, and I can't find a tutorial for this...

    Thank you very much.

    Simon M, starting in Labview and cRIO.

    Hello smichau,

    This problem was already forum dealt with several in is not this one.

    http://forums.NI.com/T5/LabVIEW/cRIO-serial-port/TD-p/1145870

    I wish you a good day,
    Kind regards

  • How to read the host name or serial number cRIO locally

    I have not worked with cRIO and decided to ask for help.  (o).

    I don't know about the screws that allow to access this information from a connected Windows machine, however, I want to retrieve and display this information on remote panels.  But I cannot determine how to read the cRIO hostname or the serial number of the software running on the cRIO?

    Thanks for the help.

    James

    This could help.

  • cRIO/PC serial communication

    I am fighting to get my cRIO-9076 to connect to a PC via a serial port, integrated the cRIO.

    My goal is to change the State of the DTR on the PC pin and have the cRIO recognize the change.  I think that the code that I have attached should accomplish that, but it doesn't.  I am convinced that the VI that runs on the PC functioning nominally and that the problem lies in the cRIO or how I'm trying to connect to it.  I also tried to run some basic 'writing of cRIO, read on PC' with no luck.

    NOR-Serial RT 3.8.0 & 5.8 NI-VISA are installed on the cRIO.

    The PC and the cRIO are connected via a 9-pin null-modem cable.

    Thoughts?

    Since you said that you use a simulator of modem cable to connect the PC with the cRIO, it means they are all two DTE equipment cables for their serial ports.  DB is the outgoing signal line.  What you need to do when you analyze this signal should read the entry on the other device which is the DSR line.

  • Serial numbers for the cRIO-9081 Module

    Is there a way for the FPGA in the cRIO-9081 to read the serial number, date of calibration of the NOR-9201 module installed in the cRIO?

    I want to get this information and send it to my Host.vi, because we have a duty to provide information instrument document during a series of tests.

    Thank you

    Paul

    Use a property node of the module to read the number of series/VendorId... but the calibration date is not stored. (FPGA code example shows NI9205 data)

    Here a Fifo of DMA target host is used to send the data to the controller of the CR...

  • I can connect an NI MXI-Express RIO 9154 off the cRIO-9068 serial?

    I would use the cRIO-9068 a new system but will need a second wreath off the first chassis. Can I use NI MXI-Express RIO 9154? If so, how to connect the MXI cable until the 9068?

    Not the MXI Express, but you can use EtherCAT: chassis NI 9144 8 locations EtherCAT Slave for C series i/o Modules

  • I can measure the speed of the NI 9401 fan & cRIO 9075 under Scan Interface?

    Hello

    I am currently using OR 9401 & cRIO 9075 to develop a project, which is to control the CPU fans.

    Since I have to communicate with other instruments by serial port, while I have a NI 9870 module to implement the instrument control.

    I finished the part of control instrument under scan mode and would like to add the function of the fan speed reading.

    Now, I wonder if there is a problem when I choose the Scan Interface to deverlop the program.

    I found the following tutorial, he uses the FPGA interface to impement the acquisition of control and PWM frequency.

    http://www.NI.com/white-paper/3230/en/

    So if the function of the fan control only developed under an FPGA interface, I have to rewrite the control instrument part, seems to be a bit complicated...

    You can use the hybrid mode.

    http://digital.NI.com/public.nsf/allkb/0DB7FEF37C26AF85862575C400531690

  • Connection cRio 9074 second port ethernet to another device via VISA

    I'm trying to connect a DAQ Yokogawa system to a cRio 9074 via the second ethernet port. I activated the second ethernet port of the cRio with a static IP address on the same subnet as the data acquisition system. I installed the driver NI-VISA and NOR-SERIAL on the cRio. I can compile the code on the cRio and I'm sure that the code works when I connect to the acquisition of data to a PC. I get an error on the open VISA VI.

    Am I missing something or is it not possible to connect the second ethernet port on the cRio in this way?

    Thank you

    Thank you for your response. I found the same information that you provide, but decided to give it a try.

    A few minutes ago, I was able to perform communication between the cRio 2nd access Ethernet DAQ Yokogawa. I managed to do it using the VISA controls. To communicate with the host PC, I get the information of the DAQ with the cRIO as described above and then use shared variables to publish data on the network connected through the first ethernet port.

    If anyone wants to reproduce it just to make sure that the two ethernet ports are configured with IP addresses on different subnets that are configured for TCP communication. If more details are to be simply send me a message.

    Kind regards!

  • How can I connect the HOST PC COM port under cRIO 9074?

    I can't find any HOST PC COM port on my cRIO.

    I tried to use the global variable, but it was useless.  Is there a solution?

    sad0000 wrote:

    I can't find any HOST PC COM port on my cRIO.

    And why should he?  A cRIO is really another computer.  You expect your PC to see serial ports to another PC on your network?  No, you wouldn't.

    If you really want the cRIO again the serial port of the PC communication, then you will have to apply on the PC that can communicate with the cRIO, usually over TCP/IP or network stream.

  • cRIO-9002 - sees in MAX but Can not control

    I have a cRIO-9002 with chassis cRIO-9201, I try to configure so that I can use it for a new project in the lab that I am working. So far I was able to get on our network and am able to see to the MAX; However, once I click on it in MAX, MAX is here trying to cool off for a while and system resources all is listed as not available (once MAX gives up on refresh). I'm not able to see the installed software and it disconnects frequently. I turned on the CONSOLE OUT on the cRIO and here is the result:

    [2J
    General software embedded STPC BIOS 2000 (tm) revision 5.2

    Copyright (C) 2003 General Software, Inc.

    Copyright (C) 2004 National Instruments Corp.

    Controller OR cRIO-9002

    [23; 01 H (C) 1996-2003 General Software, Inc..]

    STPC - 5.2 - 01DE-EB2E [01; 01 H [06; 01 PM
    00000016K low memory passed
    00000512
    00000589

    00000000K Ext memory passed
    00031744 [08; 01 pm [s [u [08; 01HWait...]]]

    PCI device table.

    Bus Dev Func VendID DevID class Irq

    0 b 00 00 and 104 has 0201 Host Bridge

    0c 00 00 104 a 0210 ISA Bridge

    00 0D a 00 104, 0229 IDE Controller 11

    0E 00 00 104 a 0230 Serial Bus 11

    0f 00 00 104 a 0238 Ethernet 11

    00 18 00 1093 705E 11 unknown device

    1F 00 00 104 a 0981 Ethernet 10

    [2JBIOS review: 1.1.9 (10/08/04)]

    Firmware revision: 10.1.94

    LabVIEW RT the start player...

    FAT16

    Jump to 07E0:0000

    Checksum: 018D9C6A

    Executive in time real LabVIEW

    Construction time: June 21, 2011 01:17:21

    (C) copyright 2002-2011 National Instruments Corporation

    MAX system identification name: englab-fpga

    LabVIEW time real Single-Core Kernel

    The initialization of the network...

    Device 1 - MAC addr: 00:80:2F:0 A: 7E:E2 - 131.151.115.38/22 (primary - auto)

    System Web server started

    NOR-RIO 4.0 Server started successfully.

    NI-VISA 5.1 Server started successfully.

    Welcome to LabVIEW Real-time 11.0

    FTP SERVER ERROR: Cannot start threaded

    FTP SERVER ERROR: Cannot start threaded

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    FTP SERVER ERROR: Could not create threaded command

    Of course, there is some kind of problem here, but I don't know what it is. Any ideas?

    Hi nslogan

    What version of the drivers OR RIO, LabVIEW and LabVIEW RT do you have installed on your computer?

    OR MAX was able to communicate the fine before? Nothing changed?

    Is your cRIO executes any RT executable launch, request or communication with an FTP server?

    If your computer has all the software and drivers may be easier trying to format and reinstall the cRIO, it doesn't take long and it takes a few simple steps.

    How do I format my target in real time and reinstall the software?

    Concerning

    R. Esteban

  • 9033 OR & NI 9870 - series recording parameters do not restart the cRIO.

    Hello

    I have a cRIO OR 9033 with two RS232 9870 cards. The two cards series and their ports do not appear when I turn on the cRIO. When I run my executable in real time, once it crashes, saying: he cannot find the ports I ask. After that it crashes, the channels appear in MAX and VISA resource controls, and when I run the program a second time, it works very well. Why does this happen? Is it possible that I can have the save of the series, so I don't need to have the program crash whenever the cRIO starts?

    I run my program in hybrid mode. I Interface FPGA and including two maps cRIO outside the FPGA target, like this:

    I tried the cancellation of the deployment and the deployment of all, but it does not help. It blocks the first time regardless if I execute the suite of LabVIEW Development or if I deploy it as an RT executable and run at startup.

    Here are some pictures of what is happening:

    10-port VISA should be available. The two on the chassis and four for each card to 9870.

    When I start first cRIO, only the ports of two chassis looks for selection in a control channel VISA:

    And the channels do not arise to the MAX:

    Showing also currently installed software.

    When I go to the settings of NI-VISA 14.0.0 page I see this:

    Channels appear here, but nowhere else.

    When I try to run my program, I get this error:

    And after the error, the channels appear in LabVIEW and MAX!

    Series settings will remain as long as I leave the cRIO powered. If I disable, settings series pannals and I need run my program once only it crash before I can use the serial ports.

    I would really like for these settings apply automatically without having it fail the first time.

    Any suggestions?

    I also run hybrid FPGA on cRIO with cards 9870 and 9871 under the scanning engine you are. I also noticed behaviour buggy when accessing the COM ports - for example, if the cRIO running the executable version of his program and you interrupt it to run the same program in interactive mode, often, you receive the error message "missing resources VISA." So what I do is restart the cRIO with the disabled startup application.

    I honestly would not bother to configure anything through MAX when it comes to your cRIO. You configure port configuration programmatically. In the process of initialization of your program, open your bitfile, run it, wait, a few seconds to have everything settle, make a VISA "find resources" and confirm all your ports appear, then use the VISA to configure and open the port by program. This way worked for me.

  • maximum rate of series cRIO 9066

    Hello.

    I would like to know the maximum flow to the serial port on CompactRIO 9066. I couldn't find it in the manual.

    Kind regards

    Daniel

    Hello

    The maximum speed of all cRIO-906 x devices is 230.4 Kbps. CAR 554278 has been filed to have this information included in textbooks of specifications, but at the time meant, serial specifications will be equivalent to the cDAQ-9068.

    Kind regards

  • IP address on the cRIO-9075

    I have a cRIO-9075 serving piece of alternative/backup for one of our production test systems.  I was about to try a new code on this backup, but I can't connect to it.  I searched in MAX and tried to ping to the IP address that it should be, but I get no response.  It has been configured with a static IP address so it would be ready to be deployed if necessary.

    Is there anyway that I can get back to the default IP address so I can connect to it?

    Take a look at page 17 of the user of 9075 Manual: http://www.ni.com/pdf/manuals/375650b.pdf

    To reset the IP address of the 9075 you will need to walk through the following steps:

    1 press and hold to reset for 5 seconds, then release. The status light
    comes on, then starts to blink three times every few seconds. The
    chassis is now in safe mode with the release of the compatible serial port.
    You can use a serial port terminal to read the IP address of the
    controller. If you want the controller to a new DHCP protocol
    connection, go to step 2.

    2 press and hold to reset for 5 seconds, then release. The status light
    Repeat the same behavior. The cRIO-9075/9076 trying to establish
    a new connection to DHCP. If he fails, he attributes to a link-local
    IP address. If the DHCP connection is effective and appropriate for
    your application, go to step 4.

    3. configure the IP address and other network settings in MAX.

    4. press and release the Reset button to restart the chassis.

    The following documents will also be useful.

    Why don't my CompactRIO or Single-Board RIO controller is displayed in Measurement & Automation Explorer (MAX)? - http://digital.ni.com/public.nsf/allkb/ABE4BC247E8AC9BC8625734E005CAB42?OpenDocument

    Connection to a target LabVIEW Real - Time (RT) directly with a cable crossed - http://digital.ni.com/public.nsf/allkb/72AE8CADA1AF075686256A16005D55B1

Maybe you are looking for