USB-RS232 Modbus

Hello world

I am a beginner in LabVIEW and I am trying to acquire data from a microcontroller with Modbus Protocol in series. I use a converter USB-RS232 to prolific technology and Windows 7 as operating system.

I can't communicate with the card that contains the microphone. I get an error 1073807246 ("the resource is valid, but VISA cannot gain access to it").

I can't even set it up on VISA test Panel.

Someone at - he never tackled this problem and knows how to solve? Maybe it's because the USB-RS232 converter?

Thanks to all the advice for any advice.

Andrea.

If you had searched the error, you would have found the most common reasons for it. Make sure that no other program is using the same port. Windows allows more than one process to access the same port.

Tags: NI Hardware

Similar Questions

  • cRIO 9067 to hired 7fh USB RS232

    Hello

    I have a cRIO 9067 and would like to interface with an instrument that has a converter USB-RS232 from SiLabs.  I can't comminicate with this instrument easily on a Windows PC.  I am able to see the device in MAX when its the cRIO connection.  IT appears under "Devices and Interfaces" as "USB0::0x1FB9:0 x 0100: 121A00A:RAW ' with model number and description of the device.

    I followed the description at this link, but I don't get a ttyUSB # devices.

    https://decibel.NI.com/content/docs/doc-34827

    Is it possible to get this working on the cRIO as a serial port?

    Thank you.

    After some research, talk with people, NOR google and to talk with people to lakeshore.com (provider of the device) this is what I have reconstitute on how to make this work:

    • Under Linux, usb devices are listed automatically, and by default, will appear as a USB RAW device

    • Once the USB device has been identified, it can then subsequently be linked to a driver

    • Linux determines if and when to link each device USB-based device Vendor ID (VID) and the model identifier (MID). It is usually 3-4 digit hex string.

    • In the case of the Lakeshore 121 power source, VID = MID 1FB9 = 100.       I could see in MAX for the Raw Device USB.

    • There are two levels of USB-serial device drivers. The first pilot: usbserial.ko is a generic driver that handles all USB-serial devices. This should be loaded for any USB-serial converter.

    • The second driver is specific to the chipset for the USB-serial device.       For the cRIO, there are three options which are pre-installed (DFT, 7fh and a few others)

    • The drivers can be found at /lib/modules/3.2.35-rt52-2.0.0f0/kernel/drivers/usb/serial/ (where the kernel version directory may vary)

    • Lakeshore 121 uses the TR labs CP210x chipset, so we chose this one.

    • Records of the device first of all need to be loaded by Linux. Linux can automatically do this by adding files of length zero in the module.autoload.d directory. To do this run the following:

      • CD /etc/modules.autoload.d

      • Touch usbserial

      • Touch cp210x

      • restart cRIO

      • run dmseg. grep usbserial to confirm that usbserial driver is responsible

      • run the dmesg | grep cp201x to confirm that the driver for cp210x is loaded

    • The next step is to associate the cp210x of our device USB device driver. Don't forget that linux associate unit to a pilot from the VID and moy. anyone installed linux cRIO base, I'm sure, knew nothing of the VID 121 Lakeshore and MID.

    • Lakeshore recommended to read the source code for cp210x, adding the VID and MID to the list of recognized devices, recompile the cp210x.ko file and install it on the cRIO. It would work, but it is beyond my current Linux capacity.

    • Linux offers the possibility to dynamically add MID, VID, so that a device can be recognized on the fly

    • When the driver CP210x is loaded, a struchture of the entire directory is created. There is a file because the directory structure called new_id where you can dynamically added VID, mid

    • Create a startup script to run the following command. Be aware of the problems of termination of cr/lf line between operating systems. It is generally easier to create the script on the cRIO with the VI editor to avoid any problems.

      • echo 1FB9 100 > / sys/bus/usb-serial/drivers/cp210x/new_id


    • Now, restart (or running the script), you will get a device/dev/ttyUSB [0-9]

    • Unfortunately, the creation of default of the unit ttyUSB [0-9] does not permission to write, so we have need create a UDEV rule to automatically grant writing

    • Add the following lines of code udef.conf in the folder/etc/udev

    #typical devices

    ttyUSB [0-9] * root: ATS 666

    • Create a file named 99 - ttyUSB.rules in the /etc/udev/rules.d folder

    • Add this line of code in this file:

    KERNEL == "ttyUSB [0-9]" * ", OWNER ="admin", MODE ="0666""

    • Restart the cRIO. This should be it! It worked for me.

  • With LabVIEW how to control an instrument with a RS232 output, using a USB RS232 converter cable.

    With LabVIEW how to control an instrument with a RS232 output, using a USB RS232 converter cable, since I do not have rs232 ports. I have two instruments I want for the control in this way. One is a guarantee of strength Imada SPAS with RS232 output. The other is a micrometer Panasonic HL-G103-S-J laser sensor which is RS422. I have done significant programming LabVIEW using GPIB, but I have no experience with devices such as these. No matter what tutorial or examples would be greatly appreciated.

    Thank you.

    When you plug the USB-RS-232 converter, it installs a driver under Windows which makes it look like any other RS-232 port.  You may need to install the driver of everything that came on the CD with the converter.  It will get a Com as Com5 port number according to what is the next available number.

  • USB RS232 "is connected Port" "invalid property value".

    I'm quite new to this so if all the below is not clear or needs more explanation Let me know and I will try to provide information.

    I'm trying to integrate a device in my LabView program. Of its guides, that I could find on the site OR mentioned most NI MAX goes first and then working them down. My camera is an RS232 port, so I connected via a USB converter, and I know that I'm looking at the right port (COM5) to look at the section "manage devices" on the control panel.

    All series settings are set up properly, I would say (the user manual ishere, with 17 being the party and my setup herepage). I tried to test commands, he gave me on the input/output section, but constantly came up with the error "VISA: (Hex 0xBFFF0015) timeout expired before the operation is complete." Initially, I thought I entered orders incorrectly, I find instructions in the manual that is confused, especially compared to the things other users have posted on orders ('\r' and '\n' instead of what I am told to write, but I agree that mine are not always literal characters).

    But when I went back to "Display attributes" connected "East Port" final attribute has an error with the "invalid property value" and the warning Hex 0xBFFF001Derror. Because of my inexperience with all this, I don't know where to start really trying to solve this problem, or what measures are in place, I need to do to start working properly.

    All advice is appreciated. Thank you

    The property "is connected" is only for devices of NOR so if you have another brand of converter, you would ignore the error.

  • How to send data to a usb RS232 port 6009?

    Hello world

    The converter that I intend to order has a RS232 port (terminals 71 and 72 according to the schema; RXD and TXD) and the use of this I can set and read parameters and control commands. I want to use the DAQ USB 6009 therefor. The format of data will take place as follows: -.

    A logical bit - 0 start

    Eight data bits

    A stop bit - 1 logic

    There are only 3 acceptable speeds which are 300, 600 and 1200, because the converter is very old.

    This makes my head completely, because I can't imagine a solution. Is it possible for the acquisition of data USB 6009 card?

    Any help will be appreciated

    Kind regards

    Sandeep

    If you want to control the converter RS232 commands, you must use a RS232 device. If your PC is not a COM port (free), you can use a good USB2RS232 converter market. The driver accompanying will provide a COM port for the OS and with the driver NI-VISA you can use in LabVIEW. Perhaps it is a LV-driver for the controller, just check the network OR Web driver.

    Will need you a cable custom at least three sons of the COM port (usually a DB9 connector) to the converter. GND (DB) - PIN5 at 55, PIN 2 to 71, PIN 3 to 72 (maybe you need to Exchange 71 and 72, if you can't get a connection, more details should be in the converter manual).

    You can start with hyperterminal for a first check, or use the RS232 interface - simple to write and read vi found in the examples of LabVIEW-help-find (don't forget the stop here character ;-)

  • H6510BD home automation projector (usb, rs232, ir)

    Hello

    Y at - it no availble documentation for controlling the projector with one of these options.

    (1) usb driver

    (2) rs232 codes

    (3) ir codes

    Kind regards

    SAL1

    I enclose the RS232 codes for this model of projector. I hope it's useful.

  • USB to RS232 (adapter OR or not)

    Hello:

    I have to use a USB-RS232 adapter to connect my laptop to a device for the control.
    The control will be through LabView library VISA.

    However, I found that the price for the USB-RS232 adapter varies a lot.
    NOR has one (http://sine.ni.com/nips/cds/view/p/lang/en/nid/12844), more than 100 books, whilte there are many other USB-RS232 adapter costs only 10-30 pounds in other locations.

    What I wonder if do USB-RS232 adapter or this price?
    Is there a compatibility issue (single adapter of NOR is compatibile to LabView?) or other conduct issues I should be aware of?

    I just want to understand the difference between adapter OR other less expensive adapter before making the purchase (but I will not avoid the issue of compatibility)

    Thank you very much
    Best regards, Jhensi

    Jhensi,

    There are many companies making USB-RS232 adapters that work with LabVIEW using NI-VISA.  The problem is that some cards drivers are not fully compliant with the RS232 specification.

    Another thing to consider is the isolation.  If you are in an industrial environment you wish to an isolated USB-serial adapter.  Personally, I use adapters of NOR and electronics of B and B.  If you search the forums you will find other manufacturers mentioned as well.

  • USB to RS232

    I WAS using a NI USB-to-RS232/4 hub and communicate successfully with an external device for a few days.  He decided to vacation elsewhere, and I found myself in extremis.  In the Discussion, looking for help (I think) "USB to RS232", I came across a post from someone with the same problem.  After trying the solutions proposed by OR, which I did as well after a long discussion with the support of NEITHER, the guy with the same problem solved by buying a USB hub to RS232 CommFront.

    I cannot find the thread now and can't get MAX to recognize the hub of CommFront, so I can't be a VISA resource. I uninstalled and reinstalled the driver NI-VISA and NOR-Serial 3.9.1 the hub appears in the device as Manager "usb > rs232.»  I would like to contact the person who started the thread I negelcted to record to learn how they have solved the problem, or am desperate for suggestions on how to get stuff NOR recognize an alien species, as the hub of CommFront.

    Thanks to you two.  I was able to change the name of "COM" after searching a bit in the Device Manager.   In series with the external instrument communication is now possible. I learned a lot of things.

    NOR should have a third option in the trade of these messages.  In addition to 'Reply' and 'Accept as Solution', the third option would be ' response and accept as a Solution. "  In this way, the thread can be closed while still giving the opportunity to thank those who provided solutions.

    Thanks again.

  • VISA: (Hex 0xBFFF003A) using a RS232 USB converter

    Hi, I'm reading a pH meter and it is connected to my computer by USB using a USB RS232 converter. NOR-MAX recognizes the instrument, but when I try to play the instrument in the testpanel I timeout error. When I read the status byte, it gave me the following error VISA: (Hex 0xBFFF003A) cannot start the operation because the installer is not valid (because of attributes defined in an inconsistent state). I looked in the attributes and saw the following error VISA: (Hex 0xBFFF001D) the specified attribute is not defined or supported by the resource referenced. the pH meter is a unit of office of simpel with the following characteristics: baud rate 9600 8 data bits years 1 stop only bit no control flow or parity.

    Why try to read the status byte? It is not an instrument based GPIB is?

    What attribute? I asked in your original post to attach a screenshot of MAX. Why should someone have to guess? I suspect this attribute doesn't apply to serial devices OR and is not relevant to try to read the status byte.

    Check if you are using the right type of cable and check to see if you add the correct end character. You also do not mention if you write what whether in port or just do a reading. You mention also the seller or the model number of the meter.

  • Exstance no of Modbus communication

    I work with a rs232 for connection rs485 via a UNO2019 PC box.  The RS-485 connection is going to be MODbus RTU, has about 4 slaves on the bus (MMI flowmeter, VFD, two temperature RTD). All theses devices are configured accordingin

    9600 baud, odd parity, no flow control. the VISA resource would be COM3.

    Now all of these components I worked with every day for numerious months. and VI implementation exists (almost) without error. I get an error code for the additional bytes to the port, but he spends the whole upward. I don't know if I'm not or write, but it has happened in every piece of software, I developed in labview (it does not check the boolean error so I guess that's not important).

    Currently, when I try to read the registers of the MODbus slave, I get error:

    -107380733 (that mean 100 different things that I have done my research properly, bad bytes to the port, do not use correct end characters in your message). But every time I have seen that error code discussed in question direct USB/RS232, not RS232 to RS485.

    The attached string was

    3-> MD series Master Query.vi

    2-> MB series Master query Holding Register.vi

    1-> address Test.vi

    Thank you for any light you can contribute on my problem.

    Problem has been resolved. It was a hardware problem as I thought. Apperently this code error will exist when your RS-232/485 is hard set via dipswitches do not send data.

  • Error 1073807346 series Modbus

    Hello world

    I am trying to acquire data from a microcontroller Infineon XMC 4500 with Protocol Modbus Series 9600 8 N 1; I also use a USB-RS232 converter.

    When I read books I get an error 1073807346 ("the given reference of session or object is invalid"). In particular, the error appears in the functions of reading records and read of input registers.

    I checked all possible solutions of document suopport, NOR in relation to this kind of error.

    Someone at - he never tackled this problem?

    I also include an excerpt of selection VI.

    Thanks in advance for any advice.

    Andrea.

    One or more of your events are not passing the name of the resource through the register shift. You have chosen by default if Unwired. The default is a blank resource name.

  • Question about USB DAQ 6363

    Hi all,

    I'm new with LabView, currently, we plan to purchase NI DAQ USB 6363 to use the entry to read the value of the resistor, capacitor and a diode and use digital i/o to check the functionality of the analog shift register. I want to check if it is possible that NI DAQ USB 6363 to acquire communication RS232 function because I want to drive barcode interface on it. I'll use LabView to log the reading result of database (SQL, Access) to do some data analyzation. IM also confused on test bench OR what is the relationship between she and NI LabView? is this another software to install except for LabView?

    Thank you

    No, you do not connect an RS-232 device to the DAQ card. The RS-232 is connected to the pc. If your pc lacks a built-in port you can use a USB-> RS232 converter.

    TestStand is a test of the direction which runs tests written in several languages, including LabVIEW. He plans the tests determine the success/failure, record results, create reports, etc.

  • Modbus driver for labview

    Hello

    Has anyone used driver to connect to a device using RTU on RS232 Modbus labview?

    I have a camera that I need to send messages and I tried to use the labview OR to that effect drivers.

    I used 'Query.vi Mo series Master' to send a message.

    But, I don't know what it would take as input in this vi to frame the message using the RTU Protocol.

    Also, I wrote a program to calculate the CRC for an input string. I don't know where to give that as input for this vi add the CRC to the frame of the message.

    The vi automatically calculates the CRC?

    I am attaching the document for the device in which talks about pages 106-117 to develop an application to control the unit.

    Can someone tell me please how to use modbus for this driver? The document in support of this driver gives me a lot of information.

    Thank you

    VJ

    The modbus VI automatically calculate the CRC for you.  Right-click on the inputs to the Modbus VI query and select Create constants.  The constants will be the clusters for the necessary data.  The key parameters are Modbus slave address, command, address,...

    Note that registry modbus addresses may or may not be moved by 1.  So address 1 in the manual might actually be the address 0 in the Modbus VI.

  • The connection of sensors with rs232 to the computer output

    In my project I want to display & connect the results/readings of different types of sensors (RTD, barometer, HR sensor, proximity sensor) with rs232 outputs in the Labview software.
    To do this, can I simply connect them to my computer using the usb-rs232 converter or do I need a data acquisition equipment to convert analog signals into digital signals?
    If so, please suggest a device suitable for my requirement. Im trying to keep things simple and complete this project within a limited budget

    Thanks in advance

    Sensors with outputs RS-232 already have the analog-digital conversion.  You just need the USB RS232 converter. Many people have reported on the Forums that converters with FTDI chips seem to have less problems than other materials.

    You should also the Protocol of communication with manufacturers of sensors to correctly set the parameters of the serial port and to decode the results.

    Lynn

  • Agilent 82357 B GPIB/USB, problem with distributed applications

    Hello everyone,

    I am developing software that communicates with an instrument, with USB, RS232, Ethernet and GPIB interface

    On my development PC, I can communicate with my instrument using a 82357 B Agilent GPIB - USB converter, without any problem. (and other interfaces as weel)

    I have deployed the application using the Installer application on the target computer Builder. The application works with USB, RS232 and Ethernet interfaces, but I don't see the GPIB interface in the control of VISA resource name.

    I followed the advice given by OR when you use a converter USB GPIB of Agilent (Tulip active...)

    I did the following tests on the target computer:

    -J' installed MAX, and I can communicate with the VISA test panel using the GPIB-USB converter.

    -J' made a small application with the VISA resource find included

    -If I unplugged the converter USB/GPIB instrument, the VISA to find the function return resource: GPIB0::INTFC, COM3, COM4, LPT1 COM7

    -If I plug the converter to the instrument, the function of resource VISA finds return nothing.

    -If I run the interactive command of VISA, I got the following error:

    Cannot find the resource by using expression? " »

    error: BFFF003A

    Name of the State VI_ERROR_INV_SETUP

    I'm using LabView 8.5 under windows XP.

    I have included in the installer

    -Run LabView 8.5

    -VISA 4.4 duration

    The target computer is running Vista.

    Thanks for your help and your support.

    Hello everyone,

    For your information, I have solved the problem in desinstalling then reinstalling my installation software on the target computer.

    I still don't know where the problem was, but it's working now. (even with the version of the driver 15.0 agilent)

    Thanks anyway for your help.

Maybe you are looking for

  • HP CP1215: HP CP1215 single first printing sheet

    I was fine for a while on this printer print and think it's a great printer. He suddenly decided that she onl wants to print the first page of a document or a print request. Fine for a page of letters but if I need to print a long document, so I have

  • Director of photography of CyberLink 3.0 not found DRIVERS for windows 7 64 bit operating system

    Director of photography on CyberLink 3.0 DRIVERS not found for help pl. of 64-bit windows operating system 7.

  • Developer outside connections WE disabled?

    It's the most stupid thing If I use my VALID email address ending in. co.nz on this page http://us.BlackBerry.com/developers/ I get an error message stating that the e-mail address is not valid. If I change the field of. co.nz at .com, I receive a ne

  • Mixture of painting in photoshop

    HelloI'm having a problem of mixture of painting in photoshop; the colors just blend when I put one on the other.This isn't a problem, I've had previously, and there is no need to use the mixture or blur tool or a need to change the normal setting fo

  • Impossible to install any application of new cc

    Hey guys,.until this Friday my ps cc2014 and Illustrator cc 2014 have been working well.My son has removed a few apps from my mac and it has removed even my cc, I don't know why the hell he did.I tried to reinstall, but Setup is breaking upwards to 1