Modbus Ethernet Example Slave

Hi all,
I test the examples of the Modbus library found here: http://sine.ni.com/devzone/cda/epd/p/id/4756.
It works fine.
I look at the diagrams to understand operation. I have two questions about the MB Ethernet Example Slave.vi
1-I do not understand how and where the slave stores data in arrays (Holding Registers and Coils).
2-I want to display the Modbus frame on the front panel but I do not see where are these data.
Thank you in advance.

For your example, your exe has to reside in the same folder as the project as well. 
Kudos and Accepted as Solution are welcome!

Similar Messages

  • Modbus ethernet example

    hallo guys,
    Í am using Labview Application Builder to creat a exe program based on MB Ethernet Example Slave.vi, but it can not communicate with MB Ethernet Example Master.vi correctly, before building, the original Slave and Master example programs can communicate well, but after turnning MB Ethernet Example Slave.vi into exe program, these two do not work in the desired way, is there anyone confronted this problem before?  Maybe some configeration need to be set during building.
    great thanks.
    Solved!
    Go to Solution.

    coolbear,
    there are some dynamically called VIs inside of NI Modbus toolkit.
    Simply include entire toolkit into your application, and  all will be screwed up:
    Test project in attacment (assumed that you have installed toolkit from here)
    Andrey.
    Message Edited by Andrey Dmitriev on 02-09-2009 12:37 PM
    Attachments:
    modbus_app.png ‏168 KB
    modbus_app.zip ‏2 KB

  • Modbus Ethernet Slave seems to fail when the Master query information simultaneously for more than 16 Coils or Discrete Inputs.

    I'm developing an control application by using the Modbus TCP/IP for communicating with the host computer.
    I'm using the Modbus Library for LabVIEW
     (http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=F1582737BACF5CA8E0340003BA7CCD71&p_node=DZ52363&p_source=External).
    The LabVIEW MB Ethernet Slave seems to fail when the MB Ethernet Master
    query information simultaneously for more than 16 Coils or Discrete
    Inputs.
    The Modbus Application Protocol Specification (http://www.Modbus-IDA.org) state that:
    1- The function code 0x01 'Read Coilsis' is designed to read from 1 to 2000 contiguous status of coils in a remote device.
    2- The function code 0x02 'Read Discrete Inputs' is designed to read
    from 1 to 2000 contiguous status of discrete inputs in a remote device.
    To test the behaviour of the LabVIEW MB Ethernet Slave I have modified
    the 'MB Ethernet Example Slave.vi' by adding more Coils and Discrete
    Inputs. I have added up ONLY to 20 Coils and 20 Discrete Inputs.
    By using the 'MB Ethernet Example Master.vi' the answer to the MB query
    is correct for the first 16 Coils or Discrete Inputs. Starting from the
    17th Coil or Discrete Input the MB Ethernet Slave doesn't give any
    answer.
    By shifting the start point address the answer remain correct for the first 16 Coils or Discrete Inputs.
    I have tested the slave by using also a third part MB Ethernet Master and the behaviour is the same.
    1) There is a reason for this behaviour?
    2) There is a Modbus Library for LabVIEW that satisfy the  'Modbus
    Application Protocol Specification' managing from 1 to 2000 contiguous
    status of Coils or Discrete Inputs?
    Thanks,
    Asper

    I have the same problem with the MB Ethernet.
    I need 40 Outputs.
    The first 16 work perfectly. The next 8 coils do not work, The next 8 work, The next 16 do not work,The next 8 work,The next 24 do not work And work for the last 8. Conclusion, to activate the 40 outputs, I needed 88 coils.
     Because 48 coil, do nothing Can someone help me and i cant implemet the jim solution

  • Set Digital Output for Modicon 340 through Modbus Ethernet

    Hello,
    I used modbus Ethernet example vi and am able to read input coil status of quantity 512
    If starting address is changed above 511, VI returns 6002 error.
    As per below concept, how can I write  to output coil
    Output Coils are assigned the block 1-9999
    Input Coils are assigned the block 10001-19999
    Input Coils are assigned the block 10001-19999
    Input Register are assigned the block 30001-39999
    Output Register are assigned the block 40001-49999
    I also tried sending command directly to TCP IP write like 05 00 AC FF 00 to set a coil. Still its not working.
    Can anyone inform how to proceed. Any example or command structure is highly helpful
    Thank you

    I don't see a "jacks" button on my console, therefore I can't reconfigure the jack to digital.
    Is this not available on the Go! unit?

  • Modbus Ethernet Slave coils and discrete inputs

    Hi,
    I'm having serious problems in the comunication of more than 16 bits for coils or discrete inputs.
    In this forum i've read some few post about this matter, tried the possible solution but got nothing working.
    Guess that there is some kind of limitation or error in the ModBus modules available at the NI Labview webpages.
    The idea is very simple:
    I want to be able to sent 32 bits of coils from the ModBus Ethernet Master to the slave and sent 64 bits of discret inputs from the ModBus Ethernet Slave to the Master.
    Can someone please give me a push? Im' kind of newbie with the Labview and would apreciate if someone that had this problem resolved could guit me a hint.
    My best regards, Jorge
    Solved!
    Go to Solution.

    Hi Jorgelopes,
    thank's for posting  on National Instruments forum.
    Can you tell me if you want to communicate with an automate or a computer.
    If you do not tried between two computer I suggestion to make the test.
    Can you send the VI with which you encounter this trouble?
    Best regards,
    Flo
    Open Diagram First

  • I need help with Modbus Ethernet communicat​ion

    I try to communicate with a Modbus RTU controller with a MOXA Ethernet to RS232 converter. I use DSC module to create a modbus Ethernet driver, and create a list of shared
    variables that are bound to individual addresses in the modbus register.
    I have tried for a long time to make this communication stable, but I lose communication after a couple of hours..
    I read hex values from the controller registers, and they normally is from 100 to 140 depends.. But after a while some of my
    registers drop to zero, and others up to 65408 for instance..  and some digital values hang..
    When I restart my vi, it works again for some hours..
    Maybe it is a communication problem true Ethernet, because I have tested shared variables in other ways, and it works fine..
    I want to know if there is any specific rules how to put up a good way to communicate with my modbus driver true Ethernet.. I have enclosed one of the examples that I tried, and I have also tried to read values directly into while loops, but I lose communication after a while
    Anybody…  please I need help. I would be happy to see a good and stabile way to put up a communication example.. 
    I also tried some of the modbus examples, but I didn't manage it to work.. I use one master controller and one slave, and I use ID 32 for
    the master and ID 01 for the slave..
    Thanks..
    Very best regards from..
    Benji..
    Attachments:
    test37.vi ‏83 KB

    Hi.. and thank's for your answer..
    Yes, I have downloaded and tried the modbus lib before, and it works, but I have to rebuild it to make it work good for my system..
    Maybe that is the way to go..  But I also thought that when I have DSC installed, it would be easier to use that one..
    In the mean time I've did some test's and, I see that the problem maybe is in my modbus gateway..
    Anyhow.. thank's for your answer...
    Regards from Benji..

  • Modbus Ethernet read and write to a Eurotherm 6180XIO Modbus server using LV8.2 shared variables

    I am having EXTREME difficulty trying to establish communications with a Modbus device using LV8.2 shared variables.  The device is a Eurotherm 6180XIO Datalogger configured as a Modbus master.  The PC and a cFP-1804 are slaves.  All IP addresses are set correctly.  This approach using shared variables would seem simple, but I can't find any examples or proper guidance on how to get it working.  I am trying to avoid having to mess around with TCP/IP, OPC, or any other old-fashioned method.
    I have read many threads on related topics but none directly apply to this situation.  I have created a library containing a Modbus I/O server and shared variables bound to read and write holding registers.  I have followed all recommended tips for creating such variables but I can neither read or write data.  All data types are U16 due to Modbus protocol limitations.  I have also applied the LV x10 factor in the most significant digit in the register offset (6 digits instead of 5).
    I have a cFP-1804 on the same network which reads into the datalogger OK.  The registers I use are 31000 (for CH0 on module 0, 31002 for CH1, etc) and the data can be read as FLOAT32.  I have updated the firmwate on the 1804 to the latest level.  I cannot even get shared variables to read SGL values.  Using registers 301001 for CH0 and 301002 for CH1 I can only read U16 values, and not a 2-word SGL.
    Third party Modbus simulation software is able to write to and read from registers very easily, but not LabVIEW.
    Some questions are:
    - do I use a Modbus master or slave as an I/O server in the library as a target for binding the shared variables?
    - is there some other wierd translation in register offsets between LabVIEW and traditional Modbus?
    - is this actually possible using shared variables or am I wasting my time?

    Sending the whole 60-character string using a string or array would be the most efficient.  I have tried both methods, and these only cause the datalogger to flag a message log but no text is displayed.
    For a string variable, I have used the following binding "My Computer\Modbus Test.lvlib\ModbusServer6180\442305", where ModbusServer6180 is a Modbus I/O server configured with the logger IP address, and 42304 is the register offset at the start of the text block in the logger.  I need to write to 30 consecutive registers starting with this one.  I am not using buffering and have not enabled single writer.
    Can anyone confirm whether this method should work in 8.2?
    Does the string need a special termination character?

  • How to implement Modbus Ethernet communicat​ion in Lookout, if we want to simulate the PC as PLC ?

    Problem Description :
    Dear Sir,
    We are doing a project where we are using Lookout with
    Front end Modicon PLC. The communication is by
    Ethernet, using Modbus.
    Since the installation is at a distant place, we wanted
    to use another PC (running Lookout) to simulate the
    PLC. For this, we tried to communicate
    a: the server Lookout PC running Modbus Ethernet mode of
    Modbus object as Master
    b: with another PC (for simulating the PLC) running
    Modbus Slave
    We did not get any communication. (we have given the
    details of what we have done, at the end of this email)
    We also tried connecting the above 2 PC's as
    a: the server Lookout PC running Modbus Serial mode of
    Modbus object as Master
    b: with another PC (for simulating the PLC) running
    Modbus Slave object
    Again we did not get any communication.
    If instead of PC (b) we connect the Modbus simulator to
    PC (a), there is no problem in communicating
    Please let us know how to go about establishing the
    communication between 2 PC's using Modbus serial,
    and Modbus Ethernet. A detailed step by step procedure
    would help us a lot.
    Thanking you
    Warm Regards
    Raja Mahbubani
    Procedure of our trial with ethernet.
    This is what we have done in detail.
    On PC A:
    We created an object (Pot) and connected it to
    the modbus data member of the modbus object say 40001. In the
    properties of the modbus object we selected modbus ethernet mode
    of communication and in the IP address field we wrote the IP
    address of the machine B to which we are trying to communicate
    i.e. 152.63.50.2.
    On PC B: we tried the following two methods
    Trial 1 : We created a modbus slave object and
    inserted an expression for the same data memeber to which the
    object was connected hoping to get the value of the pot of machine
    A on machine B.
    Trial 2 : We created a modbus object on machine B and we wrote
    the IP address of machine A and inserted an expression for the
    same datamemeber to which the object was connected hoping to get
    the value of the pot of machine A on machine B.
    NI Software : Lookout
    Version : 4.0.1 or 4.5
    OS : Windows 98
    NI Hardware : N/A
    Drivers : N/A
    Other Hardware/Instruments : N/A
    CPU : Pentium
    RAM : 64
    Vendor : S-Tech
    Customer Information :
    Raja Mahbubani
    Theta Controls
    IN
    [email protected]
    Ph: (+91) 20 4222556/7

    The ModbusSlave which comes with Lookout currently supports only Serial communication. So, you cannot use Ethernet between your two PCs. At least not with Modbus Master-Slave setup (if you must speak Ethernet between the two PCs, IPASCII object lets you do that, but then you'll need to implement your own protocol).
    Since all you want to do is simulate a Modbus PLC on a PC, you can use the Serial mode of communication for now. And later on just modify the Object in your Server Lookout to use the Ethernet mode.
    For setting up a Serial Modbus Slave, use a null-modem cable between the two PCs (lines 2 and 3 are swapped). On your PC 'B,' create the Modbus Slave object with the right COM port for that PC. And on your PC 'A' create the regular Modbus Object as if you w
    ere connecting to the Modbus Simulator box. The only difference here is the cable. The simulator box uses a straight-through cable whereas the Slave needs a null-modem cable.
    Hope this helps.
    Rgds,
    Khalid

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

  • Multiple errors with DSC modules modbus master and slave

    Hi,
    I've searched quite a lot of posts but haven't found solution for my problem. I'm playing with LabVIEW DSC module and it's modbus master and slave functionalities. Even the LabVIEWs own modbus examples (Modbus Simulator and Fundamentals) seem to work randomly or not at all: When checking the Variable Manager utility Modbus Simulator (i.e. modbus slave/server) seems to deploy variables correctly with good quality but Modbus Fundamentals (i.e. modbus master/client) most often shows unknown value or bad quality for all the variables. When running the VIs I get 'Error -1950679035 Unable to locate variable in the Shared Variable Engine' and sometimes some other errors too. If the Modbus Simulator (slave/server) is expected to work fine I guess I should get two slaves communicating, but this isn't happening either. So maybe Modbus Simulator example isn't working either.
    I've tried undeploying and deploying the libraries, stopping and starting the SVE, booting PC, reinstalling DSC module, and setting firewall and antivirus software off. This problem is going on with two different computers, both of which have recently installed LabVIEW 2011, first PC with Win XP and second PC with Win 7. No other OPC servers should be installed to these computers. And what is really interesting, the problem seems to have nothing to do with my network since Simulator and Fundamentals examples are not working even if the network cable is unplugged!
    Any suggestions? Replies are highly appreciated!

    V8 has the same feature, but the words are different.
    The Generator typically uses the Driver time base, and the Gl. Var Write is writing once per block.
    So, to see all values, you must have a block size of one.
    I set up the Driver timebase to 10 Hz, block size of 1. The Generator and the Read Variable default to the Driver timebase.
    The Generator is making a 2 Hz Rectangle waveform. YOu can see that it's shifted, but otherwise intact.
    - cj
    Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.

  • Lookout Modbus Ethernet driver for Do-More PLC?

    I see AutomationDirect has now come out with a Do-More PLC CPU that uses DirectLogic 205 hardware. Their documentation states that the new CPU Ethernet port communicates with protocols that include:
    Modbus/TCP Client (Master) and
    Modbus/TCP Server (Slave)
    Would the Lookout Modbus Ethernet driver communicate with this?
    Solved!
    Go to Solution.

    Yes, Modbus driver supports ethernet
    We us the ECOM-100 and MB-Gateway
    Forshock - Consult.Develop.Solve.

  • Send ASCII String as Command to Modbus Ethernet Device

    Hello Precious Developers,
    How do we send the following string command from a PC to a Modbus Ethernet device at starting address 411000 using LVDSC:
    "<ID 0><CLR><WIN 0 0 287 31><POS 0 0><LJ><BL N><CS 2><RED><T>H</T>""$0D""$0A"
    (Function code 16 - Write multiple Holding registers)
    Any pointers / suggestions / example code shall be deeply appreciated.
    Solved!
    Go to Solution.

    hi,
    I implemented your solution but when there is an odd number of character, the last character is not included in the  u16 array. Is my implemented correct?
    Regards,
    Cedric
    Attachments:
    string_transfert_MODBUS.vi ‏7 KB

  • How can i write the floats value in Unitronics vision230 plc using modbus Ethernet

           How can i write the Float value in unitronics Vision230 PLC usinsg modbus ethernet (MB Ethernet Master Query.vi) I  read and write  the 32 bit register,  for e.g i want to write the 23.45 value on 2nd add. of MF. And MF register is 32 bit register. I  read and write  the 32 bit register.
    Narendra.
    Solved!
    Go to Solution.

     Thanks Amit for your solution but i can not use the string to write the value because  MB Ethernet master Query.vi only accepet the integer value its not take string values or any other i.e floats values etc.....otherwise i have  no problem to write or read the 32 bit register values , only problem is that the MB Ethernet master Query.vi only accept the integer value there4 how can write the float value.
    Narendra
    Message Edited by Artemistech on 01-30-2009 11:06 PM

  • Modbus Ethernet

    i am working on read data word from Delta Make PLC in labview 2014 using modbus ethernet communication.
    is there any help regarding third party ethernet communication with labview.??

    Are you using one of NI's modbus library ?
    New
    Old
    See also here for a discussion about modbus libraries.

  • Modbus ethernet communications problem

    We are having a lot of trouble with modbus ethernet communications. We are using Lookout 6.0.2. Communications is via a Lantronix UDP100 convertor to RS485. The protocol is MODBUS RTU. A number 6-8) instruments are daisy chained on the RS485 (2-wire) line and then connected to the Lantronix. I am using your Ethernet modbus driver.
    If all the modbus instruments are connected then the system works fairly well. However if one gets powered off or disconnected we start getting random comm fails from all the other instruments on that RS485 link. This happens even if I stop polling the dead instrument. It only goes away and the network performs perfectly if I close the modbus driver for the dead instrument.
    This behavior does not happen if we use RS485 to Lookout instead of the Lantronix+ethernet.
    Need some ideas soon.
    - VS

    Does the convertor you said support Modbus? Because Modbus serial protocol is different from Modbus TCP protocol, if the convertor doesn't support Modbus, I think it won't work.
    On the market, you can find Modbus/TCP to Modbus RTU gateway. But I'm not sure if your convertor has the same feature.
    Ryan Shi
    National Instruments

Maybe you are looking for

  • Pictures not displaying in non-thumbnail sizes

    One of my clients has an iMac G5 running 10.4.11 and iPhoto 5.0.4. He's got about 3200 pictures in his iPhoto library which is about 12GB in size (they are all very large pictures). He's been using iPhoto without problem for years then suddenly he no

  • Enhancement - Accounting Document from Billing Document - change line items

    Hi Experts,        Our client has a requirement to display all line items(as shown in Billing document) along with the tax line in the Accounting document. I can explain it as below:       In VF01 transaction code: enter the delivery number.       Pr

  • Cannot find Symbol :class CLOB

    Hi, I am using JDK1.5.0_06 and Oracle8.1.7. When i compile java program I am getting the following error cannot find symbol symbol : class CLOB I have added classes12.zip into classpath. Can anybody tell me why this errpr comes? Is there any other fi

  • Report Writer Reports

    Hello Experts, Our Business Analysts want to include some of the 'Report Writer Reports' into the 'Reporting Tree' of SAP Standard Menu. For eg into the following path: Accounting->Controlling->Product Cost Controlling->Cost Object Controlling->Produ

  • Safari 5.0.3, open link in new tab problem

    I have a Mac 10.6.5. When I open safari it works fine, then if I right click on a link I see the options open in a new tab, or window (and many other options), when I click open link in a new tab it works, then in the new tab I have a problem: If I r