NI modbus cRIO slave example

Bonjours,
Voila mon problème, je cherche à intégrer une communication MODBUS à ma sbRIO. Maintenant, j'ai déja intégrer une interface RS232 dans la FPGA en utilisant les D I/O de ma carte. Mon RS232 en ensuite converti en RS485 en hardware. Ma question est la suivante, j'ai trouvé l'exemple cRIO_MODBUS mais celui-ci est un exemple ou le cRIO est en MASTER, et moi j'aimerais que ma sbRIO soit en SLAVE. Je me demandais si il existait un exemple ou le cRIO est en slave?
Cordialement
Sébastien Kuenlin

"How to turn a RT Target into a modbus slave using IO server", ça devrait pouvoir t'aider un peu.
"Introduction à ModBus"
J'espère que ça t'aidera, bon courage!
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

Similar Messages

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

  • Modbus RTU slave

    Hello everybody,
    I' m trying to make modbus slave device on labview. Has anybody experiences with the similar project. Please send me some links/advices which could help me in realization of such a project.

    Hi kingarth,
    I made slave devices using NI's Modbus Library for LabView 7.1: http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=F1582737BACF5CA8E0340003BA7CCD71&p_...
    This same library should be available for 8.0 and has been downgraded to 7.0 and 6.1.
    I found no major difficulties. Programming is enough straightforward, there are examples in the library itself.
    I did not test it thoroughly, though, because I only needed a handful of digital inputs.
    Paolo
    Paolo
    LV 7.0, 7.1, 8.0.1, 2011

  • PS SPI Slave Example

    Hi,
    The Xilinx documentation examples only show PS SPI application as a 'Master' e.g. 
    xspips_eeprom_intr_example.c
    xspips_flash_polled_example.c 
    etc...
    In my application, it needs to be a slave? Can anyone point me to an example where this is done?? Appreciate any help.
    Thanks.

    1. 8451 is only for Master mode. Not applicable.
    2. For 6551, That library is not designed for slave mode. If you wish to do it other way around, you need to write it from scratch, and use CS as a trigger signal.
    3. Use R-series is the best choice, since you can customize triggerring pretty easy.

  • Error when running ethernet modbus slave demon in an executable - reoccurence

    Thought I'd solved this with the help of the mass compile function. However, it seems to have come back. Maybe it never went away.
    Brief summary  - I'm trying to create an exe of the MB Ethernet Slave example.vi in LV 2013. I can create the exe OK but when I run it I get an error 1003 at invoke node. "This VI is broken or contains a sub VI that LabView can't locate. Verify that you can run the VI. VI path C:\Modbus\Source code\Slave demon.vi."
    Well I can run the slave demon VI with no problems. I can also run the MB Ethernet Slave example VI with no problem.
    In the MB Ethernet slave example VI there is an invoke node that calls the slave demon vi. I've used the slave demon VI path constant as an input to the invoke node so that the exe shouldn't have a problem locating it.
    I've also checked out the sub VIs of the slave demon and they all seem to be present in my project. I've also tried a few different build settings - all to no avail. All VIs have been mass compiled under LV 2013.
    Maybe the exe is struggling to locate the TCP functions.
    Any help would be much appreciated.
    Attachments:
    MB Ethernet Example Slave.vi ‏47 KB

    I have checked the path and double checked by dragging the VI into an empty path constant. I also created a version that uses the file dialog express VI so that I can select the slave demon VI when the program runs. I've also set the slave demon to be always included in the project build. The error message still appears.
    By disabling sections of the slave demon vi I found that a VI called Internecine Avoider was linked to the appearance of the invoke node error message. By disabling this VI I could get the invoke node error message to disappear, although the slave demon then didn't work as intended. This VI is included in my project under the vi.lib so it should be found.

  • Multiple Modbus Servers with Different Unit ID running in cRIO 9074. Possible ?

    Hello
    I want to create an application such that i can create two Modbus I/O slave server (TCP/IP) with different unit ID and can communicate with the slave through Clients. I created this application but only unit ID 1 is working. Is it like this that at a time two modbus slaves cannot work together ? Also I tried with one server and giving different Unit ID but then also it's not working. I found one thread, here is the link.
    http://208.74.204.114/t5/LabVIEW/how-do-i-get-multiple-tcp-ip-modbus-to-work-together/td-p/2239130 
    Are there any updates on this issue.
    Labview 2012 sp1
    cRIO 9074

    I don't fully understand your issue (but I'm trying).
    Traditionally Modbus TCP/IP slaves cannot talk to each other, also the UnitID is mostly moot for MODbus/TCP since ports and IP addresses exist (unless you are building custom applications that will handle UnitID internally, because you have can't have 2 servers running on the same port).
    If you can clarify your first sentence that would help a lot.
    Varun_ECK wrote:
    Hello
    I want to create an application such that i can create two Modbus I/O slave server (TCP/IP) with different unit ID and can communicate with the slave through Clients.
    You want to create 2 MODbus/TCP slave servers, that can talk to other slaves? Or do you want the Master to automatically do things based on the slaves response? Are the TCP slaves on different computers, IP, etc?

  • Modbus - example error

    Hello,
    i downloaded NI Modbus library and started MB Ethernet Example Slave and MB Ethernet Example Master. But when i start Master im getting error:
    Error 56 occurred at TCP Read in MB Ethernet Receive.vi
    LabVIEW:  The network operation exceeded the user-specified or system time limit.
    Open TCP connection is ok, but when it goes to MB Ethernet Master Query Read Discrete Inputs im getting error.
    I work with other PLC and i need to connect via Modbus - but i really have no idea how to test Modbus when even example didn't work.
    I appreciate if someone can tell me how to test Modbus properl.

    Hi,
    Seems you have recieved a timeout error, because of the connection.
    I would recommend you tested it like that:
    1.Open both Master and Slave in LV.
    2.In master set the remote ip address: localhost
    3.Execute slave, execute master
    Perform changes on the master, and see the functionality on the slave, and vice-versa.
    Good luck,
    Mircea

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

  • How to read data from a Modbus module

    I have a Modbus module from ICPDAS (ET-7019/PET-7019), which I want to read data directly from. Since I'm fairly new to Modbus, not really sure where to start from. I have read the Modbus introduction and understood some of the basics. I've also downloaded the Modbus library but don't really see any good example. The ICPDAS Modbus module is ethernet based and is currently connected to our network. The ICPDAS can log data but I'd like to read data directly using LabVIEW.
    We have LabVIEW 2009 development suite and RT module, cFP 2220 and 180x. I read some sections saying using cRIO as modbus master/slaves and assume we can use cFP as a similar method? I don't have DSC module.
    Would someone be nice to draw a diagram or explain where I can start in terms of connection and configuration? Read from ICPDAS is the only function I need.
    Many thanks,
    Dahai

    Here is a thread with a modbus ethernet query.
    http://forums.ni.com/t5/LabVIEW/Help-with-MODBUS-over-TCP/m-p/271528/highlight/true#M144486

  • Troubles with the modbus protocol

    Hello there,   I have a trouble here with the Modbus protocol; I have already read the forums and saw that there are some issues with modbus tcp;  I have the latest  DSC 8.0 module and also Labview 8.0;  I think that maybe this issues have been fixed.
    There is a demo of Modbus in the examples and it work fine on my computer and and also on two different computer; But if I want to create my own simple application to see if it works , it doesn't work;  
    Attached you can see a zip file with the two projects;  Please someone check it for me  and let me know what the problems are;  If I have this simple app. working then I will move on to my  really application.
    Thanks,
    scorpio
    Attachments:
    Modbus testing.zip ‏36 KB

    Dear Nick,
    The master I/O server in my project is pointing to my  local host 127.0.0.1;  For the modbus slave you cannot configure the IP address; 
    A collegue is also trying to find the problem.  Attached you can see a word document he made illustrating the problem.
    Thanks,
    scorpio
    Attachments:
    National Instuments.doc ‏223 KB

  • Deploy Modbus I/O server in multiple library.

    I'm using Labview 2009 with DSC. I learn about I/O server with network shared variable by experimenting with Modbus Fundamental project and Modbus Simulator project (LV built in examples). I run both projects in one computer, and the result is OK.
    Then I try to make a little modification by adding another library and create modbus I/O server with some bound variables on Modbus Simulator project and Modbus Fundamental project. These new libraries and variables are match in both project, with properties same as original libraries, except different modbus address. I run the project, and the result is always "communication failure" on the new variables in Modbus Fundamental. I have try to deploy and undeploy and also restart the computer, and the result is same.
    I try again with removing original library on both Fundamental and Simulator project, leaves only the new library i've added, the result is OK. This indicate that no problem with new library. Why if both libraries exist the "communication failure" always occurs.
    Thanks

    Hi Jareds,
    Thank you for your response.
    I think it would be clearer if you open my project file as attached. There are two project folders and screenshoot of the error message.
    Yes, of course i open and run them simultanously since this experiment is to demonstrate modbus communication (master and slave).
    As i said before,  actually i just made little modification on Labview's example project by add one library with modbus I/O and some variables.
    Imagine that I want to communicate with multiple modbus devices (slave), in this project there are two modbus slave, ie. the first with address 1 (original as Labview's example) and the second with address 5 (new).
    Hope you can understand what i mean.
    Thanks
    Attachments:
    Modbus IO in Multiple Libraries.zip ‏122 KB

  • Modbus - HELP for final exam

    Good morning.
    We are two students of a technical institute who are attending the last year and as a topic of dissertation for the " state exam " are using language with Labview Modbus . The purpose of this experience is to be able to carry through a program run with Modbus and Labview , monitoring of the photovoltaic devices via 3 "SLAVE" ZR- TIDCI - OPT1 -EM and a "MASTER" ZC -GW -ETH -EM . We started trying to understand the various library functions NI Labview Modbus present in starting and helping with the examples already set in the program and then process them. We were able to set the various elements, such as the IP address of the MASTER , the IDs of the slave etc. . , But after several steps we are stuck because of an "ERROR 63 occurred at TCP Open Connection" .
    The error is present in the block " TCP Write " in the " MB Ethernet Transmit" .
    A possible cause of the problem could be the "transaction ID " ?
    Some might auitarci ?
    The exam is near ...

    Hi all,
    did you try to run the ModBUS TCP (Master/Slave) Examples? They are very simple and are good starting points for developing more complex applications.
    Download the modbus_library here. You'll find the above example in the .llb you'll download.
    Anyway the error 63 come from a wrong TCP setting (IP Address or Communication port). Check if the communciation port is not currently used by other processes or try to change it. Try to run master and slave examples on the same machine with "localhost" as IP address.
    In the following there are some Modbus error related links:
    What Are the Most Common VI Server Errors?
    How Do I Use Remote VI Server Over the Network?
    Introduction to Modbus
    I hope that these informations will help you with your exam preparation.
    GOOD LUCK and best regards.
    Cla_CUP
    NI ITLAY
    AE Dept.

  • Pci-8432/2 modbus

    Hello all,
    I need to use NI PCI-8432/2 to talk to AnyBus gateway module ( a modbus to profibus gateway) so that the PC can communicate with Siemens S7-1200.
    I downloaded Modbus library in Labview from NI, not sure how to use it.
    1. I try to use PC as master to send a real number setpoint value to the PLC, shall I use the MB Ethernet Master Example.vi only? If so, I should use the PLC IP as the IP address, what is the Port number to use in Labview?
    2. I also need to read the real process variable from the sensor, it is also a real number, from the examples, it only has U16 register type, how to send real and read real number?
    3. There are Master and Slave examples for both Ethernet or Serial, for my application, do I just only need the master example like code?
    Thank you in advance,
    Kimberly

    Hi,
    First try to find out S7-1200 communication modes. Selection of the RTU slave or Ethernet slave completely based on your ModBUS Slave property.
    As I know there is no Siemens PLC available in the market with direct ModBUS interface. So first to communicate with the PLC you have to programmer your PLC. You should set all initial setting in your program to communicate on ModBUS like Device ID, Baud Rate, Parity, Data Bit, Stop Bit. You must configure all the register address according to your data.
    Now once you configure your register address for data or all initial ModBUS settings you can easily communicate with your PLC.
    Port No. is nothing but the Port of your PC, that you are using to communicate with the PLC.
    Thanks and Regards
    Himanshu Goyal
    Thanks and Regards
    Himanshu Goyal | LabVIEW Engineer- Power System Automation
    Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
    It Only gets BETTER!!!
    Attachments:
    NI Modbus.llb ‏2361 KB

Maybe you are looking for

  • Cannot disconnect iPod - files being used by another application

    This is the first time I've connected my new iPod to my brand new computer(Dell E510 loaded). I've been able to down load some albums, and it has been charging (via usb port on tower) for 8 hours. When I try to eject the iPod via itunes I get the err

  • WS7 - alternative to ServletByExt?

    Hello, I was able to migrate an old server instance from WS6.0 to WS7, but I saw one message in the migration log that is problematic: INFO   : Servlet by extension is not supported. The following line will be removed from obj.conf: "NameTrans fn="pf

  • Java programs which require a specific version of java won't work

    So I'm running 10.4 on my macbook pro, and when I try to run a java program that requires any version of java, I get an error saying I don't have that version. Java works fine from the command line when I run programs I wrote, and java -version outpu

  • I'm unable to open DNG or RAW into ACR 8.2 from LR5.2 they open directly in PS CC

    Since I installed LR 5.2 I'm not able to open DNG or RAW files in ACR 8.2. They open directly in PS CC.

  • Error reading monitor at RZ20

    Hello everybody There is a monitor of an instance at RZ20 that when I double click on it to set new monitoring parameters do not open and return a message informing that: "Unable to determine any information for several MTE nodes" . Anybody knows som