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

Similar Messages

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

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

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

  • Further adventures in modbus ethernet land

    Some progress in trying to understand why my ethernet modbus VI runs but the executable does not. After generating a simple VI that runs the slave demon.vi with an invoke node, waits for a stop command in a loop and then aborts the VI,  I could get this to run as an executable. Great I thought, now to add some ethernet modbus slave functionality to the while loop as per the ethernet modbus slave example vi. At this point I started having problems with the invoke node calling the slave demon.vi in the executable, as posted previously. 
    So some progress in that I can call and run the slave demon  using an executable, but no solution to the overall problem of incorporating the ethernet slave functionality.
    Attachments:
    SimpleVI #3.vi ‏33 KB
    Simple VI #3.JPG ‏86 KB
    SimpleVI #3.lvproj ‏13 KB

    Think I may have found a solution thanks to a post from a few years back.
    I converted my modbus llb into a windows folder and mass compiled. Then I created the project and added this folder. I then moved the slave demon vi and the slave example vi out of the modbus folder so that they appeared separately in the project files window. See jpg attachment.
    In the build environment I put the slave example.vi into the "start up VI" folder and the slave demon.vi  into the "always include" folder.
    One other thing - I kept the path to the slave demon as it was in the slave example. I didn't use a path constant this time (this might have been the problem)!
    The application.exe seems to work fine thus far. Fingers crossed. 
    Attachments:
    Working project.JPG ‏124 KB

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

  • 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

  • Modbus Ethernet U16 vs I16 Data type

    Hi,
       I'm re-writting a piece of code that communicates Modbus Ethernet to the downstream device.   I'm using the Labview Modbus Library VIs.
    The machine variables that I am trying to write are I16 (ie. I'm trying to write the value -22) but the Labview MBE library writes the values as U16.  
    The U16 value that it generates is 65514 (from a I16 input of -22) 
    anyone have an idea how I should fix this?   Would it be worth it to rewrite the Library files to output I16 instead of U16... I'm nervous this might cause other problems? 

    Either typecast it or use the To U16 bullet to convert the number.
    Or have you just tried wiring it up to see if it works?
    The VISA functions just send it out as bytes in a string.  So your device will just interpret the bytes how it sees fit.
    Attachments:
    Example_VI.png ‏5 KB

  • Modbus ethernet driver not sending complete packet

    Hello,
    I have a modbus ethernet driver sending out Floating point data (F0002-F0026) once per machine cycle for spc collection.  The problem is that the last float32 is getting cut in half and the data is not coming across.  To remedy this, I have set up an additional register (F0028).
    Attached is a screenshot of my advanced modbus settings and the ini file.  Would any of these settings contribute to the problem?
    Thanks,
    Steven
    Attachments:
    Modbus Ethernet.zip ‏119 KB

    Hi Pratik,
    Are you using bufmod module for buffering the data? If so, then you must be using SBIOCCHUNK ioctl to increase the streams watermarks? problem with this is that bufmod can only increase the watermarks to 64K, which may not always be sufficient for all the DLPI applications.
    There is a way to increase the system-wide streams watermarks using adb if you don't want to write a module to use M_SETOPTS. Please provide your email address if you need more information.
    Regards,
    Sun/DTS

  • 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

  • Modbus Ethernet Stopped Communicat​ing

    Running an application with 30 MODBUS Ethernet RTUs. App ran fine for days, then yesterday just stopped talking to the RTUs. Checked the obvious (network connectivity, went through reboot, made sure windows firewall is off, etc) but no luck. Can ping each RTU from the server, but Lookout 6.1 has comm failure. PC has two NIC cards (One on routable subnet, and second on RTU subnet). Looked at metric to be sure no problems there, but can't figure out the problem. Any help is appreciated

    Here is a Modbus master utility. Please use it to test the modbus connection.
    Run the ModScan32. Connection->Connect, select Remove TCP/IP Server. Choose the register type, such as holding register. Let's see if the Modscan is able to connect your modbus devices.
    Ryan Shi
    National Instruments
    Attachments:
    modscan32.zip ‏551 KB

Maybe you are looking for

  • Linked List inside a class

    I would like to define a LinkedList of feet in my table class. I would like the ability to create 1000 tables some with 20 legs all different shapes and colours ect. ect. This is just an example (i'm not really creating tables) :) but its what i coul

  • Urgent Help me out

    Hi friends, I exported a user from IBM RS6000 Aix 4.3.3 and imported in same machine on another database,there is no problem with import. But i tryed with same export file in HP unix IT IS GIVE ERROR FOR TWO BIG TABLE HAVING SIZE 278MB (record 737000

  • Connecting TopLink to MQseries via EIS and J2C adapter

    Hi all, has anybody connected successfully TopLink with (non-relational) datasource MQSeries? I have tree-tier-architecture with a custom server and RMI-clients. TopLink resides within this custom server (NOT J2EE App server) and connects to DB2 (mai

  • Tcp/ip communication problem

    hello, what i have is a tcp/ip communication problem.   the server needs to see the connection on the client side terminate before it can reply with data.  so i'm not sure the best way to solve this.  i tried to use a sequence structure to have the c

  • Help trouble with forwarded message

    Hello, I realized that many people have this issues as I had recently, but I still need some help about this. I found that original sender was actually receiving my forwarded message to other people.  I had an important correspondence to make with my