Watlow PM with Modbus TCP

Hi community,
I have a watlow pm temperature controller connected to my computer with an ethernet cable. I need to communicate with the device via modbus tcp. I know for sure that the unit is functioning as if I use a modbustcp test program (see the first attachement), then I can read the temperature of the K type thermocouple which is connected to the unit. (the IP is 192.168.10.3, and I read two words from address 360). The temperature on the screenshot is 23.61992C
I would like to do this from LabVIEW by using an IO server. My problem starts at the beginning. I right click on my computer >> new >> I/O server >> Modbus
then in the popup window I select "Modbus ethernet" in the top right corner. I have attached this popup window. What is the Address in the communication settings section. The IP need to be entered at the bottom, so I have no clue what is the Address field is referring to.
Then I try to create bound variables... I see a huge list of registers, but honestly I dont understand how the address 360 I use in the standalone program translates to this list. Which one should I select from the list? Whatever I select gives me either 0 or FALSE if its a boolean. According to the documentation 360 is the relative address and the absolute is 400361. Actually there are a register list from 400001-465535, but if I select 400361-400362 I still read zero.
Reading only zeros and FALSE values... thats suspicious. Something is wrong.
Please help out with your thought! 
Attachments:
modbustcp_OK.png ‏132 KB
modbus_config.png ‏56 KB
modbus_reg_list.png ‏98 KB

OK, just a quick (and dirty) test. Can you try this VI.
Kees
Attachments:
MB TCP test.vi ‏20 KB

Similar Messages

  • How to comminucate with multiple PLCs with Modbus TCP/IP using dynamic multithreads?

    I have an application in which I communicate with several PLCs using MODBUS TCP/IP toolkit. There is an array of IP addresses that the user can configure. Using for loops allows to work with this however if one PLC is out, the program waits for the timeout before polling the next PLC. I would like to use a multithreading type in order that all PLCs are polled at once and is not dependent of each other. In other words, I would like to dynamically simulate several while loops happening at the same time. Is this possible?
    Thanks
    arikb

    arikb wrote:
    Thanks A_Patel,
    I thought of doing that but do I need to run this as a VI server in that case? How would I pass inputs and outputs of the subvi?
    Appreciate the help,
    arikb
    Take a look at my Nugget on dynamically creating occurences found here.
    Just ignore the Occurence stuff and the rest of the code and verbage should help you. The example code creates a bunch of background processes and passes a unique parameter to each.
    Have fun,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Using modbus/TCP with USB ethernet adapters

    I have a test stand where I have a handful of USB instruments and a single modbus/TCP slave.  I'm considering adding a USB ethernet adapter to the stand so that there is a single USB cable connecting the computer to the hardware rather than both a USB and an ethernet connection.  Does anybody out there have experience (good or bad) using USB ethernet adapters with modbus/TCP slaves?
    The existing USB instruments all use ASCII/SCPI-style command sets.  The Modbus/TCP slave is an Automation Direct EBC-100.  Nothing high-bandwidth or low-latency.  Basically, the computer issues no more than a handful or command or request (ether SCPI or Modbus/TCP) per minute.
    Mark Moss
    Electrical Validation Engineer
    GHSP

    Adam G wrote:
    Hello Mark,
    I was wondering what NI hardware you are going to be using in your application? Also are you going to be using LabVIEW for the programming? Have a great day!
    Best Regards,
    Adam G 
    The test software is written in LabVIEW, and the test stand uses M-Series cards for data acquisition.
    Mark Moss

  • Write values to PLC addresses via MODBUS/TCP

    I am trying to write values to some addresses on a PLC connected to my computer with MODBUS/TCP. I've mapped the addresses that I would like to write to on my project's MODBUS library as shared variables. However, I seem to neither be able to read from nor write to them these addresses. I've tried viewing the variables in LabVIEW's Distributed Systems Manager and the variables, when configured as read-only or read/write, report an unknown value, and when configured as write only, they do not display a value.
    I've verified that the PLC is connected properly, and I am able to read from other addresses on the PLC that I do not wish to write to. There also does not appear to be a communication error either. I have also successfully read from and written to the addresses using a third-party application, but for some reason, Labview will not do the same.
    Any suggestions on what might be wrong?
    Thanks!

    Hello Griffon,
    How did you set up your Modbus I/O Server? Did you follow the steps in this document?
    Connect LabVIEW to Any PLC With Modbus
    Make sure when setting up your server that you put in the IP address of your PLC (not localhost, or 127.0.0.1). 
    Also make sure that you're adding variables using the "create bound variables" dialog.
    If you did set everything up in that way, and it still not working, can you clarify what you mean with this sentence?
    "I've verified that the PLC is connected properly, and I am able to read from other addresses on the PLC that I do not wish to write to"
    Does this mean that you can read values out of the PLC using modbus, just not the values you want?
    Colden

  • MODBUS TCP Error 56

    Hello,
    I am having trouble with MODBUS TCP communication.  I am trying to read the input registers on a master.vi after a slave.vi has written to it.  Attached you will find my slave and master vi's.  I have made sure I had the correct IP address, same starting address for master and slave, and also the same port number.  The input register is array size 4 and I've also wired that in on the master for the quantity to read.  Could someone please give me some pointers?
    Greatly appreciated!
    Attachments:
    Master.vi ‏15 KB
    Slave.vi ‏13 KB

    I found my problem.  I was missing the TCP communication in the slave.vi.
    Thanks

  • Modbus TCP - Fatek PLC

    Hello everybody.
    I am kind of new in Labview a made some simple visa 232 connections, but now I have problem with modbus TCP. I would like to make communication between my PLC and labview, but the problem is i can newer find some simple working TCPmodbus example. I download library from the NI site but didnt work. I also read a lot topics regarding my problem, but I never see the solution.
    That You for our help.
    Best regrds
    Andrej

    Hi Andrej,
    What library are you using for TCP Modbus? Do you use the one from Sophir? http://sine.ni.com/nips/cds/view/p/lang/ro/nid/209754
    Or are you using the option with DSC module??
    You can find more information about how Modbus works on the following link http://www.ni.com/white-paper/7675/en
    Best regards,
    I.R.

  • Using Modbus TCP I/O Server with new DSC Shared Variables in LabVIEW 8.6

    Hello,
    I'm using LabVIEW 8.6 and want to communicate with a Beckhoff BK9000 Ethernet TCP/IP Bus Coupler via Modbus TCP. Instead of using the NI Modbus Library, I've tried the new LabVIEW 8.6 feature "DSC Shared Variables" as described at the bottom of this page: Latest NI LabVIEW DSC Module Features and Demos. Reading of analog input bus terminals works fine. However, I haven't figured out yet how to write on an anolog output bus terminal with these shared variables.
    It's about a 16 bit analog output and I need to write to the registers 0x1121 and 0x0801. It works with the NI Modbus Library (just using function code 6 and choosing the registers), but on the other hand I don't know which shared variables I have to choose for these registers. I've tried several data items (e.g. 400001 upwards as well as 402049 for 0x0801) but none of them worked. I would be glad for a short explanation - thanks in advance for your support!
    Regards
    utechle

    The Beckhoff documentation says, that holding registers start with 0x0800. I've checked this by using the NI Modbus Library. I used the "MB Ethernet Master Query.vi" togehter with the function code 6 for "Write Single Registers", changed the settings of the starting address to hexadecimal view and entered 801 (since it starts with a control byte in 0x0800 and the data out word follows in 0x0801). Furthermore, I had to address register 0x1121 in the same way for resetting the watchdog. As I've mentioned in my first post, this method works fine. However, I haven't found out yet which shared variables i have to use for accessing these registers.
    On the other hand, it's no problem to read data from analog input bus terminals using shared variables. They start with 0x0000 (status byte) and 0x0001 (data in word) and I can read data with the shared variable and data item 300001, respectively.
    Message Edited by utechle on 01-27-2009 11:12 PM

  • Modbus TCP with Beckhoff (Wago)

    Hi,
    I'm looking for examples/how to/lib/dll to build a communication to a Beckhoff BK9000(similar to Wago 750) which have a Ethernet - Modbus TCP Option.
    I'm able to write via LabVIEW-TCP-Functions but only once after powering on and the result/answer is more confusing.
    For the lookout OPC variant i heared there is still some additional software needed - true? or is it possible to set up the communication with lookout OPC without third party driver?
    Thanks for any help
    Hans

    Hi JAMR,
    There are plenty of examples that setup up the tcp server communications. If you open up the NI Example Finder and double click on the Networking Folder (under the Browse tab). You can then select the TCP & UDP folder and find several examples that use TCP. Also, there is a great knowledge-base article that provides information about network communication with TCP/IP messaging protocol. Essentially, what you are going to want to do is establish basic connectivity between the computer and the device and then assign the device an IP address. Before you do anything with the driver for the device, you might try to ping the device first. Once you can get this working, then you can set up the TCP/IP communication. I hope this helps!
    Carla
    National Instruments
    Applications Engineer

  • Modbus TCP comm error with fixed IP address

    I am trying to communicate to a slave modbus device over ethernet using the LabVIEW Modbus library.
    In the Modbus library, there is an example via "MB Ethernet Example Master.vi" that uses a fixed IP address to communicate to a slave device. When running the VI, I get error 56 indicating a timeout from the read input registers block.
    I have enabled VI Server TCP/IP communication via port 502, which is consistent with modbus protocol on the slave.
    Any thoughts?

    Hi,
    TCP/IP communication errors most often are caused by timeout conditions in either the LabVIEW TCP/IP VIs or at the operating system level. If you are sure that the network cable is properly connected to the slave device, a timeout condition of some type is likely the cause of the errors. The particular error code and symptoms associated with the error depend on whether a LabVIEW operation timed-out first or if an error is generated first by the operating system.
    There are two typical error codes in cases where TCP/IP communication fails as a result of a timeout condition: 
    -Error 56 is generated when an operation exceeds the user-specified time limit. This error is caused by the LabVIEW code not receiving a network response in the defined time limit. 
    -Error 66 occurs if the TCP/IP connection is closed by the peer. In this case, Windows notices that no data is returned within a reasonable time, and it closes the TCP/IP connection. When LabVIEW attempts to communicate after Windows closes the connection, error 66 is the result. 
    Try to increase the length of the timeout value wired to the timeout terminal of the event structure in the Ethernet Master VI. Also, make sure your command that you are trying to write is formatted according to the manual for the slave device you have. Sometimes if the data is formatted wrong the slave cannot recognize it.
    Regards,
    Message Edited by Ryan_F on 10-23-2009 11:00 AM
    National Instruments
    Applications Engineer

  • Need help with Modbus RTU over TCP communication

    Hello!
    I'm working with a project that involves communication between a LabView PC, a cRIO-9073 and a few Crouzet PLC's with XN05 modbus extentions. The issue I'm having is to get a stable and reliable connection between the units. The cRIO is communicating with the PLC's by Modbus RTU over TCP and I've created code that read and write to them in a sequential order to avoid possible ModBus conflicts. The LabView PC is sending a "ping" (boolean true) every second to the cRIO over UDP and the cRIO is then sending the "ping" to the PLC over Modbus/TCP. The PLC has a timer that waits for pings, if no ping has been recieved in 7 seconds the emergency brakes are applied and the system shuts down.
    The main problems right now is:
    * After a while I lose the connection between the LabView PC and the cRIO. "Connection with RealTime target cRIO-9073 has been lost".
     - I also get either error code 56 or 66 on the TCP link.
    * The second problem is that if I quickly pull a TP-cable from, let's say, a PLC and then directly plug it back in I want the TCP connection to quickly reestablish. However what happens is that the "pings" from the cRIO stops coming to the PLC for like 5-6 seconds (time to reestablish link?), which means the 7 second timer is almost full. One option would be to raise that timer value, but the drawback is that the system will take longer time to respond to an true error which could be bad.. My question is simply, does it really take 5-6 seconds to establish a TCP connection between a cRIO and a PLC? What affects the time? 
    I would greatly appreciate help or respons on this one. I attach a simplified version of the code I use (all variables and such has been replaced with constants). 
    Is this a good way to do a ModBus communication over TCP with 3 PLC's?  Is there a better, safer, more reliable way? All suggestions on improvment is appreciated
    Thanks!
    /J
    Attachments:
    MB_TCP.vi ‏29 KB
    MB_PLC.vi ‏28 KB

    Dear J,
    Check the state machine Architecture here.
    1. In your acquisition if you got error in any system you close all TCP connections that is not right your other systems are working fine.
    2. You go with parallel loop connection. For each PLC you run separate code with error handlers.
    3. Check the attached VI for TCP Read. Same VI you can modify and use for your ModBUS operations.
    4. In you Sub VI you are passing a constant cluster. I am not able to understand what is the use of case structure inside the subVI, In you code you are passing the constant so its always same.
    As you done previously made 3 loops or VIs to read the data in a main VI. First try to made one VI with one PLC, remove your all bugs and errors and copy it 3-time with different-different configurations.
    Thanks and Regards
    Himanshu Goyal | LabVIEW Engineer- Power System Automation
    Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
    It Only gets BETTER!!!
    Attachments:
    Tcp Host.vi ‏28 KB

  • Problem communicating via Modbus TCP with Honeywell UDC3200

    Hello:
    I have to read the temperature of the Input 1 of this controllers. I've succesfully read the temperatures in the controllers. I'm using Modbus TCP/IP for the communication through the NI Modbus Library 1.1. I'm working on LabVIEW 8.5.1. However, sometimes when I open the connection, I get error 56 (timeout), despite that the controller responds to a ping. When I can initiate all the connections to the controllers, some hours after the monitoring has started, randomly, I get an error 66 (the connection was closed by the peer). This error interrupts the connection and the temperature readings stop. This is not acceptable.
    Also, I've found out that if you don't request some data from the controllers in 5 seconds or more, also the error 66 appears. To solve this, I poll twice a second the controllers but the error 66 still shows up.
    The controllers and the PC are interconnected via an Ethernet switch. The switch works well.
    In brief, I can communicate with the controllers but the communication is not reliable. Sometimes when I start the communication I get an Error 56 and sometimes after the communication starts I get Error 66. It cannot be predicted when this will happen.
    Why does the error 66 appears?
    Has somebody communicated succesfully with this controllers?
    I'd really appreciate your help, I'm running out of time.
    Thanks in advance.
    Robst.
    Robst - CLD
    Using LabVIEW since version 7.0

    Hello:
    Thanks for answering Pedro. I've read the document you told me to, but it refers to problems with VI Server, the application is not using VI server, so I guess the problem comes from somewhere else. I still haven't figured out why this is happening.
    About the Error 56, well, I'll try to slow down the communication, I'm not doing any delays after sending the information. I wasn't aware that I needed to do this.
    Any other ideas?
    Thanks in advance.
    Robst.
    Robst - CLD
    Using LabVIEW since version 7.0

  • 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

  • Modbus TCP server/slave implementation

    Does anybody have experience to implement a modbus server or slave application? My computer needs to communicate with a PLC. The configuration is: computer is TCP server or slave, PLC is TCP client or master. Computer to write input registers for PLC to read. Computer read holding registers from PLC. Cannot find any labwindows examples.
    Thanks a lot.

    Thank you all for the replies. Most the links are for modbus tcp client (master) instead of modbus server (slave).
    Now I am trying to use a modbus slave activeX control (trial version) from Automated Solutions Inc: http://www.automatedsolutions.com/products/modbusslave.asp.
    I created an instrument driver using Create ActiveX Controller wizard. I can get a correct object (modbusHandle) with the first line below (status = 0). But the second function (set a property) gives negative status return (status = -2147418113).
    status = ASMBSLVLib_New_DASMBSLV (NULL, 1, LOCALE_NEUTRAL, 0, &modbusHandle);
    status = ASMBSLVLib__DASMBSLVSetDataMode (modbusHandle, NULL, ASMBSLVLibConst_DATA_MODE_MB_TCP);
    Did I create the activeX control correctly? Automated Solutions told me that the ActiveX control is a windowless control. It's a runtime control. Is it a problem?
    Thanks in advance.
    jzhu0000.

  • MODBUS/TCP very slow execution

    Dear all
    We are new user to Labview and to LabVIEW forum.
    We are designing a LabVIEW application that interacts with PLCs.
    We are trying to exchange information between a PC/labview and a PLC. Both support the MODBUS/TCP protocole. We have designed the 2 programs easily, the PC/LabVIEW one being easily made with VI Library.
    We first the PC/LabVIEW as a cleint and the PLC as server and it works perfect. It is quite fast as it takes less than 1 second.
    We test the reverse configuration ie PLC as client and PC/LabVIEW as server. Of course we use different programs there and monitor the MODBUS/TCP frames with WireShark.
    It works also but the execution on the PC/LabVIEW is very long (in the debug mode) : it takes 5 secondes to execute the Write Multiple Register function ( 2 data to write) to prepare the response frame and to send it back. It is very nice to see the animation on the diagram but why is it so long ? This long time frame is a very big problem for our application.
    We re not sure to know where to dig in !
    Thank you in advance for your help.
    Regards
    Thierry

    It sounds like you need to learn more about the LabVIEW development environment if you were confused about the slow speed of highlight execution.
    I would recommend looking at the online LabVIEW tutorials
    LabVIEW Introduction Course - Three Hours
    LabVIEW Introduction Course - Six Hours

  • MODBUS/TCP in CVI

    Dear All,
    I need help to write MODBUS/TCP coding to read data from a third party device.
    The deveice is getting connected with help of "ConnectToTCPServer" function. But i am not able to get the data from the module. Any idea how to send the qurey and get the data.
    regards,
    Kumar.E

    Hi Kumar,
    I have a few questions that will really clear up a few things for me. Are you actually using Modbus or are you using the TCP functions in CVI? What are you trying to do, basically what do you want to be able to do? The actuall functions that you need to call should be in your device manual. Do you have this information?
    We have a Modbus library for LabVIEW but we do not have one for CVI. Please reply with more information on what you are trying to do.
    Regards
    Krista S.
    Applications Engineering
    National Instruments

Maybe you are looking for

  • Copy closed or cancelled sales quotation to sales order

    2007A SP0 PL49 It is possible to copy a closed/cancelled sales quotation to a sales order. It is also possible to copy to sales order several times. What is the reason for this? Has this always been the way it works?

  • OK: simple question about video out

    My new mac mini should arrive today. I'm taking it one step at a time but planning down the road as I hope to hook it to my TV for Netflix streaming, Hulu, etc. I've ordered the S-Video adapter so I'll be good there. My question: I know that to drive

  • 10g Physical Standby to be used for Backup through RMAN

    Dear All, I have 10g Database Primary and Standby Server which is operating in Maximum Performance Mode. I want to use Standby Database for performing Weekly Full and Daily Incremental Backups through RMAN. Kindly inform me is it possible, if yes how

  • Change log for Distribution model and partner profile

    Hello All, Could any one please suggest how to get teh change log of the distribution model and partner profiles in SAP. Thank you! Arvind

  • Having a hard time creating a shopping list table in Numbers

    I'm trying to create a standard shopping list of about 100 standard items we like to always have available (this helps for budgeting purposes and also keeps last minute trips to the store to a minium, in case you are wondering).  I just started a tab