Communication with modbus devices

Hello All,
My name Peter, I am currently exploring what LabVIEW has for instrument communication. I have explored a little on NI-Visa and used it for instrument communication through USB and Ethernet. My next task just now is to see how I can communicate with Modbus devices. I have done some background reading on modbus communication protocol and now have some level of understanding of what it is about. I hope to understand more as I continue to read more materials.
I came across an NI-Tutorial  titled Connect LabVIEW to any PLC with Modbus. It is about communicating with a networked PLC using modbus. I followed all the steps described for creating Modbus master I/O Server, Binding shared variables to Modbus Address through the I/O Server and writing to Modbus Addresses in LabVIEW. On running my VI to deploy the shared variable, the following error occured.
Can anyone please guide me on what to do because I do not know exactly what is going ON. I engaged in this excercise with the hope of getting to understand more about Modbus communication and then see how I can apply thesame idea to communicate with the Modbus device available in my Laboratory. Please note that I do not yet know much about modbus communication and I am just learning about it now. I do not have any PLC connected to the network. Could that be the reason for the error? If anyone has got any other relevant document to help me get started with modbus communication I will be happy to have them posted here.
Thanks very much for taking time to read through my post message. Hope to hear a quick response from you.
Regards
Peter

Hi SmithD,
I would like to say thank you very much for making out time to respond to my queries. I have done as directed but still not getting result. Following the wire mode port setting configuration, I stopped the process and then selected the RS485/wire4 as the wire mode. On running the VI, an error pops up with the information that the Visa resource is Valid but the port cannot be accessed. I noticed that If I undeploy the shared bound variable the error does not pop up anymore. I concluded that maybe I was not supposed to have added the VISA configure Serial port in the first place.
Kindly tell me what to do.
My task is to read the holding register from a Modbus device. I have the register map with me, and know the TCP and RTU settings for this device. After the attempts I have made so far I was forced to believe that perhaps the device was not responding. I then resolved to using the QModbusMaster which was previously used to read the holding register. For reasons I don’t not know, It worked well with the TCP communication and returned an error that read " slave threw exception > unknown error". With that, I am now sure that the device is functioning properly, at least with the TCP.
Having obtained result from the TCP using QModbusMaster application, I want to simply do the same using LabVIEW.
Some few questions for which I would want to ask for clarification are:
1.)  When using the Modbus Library, do I need to create both master and slave instance to be able to read the holding register? My attempt was to create a Master instance with the RTU parameters. The starting address and number of registers were specified at the input terminals of the Read Holding Register VI. This VI immediately followed the Create Master Instance VI. I was expecting that that would read the information contained in the specified registers and output it at the register value terminal. One challenge with this attempt was that with RTU it didn't work. I tried selecting TCP as the VISA resource. But the device was not showing on the list. I went to MAX to create a new VISA TCP/IP resource under the network devices but MAX could not detect the presence of the device. I am now thinking maybe the device is not supported by NI-VISA and so it will not be possible to use the Modbus Library with it.
2.) If the device is actually not compatible with NI-VISA, can DSC I/O server be used to read the information on the holding register?
3.) Do I need an intermediate device between a Modbus device and the PC to be able to read its holding register?
Please if anybody has got a good suggestion as to what to do to  get my task achieved, kindly leave me a post.
Thanks
PETER

Similar Messages

  • I get an error message when trying to install windows 7 on my macbook pro. The message says "windows has encountered a problem communicating with a device connected to your computer. I don't have anything connected to my computer. How do I fix this?

    I'm trying to install windows 7 on my macbook pro. I went through the process of bootcamp telling it to install windows 7. Once the windows boot manager started an error message came up. The error message says " windows has encountered a problem communicating with a device connected to your computer. I don't have a usb connected to my computer. I  am using windows 7 professional install disc. I  can't figure out what i am doing wrong. The same message keeps coming up over and over. Am I doing something wrong or is it something else?

    Well, shucks, i just spent almost 30 minutes trying to find your model user guide to explain it better, I guess they never got around to making it.....
    I would just borrow another Windows disk and try installing it again and if it does it again then you might take it to an Apple Store and see if one of the "Genius' " can figure it out.
    Make sure your internet is enabled and click on your blank desktop and at the top of your screen is a Help menu option, enter PRAM and it should give you a list of things relating to Pram. It may take a few seconds to list anything as it has to connect to Apples severs first. It should list the things you may have to fill back in when your done.
    "P-ram" stores some common information that is used in the background, your date, time, startup disk, etc, that you don't have to re-fill when you restart, it's a little different for each computer.

  • Not communicating with scanning device

    I am running windows xp home edition sp2 with an hp office jet 5600xi all in one printer. Just switched to google chrome and I get the" no communication with the device error message" when trying to scan but can still print and copy. 
    tried all the suggested remedies but am hesitant to reinstall. Is there another remedy and if I have to reinstall, what should I avoid?

    Hi dfeagle56, thanks for getting back to me!
    I would recommend trying a reinstall, but we're going to go about it in a specific way. I'm inlcuding documents for each section of troubleshooting that should walk you through step-by-step.
    First, I would suggest Uninstalling the Printer Software.
    Once it is uninstalled, I would suggest putting your system into clean boot mode within the Microsoft configuration.  You can do so by following this document: How to perform a clean boot in Windows.
    Once the computer is in clean boot mode, I would suggest reinstalling the HP Printer Install Wizard for Windows.
    Please let me know how that goes!
    Please click “Accept as Solution " if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks" for helping!
    Jamieson
    I work on behalf of HP
    "Remember, I'm pulling for you, we're all in this together!" - Red Green.

  • How can I configure labview for communication with Modbus I/O?

    i read a article about configureing Labview for communication with modbus I/O in NI developer zone, but it was written for Labview 6, how can I configure it with labview 7. it seems there are some difference. Thanks!

    In both LabVIEW 6 and 7, you connect to modbus using Lookout Protocol Drivers (LPD) and then communicate to LPD using the tag engine of LabVIEW DSC or through DataSocket.

  • Windows has encountered a problem communicating with a device connected to my computer

    I have an HP Pavilion dv6 notebook; Product # WF536AV, running Win 7-Home. Without warning, when trying to boot one day I got the following error message: 
    Windows has encountered a problem communicating with a device connected to your computer. May be caused by unplugging removable storage while in use or a faulty hhd or CD drive. An unexpected I/O error. Error Code oxcoooooe9.
    I have a 500GB WDC hhd that seems to run hot.
    Cannot get into F8 Advanced Options, although I can get into BIOS (F9 & F10)
    Ran the Win 7 Recovery Disks twice. No help. Same message
    I can run Linux Ubuntu in memory (not installed). GParted shows the following:    
           Partition size    used       unused   label   flag              file system
    Sda1 76GB       14GB       61GB                                       NTFS
    sda2 400MB     300MB   100MB    SDV     Boot lba      FAT32
    unallocated 390GB
    6. No access to Recovery Manager
    7. F2: memory test passed but hhd test would not run
    8. In Ubuntu Disk Manager, report said drive had 'a few bad sectors', but hhd test would not run "Self Test- Failed (Read)
    9) Ran MBR repair disk and System Rescue disk; no luck
    10) In Ubuntu, when I look at the Windows file system, In 82 GB partition there is an 'RM' folder with an "Image" folder with 16 files.  In the SDV partition is the bootmgr folder and several others
    a) why cannot I boot to Windows off the hhd?
    b) what does SDV label mean (secure digital video; silicon data valu;tr; static driver verifer  from Windows)?
    c) is the hhd simply failing. I do not have an extra to swap out and try
    d) may the Win 7 Recovery disks bad, perhaps, and should I then download a Win 7 ISO file and try that?
    Thanks for any help. This is highly frustrating. I have already spent about 8 hours on this!

    Well, shucks, i just spent almost 30 minutes trying to find your model user guide to explain it better, I guess they never got around to making it.....
    I would just borrow another Windows disk and try installing it again and if it does it again then you might take it to an Apple Store and see if one of the "Genius' " can figure it out.
    Make sure your internet is enabled and click on your blank desktop and at the top of your screen is a Help menu option, enter PRAM and it should give you a list of things relating to Pram. It may take a few seconds to list anything as it has to connect to Apples severs first. It should list the things you may have to fill back in when your done.
    "P-ram" stores some common information that is used in the background, your date, time, startup disk, etc, that you don't have to re-fill when you restart, it's a little different for each computer.

  • The computer is unable to establish a two way communication with the device

    Hi  I am trying to fix a problem for some one else, and I am struggling where to look next. The issue is that we are unable to check the ink levels of a HP Deskjet 1050 printer.  The error message states that the computer is unable to establish a two way communication with the device. After running through the troubleshooting guide about this issue on the HP site with no joy,  I decided that it may be the printer and suggested a replacememnt.  Unfortunately A new HP Envy 5530 was purchased and connected (wirelessly) but the issue remains. I have uninstalled the drivers multiple times, and also disabled any firewall/anti virus software in case this was interfering. I was hoping that some one could point me in the right direction next? None of the other forum posts here (or any google searches) give a solutuon which has fixed the problem.  Thanks

    No I cant. Unable to ping the printer too, not sure if this is possible normally?

  • Communicate with Modbus device using OPCLabVIEW.

    Hi all,
    I am using LabVIEW 6i with DSC. I want to connect Modbus device. At some other place I saw that this is very easy with OPCLookout server but we don't have this opc server toolset. So I want to communicate Modbus device using LabVIEW DSC only. Did any one had done it please help me out.
    Thanking you.
    Vishal

    Hi thanks for the reply.
    In first para you are talking about some server. Is it OPCLookout / OPCLabVIEW server or anything else please let me know.
    As far as the OPCLookout server is concern, we got it. But our excate requirement is as follows.
    >>>>> We want to connect our modbus device with FP.
    We have flow controller working with modbus protocol. this controller store some parameters. At particular time(daily) we want to get this readings in FP and then pass it to some other PC or main controller. But I am not aware how the lookoutopc server would work with FP. I think that if we could connect modbus with LabviewDscOPC server than DSC will take care for the communication ( Not sure & not know how, if u know please guide me). Due to this only I am ve
    ry strict for the LabviewDsc.
    In third pare u told about to make driver for modbus. Please guide me how could i do this. I tried to communicate with modbusdemobox (ni one) using serialport vis. but not able to communicate.
    Please guide me.
    Thanking you.
    Regards,
    Vishal

  • Logic / OS X randomly losing communication with firewire devices

    Hi
    Connected to my MBP I have a Lacie FW drive with an Apogee Duet daisy chained to this.
    During a Logic session yesterday all of a sudden I received device removal (warning) messages for these two items although they were still connected to the relevant ports!? I also had to force quit Logic following this.
    When I reconnnected the devices were recognised but things were still not right as when I tried to change the volume on the duet the system was very slow in responding.
    I was running of the battery power but this has never happened before whether connected to the mains or the battery.
    Any ideas/should I worry?
    Everything seemed fine a couple of hours later when I restarted the system but I am uneasy about the potential for this to occur during a more important session.
    Any advice greatly appreciated
    Cheers
    Sam

    Hi Sam
    I have an Imac, same operating system as you (10.5.8) and also the Duet. Also got a Lacie external hard drive. i have also encountered this problem in the last week. however, I have had this problem in both Logic 9.02 and Record so it seems it isn't just a Logic problem.
    One question - was Airport on when you lost communication with your hard drive? My was and when I turned it off the problem has not occurred again. It may have something to do with it although I'm not technically minded so I wouldn't know why.

  • Establishing communication with GPIB devices

    I am a newbee to GPIB and a novice at VB (6.0). Have been unable to establish communication with devices from the VB .exe. I think I am not declaring something in the right place? Any suggestions?

    TG,
    What kind of trouble are you having reading data from the instruments? There's information that addresses some of the common issues about why communication with instruments might fail. For more information, please refer to:
    Why Can't I Communicate with My GPIB Instrument?
    A couple of useful tools that you can use to check out communication to the instrument before writing your Visual Basic app are NI-488.2 Communicator and
    Interactive Control (IBIC)
    If you are still having trouble after trying out some of the suggestions listed above, it would be helpful if you capture the ibwrt and ibrd calls using NI Spy, save the Spy capture, and then attach it to this forum. If you are unfamiliar with Spy, here's a link with information about how to use Spy:
    NI Spy
    Hope this information helps with getting data back from the instrument.

  • Mac suddenly stopped communicating with LAN devices, but internet access still OK.

    My iMac has suddenly stopped communicating with my wireless printer and my blu-ray player (DLNA).  Both have worked well for the past 3-4 weeks since I set up a new wireless router (Cisco EA4500). 
    Troubleshooting so far:
    Printer Function: My wife's MacAir and my iPhone both print wirelessly to the printer. [OK]
    2nd Printer connected to Mac via USB. [OK]
    Blu-Ray Player Function: System is able to reach the internet (YouTube) via the wireless router. [OK]
    Mac Function:
    Internet access. [OK]
    PRAM and SMC resets: [nothing]
    Restarted "Playback" media server software for blu-ray (DLNA) server. [nothing]
    Printer Setup: I have deleted and re-added the wireless printer and reset printer system. Mac will "see" the printer on the network, but cannot communicate with it.  [nothing]
    Attempts to use Epson Utility: Connection Error
    Router Function:
    Checked Firmware.  Most recent version prior to the "Cisco Cloud" fiasco - my router did not auto-upgrade and was not involved in the most recent firmware upgrade.
    I just cannot get the Mac to see any other hardware on the local wifi network, but the mac has no problem connecting to the internet.
    Any ideas?
    Travis

    Happened to me.Drove me crazy. Turns out, iMac can fix itself.
    Go to system preferences then network and select the connection (wireless or ethernet) that you want to use.At the bottom of the box you'll find "Assist me". click that and follow the prompts. it will likely telly you that your settings are screwed up (surprise) and ask if you want to fix them or let DHCP do it. Just let DHCP do it.

  • Losing communication with DAQ devices - help greatly appreciated

    All,
    I have been working on a VI whose function is the following:
    - Acquire data from three sources
         - A block of eight displacement sensors connected via RS232 (using a USB adapter)
         - An NI-USB 6210 card measuring voltages across eight batteries
         - Another NI-USB 6210 card measuring voltage across four load cells (these correspond to batteries one through four).
         - Data acquired at 1 Hz, written at 0.2 Hz (no buffer - simply writes one fifth of data recorded)
    - Open/close a relay board based on certain inputs
    - Provide basic UI functionality to control data manipulation, display data, and write data to text files
    - Write data to text files
    We have run four tests with this VI.  Each test runs for anywhere from 24 to 48 hours.  During three of these four tests, we have lost connection with one or both of our NI DAQ cards.  I have attached one of the output files - notice that in the 'Current (mA)/Voltage (V)' and 'Load (N)' columns, at a certain point on of the cards starts reading 'NaN', followed soon after by the other card.  Note that this has happened on two different computers, one laptop and one desktop, both of which had hibernate/sleep disabled.
    For your reference, I have attached the VI.  This VI will not run as there are some subVIs that I have not included; these subVIs do not do anything critical to the execution of the program.  The program generally runs as follows:
    - Initially, a subVI runs that aids the user in selecting the appropriate COM port and USB devices.
    - The VISA device and DAQ cards are initialized, all relays are opened, variables are initialized
    - In parallel, there are two producer timed loops, one consumer for loop and an event loop
         - One producer loop continuously acquires voltage data from both DAQ cards.  When the loop is over, basic DC voltage values are taken from all samples in each buffer, and the values are enqueued
         - One producer loop acquires one reading per loop from the displacement sensor (via a VISA Write -> VISA read), and the response string is enqueued.  
         - The consumer loop runs at a similar timing as the producer loops (blocked using queues).  It manipulates, displays, and records acquired data. It also opens relay channels if the corresponding displacement values are greater than a set threshold.
         - The event loop opens text files for writing when a button is depressed, as well as performing basic tasks such as clearing graphs, etc. 
    What is the cause of this issue?  What am I doing wrong?  This error is preventing us from running tests at our company.  Any help is greatly appreciated.
    Thank you,
    Bryan
    Attachments:
    DAQ issue VI.vi ‏124 KB
    sample output.txt ‏1230 KB

    Wayne,
    Thanks for your reply.  Unfortunately, my knowledge is limited in this area.  We are using an ADU208 USB relay from Ontrak (information here: http://www.ontrak.net/ADU208.htm).  We are using the bundled subVIs to open/close each channel of the relay depending on the acquired data.  How could this relay board affect the DAQ communication?  
    It may also be important to note - I have tried to make this VI so that all devices need not be used all of the time.  That is, sometimes we choose to not use the relay, sometimes we choose to not measure load, and sometimes we choose not to measure current.  This means that we do not always have the same hardware connected, but the software runs the same and deals with the resulting errors appropriately (hopefully).  The previously attached output file is from a test where the relay was not connected, however the relay commands were still run (and presumably threw errors).
    Thanks again for your help
    Bryan

  • Communication with Mobile Device

    What software/API/hardware do I need to communicate with a mobile device?

    Hey, watertownjordan. i think you have a great idea. my SonyEricsson T68ie phone comes with bluetooth, i just want to communicate with my HP nc4000 laptop, which has bluetooth too.
    i really need an app like that to make management of my phone much easier, cordlessly.
    we can share info in time, [email protected] or MSN ID [email protected]
    Sun provide a reference implementation of serial communication API. it seems not so good and a little bit deprecated.
    and i only find one FREE bluetooth implementation at sourceforge.net website.

  • Communicating with a device

    I’m trying to communicate with a new instrument e.g to control such as moving to the left or right in a specified time given, get the reading out of it etc. I’m using serial communication, and the instrument does not have a driver. Does it mean that I need to create a driver? If that’s the case what kind of things that I need to know?

    You don't necessarily need to create a driver but it would make your program easier to maintain, among other things. You will need the programming manual from the manufacturer and NI has a lot of resources. I would recomend going here and look at the LabVIEW Driver section. Also, since the instrument uses serial communication, I would recomend starting with Hyperterminal to get an understanding of the instrument's commands before you jump into the LabVIEW program. You'll also have to decide whether to use the old traditional serail functions or VISA.

  • Communicating with a device using labwindows 7.0 and ethernet

    I am new to this type of communication, and I was just wondering how you would accomplish something like that.
    Derek

    Derek,
    Please see/post to the following thread:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000B0E80000&UCATEGORY_0=_318_&UCATEGORY_S=0
    Ames
    Applications Engineering
    National Instruments

  • Modbus communication with Modicon premium PLC

    Is it possible to communicate modicon premium plc(P574634M) and Lab view through modbus.
    If possible how?

    First, do a search for Modbus. There are several options available for communicating with Modbus devices from LV.
    Then, if you have a more specific question, you can post it to the LabVIEW board (you posted to the feedback board by accident).
    Try to take over the world!

Maybe you are looking for

  • First ever smartphone.  Dropped calls, bad internet connection is this a bad phone or?

    This is my first smartphone ever.  It is an Apple iPhone 4.  I bought it with the understanding that I have 90 days to return it.  I have had it about a week now and am barely able to talk to anyone due to failed calls.  One of the reasons I bought i

  • LInk for MDM

    Hello, Please provide Link for Main Page of MDM in SDN

  • Missing data on 4th gen

    Hello. I've got a problem with my iPod and I don't know what to do ... Each time I plug my iPod into my pc, it says missing X folder (don't remember the name ... Something in the ipod_control folder ... ) so each time i try to update it, my computer

  • Transfer postings from other application components to accounting

    Hi expert, we have to transfer posting from other application components(SD,MM) (system A) to accounting (system B, FI/CO module only). Is there any related documents of this aspect?  Best wishes, Evan

  • Database verification failed

    Hi I ran "db_verify" and the message shows "DB_VERIFY_BAD: Database verification failed" error. Does anyone know what causes the problem? How to solve the problem? Thanks, Agnes