Howto choose modbus tcp functions with dsc 8.0.1 / DSC register numbering explanation

Hello,
after reading in the discussion forums I still cannot solve my DSC Modbus problems.
First I'm confused about register numbering.
Playing around with the registers, which the multiple variable shows, give me the finally success polling values:
Registers in device documentation: 0x0000 - 0x0007 Finally I found them on 300001-300008 
Question: Why is the leading 3 needed....?
Sniffing with Ethereal shows me "function 4" is used for reading by Labview.
Question : Howto use Modbus function 3 or (for writing) 5, 6, 15, 16, (read and write) 23?
My biggest problem at the moment:
I want to read register 0x1010 = 4112d it contain a length of process data byte in packed format. Reading ends in exception 0x8BBB0005
Thanks in advance for an answer or just a link with similar problems

You have different types of registers inside a controller. 3xxxxx are input registers and 4xxxxx are holding/output registers. Check out the attached pdf file.Message Edited by unclebump on 07-26-2006 02:04 PM
Attachments:
PI_MBUS_300.pdf ‏173 KB

Similar Messages

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • Modbus TCP/IP Help

    Hello Labviewers,
    So I just hooked up a couple of Honeywell UDA2182 controllers to my computer using an ethernet connection.  I've established communications using modbus (specifically the Datalogging and Supervisory Control module's Modbus I/O server option) and I can tell that readings are coming through to the computer.  
    My problem is that it's all in some weird alien langauge.  I can't tell which parameters I'm viewing data for, and the data that my computer is recieving are crazy huge numbers that don't relate to anything.  My guess is that I'm supposed to somehow convert these numbers but I'm not sure how to go about it.
    Thanks for any and all help/advice,
    Mike
    Solved!
    Go to Solution.

    Hi Everyone!
    Thanks so much for the help thus far.  When I first hooked up the PLC I was indeed hoping for and expecting simple, easy to understand human readable numbers like 7.07 or 13.72.  After reading through everyone's replies this morning, I have spent the better part of the day reading up on Modbus and going back through the manual that came with the PLC.  Things are starting to make sense a little more but I still need any help you might offer.
    I've figured out that I want to read registers (decimal addresses) 30001, 30003, 30005, and 30007.  I should be able to communicate with these registers via Modbus function code 04, although, it is unclear as to whether I need to specify this function code seeing as how I'm using a Modbus I/O server in continuous operation (rather than sending one request and receiving one response at a time).  These 4 registers are all classifies as type = float and I see in my manual that is says "floating point values require two consecutive registers".  I am now assuming that to accurately read the data associated with register 30001, I will need to read and convert data from 30001 and 30002.
    Further, it appears to me that Labview wishes to represent these register addresses with an extra 0, making 30001 -> 300001?  Earlier this morning, using the DSC module's Modbus I/O server I was able to monitor register 300001 in the Distributed System Manager.  The values reported to me were as follows (can choose any representation): 16,609(decimal); 1.6609000e+04(scientific); 40E1(hex); 40340(octal); and 100000011100001(binary).  I was expecting a value of 7.07 (pH units) but as this is only the single register 300001 perhaps these values are only half of the human readable answer.  
    According to my controller's manual the default setting for communications is Word Swap = yes, or Big Endian, byte order 4,3,2,1.  However, this can be changed on the controller should I need to set this parameter to Little Endian.  There is also a section in the manual regarding IEEE 32-bit floating point stuff where a formula is given for calculating the floating point number from a 23 bit signed binary with 8 bit biased binary exponent.  I will admit that this formula makes no sense but I'm willing to give it a shot if needs be.  The crazy terminology here (mantissa, Endian, etc.) has really been difficult to assimilate.  
    My goal now is to try and read registers 300001 and 300002 and somehow combine the two values to produce a final human readable number?  Does it seem like I'm on the right track?  Does anyone have any advice as to how to combine these two register values?  Thanks again.  I'll report back soon.
    -Mike

  • 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 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

  • Modbus/TCP Queries

    Hi,
    I am trying to use Modbus TCP to set the time / date on my cFP-2120
    running Labview Real-Time 5.0.1. For this purpose I have set up four holding
    registers that hold two single precision floats, one for the time (format:
    hhmmss) and one for the date (mmddyy). The idea is that each time the Modbus Master writes to the holding
    registers, the time / date of the cFP2120 gets set.
    In my application, I have implemented Modbus communication
    similar to the MB Ethernet Example Slave.vi, which came with the NI Modbus library
    for Labview 8.2. This is also similar to the Modbus tutorial here. Essentially,
    I am reading the appropriate Modbus holding registers using the MB Register
    Manager.vi (also part of the Modbus library) and use their values to set the
    controller.
    The problem arising is that I set the controller time even
    if the Master has not written to the holding registers, which results in
    wrong times/dates. Is there a way to determine whether these holding registers
    have been written to by the Master, so that I can react on it as soon as this happens?
    Thanks,
    Volker

    Devin,
    thanks for the response.
    Your suggestion are a possibility, especially the first one.
    However, as these registers are holding registers (read/write), I was hoping to also post to them the current time by the slave to be read by the master.
    In case the time needs to be synched, the master posts the correct time to the same registers upon which the slave will update its time and again start posting its current time to these registers.
    I realize that the easiest way to accomplish this would be to just use different registers for posting the time by the slave and have the holding registers reserved to be written to by the Master. In a previous implementation in C ( ... please forgive me) I used to listen to the traffic and parsed each message coming in in order to determine whether (a) my device was queried and (b) which function code was used for which registers. Based upon the info I decided whether to just send back the current time of the slave to teh master or take the incoming time value and set the time of the slave.
    How would I implement something like this in Labview? Or am I better off just having different registers for reading from and writing to the slave?
    Volker  

  • Modbus TCP/IP configuration steps

    Hi everybody.
    I have an application where I have to connect a robot with a NI CVS1455. Both, robot controller and NI CVS support Modbus TCP/IP communication protocol, so, I want to configure robot like “Modbus master” node and compact vision system like “Modbus slave” node.
    I have downloaded the NI Modbus library (I’m using LabView 8.2) and I’m trying to understand how Modbus communication works with NI products using my computer (instead the robot controller) and CVS. To do that:
    - First, I have configured in “VI Server:configuration” the right TCP/IP address and, then, the port as 502
    - I have enabled the access for both, computer and CVS, in “VI Server:access list”
    - I have deployed the Modbus slave program (VI) in CVS
    At the moment when I start the Modbus master program (VI) in my computer I receive first “error 66” and then “error 62” .
    I have already tryied to use “TCP Communicator Active and Passive Vis” and the communication is ok.
    I think, I’m making some mistake in Modbus configuration. I didn’t find NI Manuals that explain step by step how to configure the different panels for Modbus TCP/IP communication, moreover, the Modbus functions don’t have the context help.
    So, my questions are: 
    a) Can someone, experienced in Modbus, give some advice about my problem?
    b) There is a manual or an “application note” about the “configuration steps”?
    c) Can I use “shared variables” in a “NI Modbus slave” device even if the “Modbus master” isn’t a NI device?
    Thank you in advance.
    Michele
    AUROS-Ing.Michele Rossi
    Software e Tecnologie per Automazione

    Modbus is used to read and write registers in slave devices. The master in your simulation should be the device reading and writing the registers, so if the CVS is supposed to read data from the robot, you need to reverse what you're doing.
    In general, Modbus has nothing to do with the VI server. You can change the VI server settings back to their original values (port 3363).
    The NI Modbus library has two example VIs - one for the slave device and one for the master. If you want to simulate this, you need to run those examples in their respective locations and give the master example the IP address of the slave.
    Of course, in any case you need to know which registers you're going to read and write, but those are device specific.
    Try to take over the world!

  • Access to Cisco Switch Modbus Register Map? via Modbus TCP or Modbus RTU

    Hello Folks, I have been trying to find out how to access the Modbus Register Map(s) of Cisco switches, of particular interest is that of an IE 3000 as it is din rail mountable (but for models 2960s, 3560s are also of interest).  A google search for: Cisco Switch Modbus TCP results in (if I may) how to configure a Cisco 2520 to do what I am trying to do.  I would be very grateful for any hints anybody might have.  Thanks

    Though I am not familiar with the specific drives in question, I have used Modbus/TCP in LabVIEW a few times recently.
    As the previous posters pointed out, there are a couple of VI libraries available.  LabVIEW 2014 added Modbus VI's with the DSC and LabVIEW Real-Time.  The others you would have to get and add in yourself.
    Another option is to use LabVIEW I/O Servers; as long as you have DSC or Real-Time, you can create Modbus I/O Servers as library items and deploy to a target.  You don't get as much direct control in this way (and may run into difficulties if you need them to be field-configurable and do not have DSC) and use bound network shared variables, but they are very fast and easy to setup and I have yet to have any issues with using them in my applications.
    A tutorial on setting up a Modbus I/O Server: http://www.ni.com/tutorial/13911/en/
    A tidbit on deciding between Modbus VI's and a Modbus I/O Server: http://zone.ni.com/reference/en-XX/help/370622M-01/lvmve/choose_modbus_ioserver_vi/
    As for using an Ethernet switch to connect multiple devices, I have used this approach many times to simultaneously connect and control numerous PC's, real-time controllers, and drives without issue.  I would not expect there to be any problems unless you have extenuating circumstances.  In fact, if you only have one network interface on your device at the moment, I would recommend against adding a second, as this would mean that you / your controller would have to be extra aware of which interface everything is assigned to go through.

  • 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.

Maybe you are looking for

  • IPod 5th gen games transfer to iphone

    Is there a way I can transfer my 5th generation ipod games to my new iPhone 3G?

  • [Solved][Boost] Condition_variable exception on thread termination

    Hi folks, I'm trying to implement an object that accepts some data and processes it in a separate thread (basically producer-consumer model). The object's thread should run until object destructor is called. To notify of new data I use condition_vari

  • Regarding STO billing

    Hi, this is emmanuel working as sd consultant for It services,  here is STO we create purchase order with dcument type NB and with reference purchase order number we do delivery and with reerence with delivery  number  we do billing. but we don't use

  • Installing CS4 Suite Web Premium - Damaged Media??

    Hello, I've been fighting with my Creative Suite 4 Web Premium Installation and realized that it was because of a corrupt disc. How do I get a replacement disc so I can reinstall?  My software is registered and legal but I can not find anywhere to do

  • How to know the present working directory

    Hi ... I would like to know how we can print the present working directory path in our program. Any ideas? TIA, Krish