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

Similar Messages

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

  • Button hangup with modbus + and modbus ethernet protocol using lookout 6.0.2

    I have lookout 6.0.2 HMI software connected to a network of modicon 984 compact PLC's using modbus + protocol, Control techniques Uni-Drives using modbus ethernet protocol, and Direct logic plc's using their ECOM protocol. I have all of the control objects built in the client process and all of the drivers are in the server process. I use a static symbolic link to connect all of the objects to the drivers in the server. My problem is every once in a while, one of the buttons will hang up and hold true until the button is pressed again.  I also noticed this only happens with objects that have a modbus + or modbus ethernet protocol. I've never experienced this problem with objects connected to direct logic plc's. I saw a posting related to this a while back but saw no solution to the problem.  Can anyone help?
    Haj

    I have never met this problem before. I tried for a while but failed to reproduce. I think it relates to how the button works. Lookout pushbutton sends out true value when you press it, not like the button of windows which takes effect when released. Could you try the CWButton, instead of pushbutton. Maybe it makes a difference.
    Ryan Shi
    National Instruments

  • 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

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

  • 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

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

  • Process Failure when communicating over MODBUS using LabVIEW 2011 and DSC

    I'm currently trying to read from a PLC's holding registers using MODBUS/TCP. I've confirmed that the PLC is updating the values and responding to MODBUS communication correctly using a third party program called Modbus Poll. However, when I try to poll the PLC using LabVIEW's shared variable engine, I am unable to read any values from the same addresses that I'm viewing with Modbus Poll.
    My setup simply consists of a PC connected directly to the PLC over Ethernet, with no router in between. I am using LabVIEW 2011 SP1 with the DSC module.
    I opened the NI Distributed Systems Manager to view the status of all shared variables in the Modbus library that I created and I've noticed that the CommFail bit is permanently set to "true". All other variables with a "read" access mode report "Process Failure". I've tried restarting the process as well as stopping and starting the local variable engine with no success. I've also restarted my computer several times to see if any services were failing, but this does not seem to have fixed the problem.
    I finally resorted to monitoring communications over the network card that I have the PLC plugged into via Ethernet using Wireshark and I've found that while Modbus Poll is communicating with the PLC, many MODBUS and TCP packets are sent and received. However, when solely using LabVIEW or the NI DSM to communicate with the PLC, there does not appear to be any communication over the network card.
    Something that may be worth noting is that I was able to communicate with the PLC and read values from it with the DSM on just one occasion, when I first figured out which addresses I should be reading from. It all stopped working shortly thereafter. Prior to this, "CommFail" was not usually set to "true" with my current configuration. Thinking that it was my firewall, I have since turned my firewall off, but this seems to have had no effect on the problem either.
    Any help on this matter would be appreciated.
    Solved!
    Go to Solution.

    Just a thought but I think the  register addresses used by LabVIEW are one off of the actual register #.  I was using a CRIO as a modbus IO Server and had to shift the register addresses by 1 to get things to work correctly (can;t recall if it was +1 or -1).  This is documented somewhere on ni.com but can;t seem to find it now.  But here is another  link that may help:
    http://zone.ni.com/reference/en-XX/help/371618E-01/lvmve/dsc_modbus_using/
    Dan

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

  • Why can't i install iTunes 11.0.1.12 on windows 7 64 bit ?

    how can i install itunes on windows 7 64 bit ?

  • Using Javascript in a report region

    I have a text box that I need to populate with an amount for billing. There is also a field that shows the amount due. If the amount due is equal to the amount being paid, I want my user to click on the amount due, and it automatically populates the

  • Isight video quality?

    can you improve this/and or the settings of isight so it looks better? I've had a little play around with isight but whenever I bring it up through imovie it just looks really bad, the light doesn't get picked up well at all and it just looks like I'

  • Purchase message "...we cannot complete your request.....

    ....on iTunes at this time. Please try again later". I was able to download just a few hours ago and still have xxx$$ in account. what's the deal? Apple is no small bananas - it should be able to handle large volume/traffic. Cheesy. Dell D610   Windo

  • Safari Safebrowing error

    Anyone know how often this gets updated? I've noticed it warning me more often it's not getting updating. A safe boot and restart clears that message, but it only comes back eventually. Where is that file so I can delete and force a rebuild. Toggling