Modbus library dsc

SALUDOS A TODOS!!!
 Tengo la siguiente pregunta: Estoy usando LabView 8.20 + DSC module,He creado un Modbus Server para comunicarme con tres varidores de velocidad cada uno con su respectiva Id para el protocolo modbus. Mi pregunta es como puedo hacer que el Modbus server creado en Labview me deje cumunicarme con los tres variadores porque al crear el server solo pude poner la direccion de uno solo..
Agradeceria mucho su respuesta...
Saludos...
Adrian.-

Bruno:
Agradesco tu respuesta.. ahora he intentado lo que me has dicho y funciona... pero una pregunta mas, de esta manera el acceso compartido al puerto serie por donde sale la comunicacion lo negocian entre los tres server I/O o yo debo definir un esquema en donde quede perfectamente definido cuando acceder a cada uno de los dispositivos para que no haya conflictos en la comunicacion?. Te consulto esto mas que nada porque he intentado definiendo variables globales de escritura a los dispositivos en forma paralela o simultanea y aveces a alguno de los dispositivos esclavos no le llega la informacion que le envio..
Atte..
Adrian.-

Similar Messages

  • Modbus connection through ethernet using the NI Modbus library

    Hi, first of all I want to say that I'm new to Labview, so I'm in the studying phase and I may have very basic questions.
    There's a tool that's basically a big screwdriver with a controller that can be programmed to make certain jobs using desired speed and torque,  it's called Handy2000. You can save in different channels the configurations for the different jobs. The controller has its own software, and I can already connect to it and read/write with no problem using an ethernet cable.
    I was asked to make an interface in labview to select the channels, show in a graphic way (with photos of the electronic components) what screws correspond to that channel, and show when the steps of a job are done. All of this will be in a panel pc connected to the tool's controller.
    Since I'm new to labview and to the modbus protocol, I took some time to study the basics. I understand how the protocol works and the very basics of labview programming, so I have an idea of how the front panel will be and what things needs to be modified. But now it's time to start the implementation, and I'm a little lost on how to make the basic configuration to setup the connection and start writing the addresses on labview. By the way I don't have the DSC module, I only have to use the NI Modbus library.
    I already checked the example functions to use my pc as master and slave and watched the codes for the different type of data (coil, input, input register, holding register), but I don't know how I should start programming, and the most important thing is how to make some tests in the process to check that I'm having the communication between the pc and the controller. I already read in the forum and learned a lot, but failed to see as a completely newbie how to make and change the basic setups to make the thing work.
    So any help is welcome, specific answers about how to make the basic setup and how to test it, vi examples or basic tutorials to read.
    Thanks in advance,
    Stefan Christiansen
    p.s: I attached the manual that specifies the addresses for the modbus communication, so if you could give me an example of where I should change the address in the labview code and what should I put  to make a basic read or write it would be very helpful
    Attachments:
    Estic Touch Panel Comm. Spec _010-E_.pdf ‏586 KB

    I can't even know if it's connected right
    First I opened the Master Ethernet Example and the Slave Ethernet Example, and everything worked fine.
    Now I tried to do it connected with ethernet cable to the controller using the Master Ethernet Example, and set the "Remote IP Address" to the address of the controller (which I already tested with ping and the connection with my PC is fine, and also I have no problem reading and writing with the controller's software). And when I run it, I get the error 56. The error tells me that it happens at TCP Read in MB Ethernet receive.vi:5. I attached the photo of that vi.
    I really hope you can help, I need to establish the connection and being able to read/write at least something. 
    Attachments:
    error56.png ‏54 KB

  • Modbus library for DS2011

    From what I have read on the forum there should be a modbus library that is included as part of the DSC module which I have.  However, I don't see any of the vi's from my DSC module.  Do I need to do something to enable this?  Should I just download and use the free vi's nimodbus121.zip .  Is there a run-time license involved if I want to use these vi's(the ones that are part of the DSC module) as part of an executable and/or a cRIO realtime?

    Hi rezar25,
    The Modbus library can be downloaded at the link in RavensFan's post:  http://sine.ni.com/nips/cds/view/p/lang/en/nid/201711
    The Modbus library is an older product and not fully supported anymore. As the note on the download page states, the DSC (Data logging and supervisory control module) is reccommended:
    "Please note that this is an example program and not an official NI Product.  For a more complete, fully supported MODBUS solution, NI recommends the LabVIEW Datalogging and Supervisory Control Module"
    Catherine B.
    Applications Engineer
    National Instruments

  • I am using the MODBUS library and can't receive data, however I can send it just fine?

    Hi,
    I am using the Modbus Library to communicate with a VFD to control a fan. I am using the master write and read vi. I can write data to the VFD and get the fan to do what I want. The VFD is supposed to send a confirmation packet after I tell it to do something and I can also read its registers. When I debug the VI it shows the problem is the buffer always reads zero and the VI timesout. If I watch the lights of the USB to RS 485 adapter I am using to interface with the VFD, I see that the RX light flashs right after I send a message. So I should have something in the buffer. Does anyone have any suggestions?
    Aaron
    Solved!
    Go to Solution.

    Ok, heres what happened for anyone who has this problem. In the MB Serial Receive.vi The Bytes at Port property node was reading 0 even though there was something in the buffer. The program execution was then stuck in a loop till it timed out and never went on to read anything from the serial port buffer. I didn't spend too much time wondering why that VI didn't work and created my own. With an appropriate delay after writing to the serial port,  I used the same Bytes at Port property node and was able to get the right number of bytes to then feed the read VISA vi the number of bytes to read. I got the right response message and everything seemed good. But of course NOT! I then experimented with writing different speeds to the VFD to get the fan to run at different speeds. I found a small range of speeds where I would get no response from the VFD, either by it functioning or sending me a response packet. After quite some time, I found there is an error in the LRC-8 code in the MODBUS NI library. It does not mandate the LRC be a two character value. So if your LRC turns out to be a single character value such as F (which should be 0F)  you get an incomplete MODBUS message. This was easily fixed in the LRC8 vi by telling the 'number to hexidecimal string' vi to produce an output with a minimum width of two. Then everything worked great. Moral of the story is the MODBUS library is clunky.

  • Is 1.2 version of Modbus library compatible with labview 2010 10.0 ?

    I am new to labview am trying to get a .vi written by someone else on a different computer. When I got the .vi and tried to open it, it started looking for Modbus library. 
    On the website, I only see the 1.2 version of the library which contains libraries for 7.1 to 8.6 versions.
    How can I resolve this issue?
    Thanks,
    Cp

    Thanks for the accurate response. I just added the files as suggested in the ReadMe.html that came along ignoring the version. It asked me to save changes and that was it. No more Modbus errors.
    I won't really be able to test the full function till later this week, till then, I am satisfied with this solution.
    Thanks for you help.
    Cheers
    cp

  • Can't get modbus library to communicate with Modbus RS 485 device

    Hi,
    I've been trying for a few days now to get the NI modbus library (http://zone.ni.com/devzone/cda/epd/p/id/4756) to work with an Omega CN7500 temperature controller with not much luck.  
    It works with Omega's own software (using Modbus with a RS232 to RS485 converter) but I need to get it work with Labview for automation purposes and to integrate it with the rest of the system. 
    We configured it the same as we did for the Omega software (baud rate, parity bit, flow control, etc)
    Currently when we run it, the execution gets stuck at the MB Serial Master Query block and then we receive a timeout error. 
    Here's my program. 
    I'm new to using Labview so please bear with me if it's something obvious.
    Any help would be greatly appreciated.
    Thanks.
    Attachments:
    Modbus_trial.vi ‏26 KB
    screenshot.JPG ‏41 KB

    Here yeah go...
    Doug Ferguson
    www.southerndaqsolutions.com
    Attachments:
    TC Read.vi ‏17 KB
    Hex String to Decimal.vi ‏6 KB

  • Modbus library problem

    Hi,
    I have installed modbus library in my labview 2011. I followed exactly all the steps required to install it and now I found some problem, please refer to the attached file.
    I can see the modbus library but all the modbus VIs under this library are in "?????" which I can't use it. Please help up if anyone knows how to solve this.
    Thanks,
    Adam
    Attachments:
    MODBUS library.xlsx ‏174 KB

    Do you have multiple version of labview on your machine?  Make sure that you install modbus on the version of labview that you have opened.  It does seem like you do not have all the files in place.
    Kudos and Accepted as Solution are welcome!

  • PLC con Modbus y DSC

    Hola! Quiero comunicar un PLC de marca Phoenix Contact modelo ILC 130 ETH con Labview 2011 por Modbus Ethernet utilizando el toolkit DSC. Para hacer esto empece siguiento la siguiente guia:
    http://www.ni.com/tutorial/13911/en/
    Al hacerla recibo el siguiente mensaje de error
    Error -1967353901 occurred at Shared Variable in Untitled Library 1:Untitled 1
    Possible reason(s):
    LabVIEW DSC:  (Hex 0x8ABC8FD3) The Modbus I/O server failed to connect to the Modbus Ethernet slave device. Ensure that the Modbus Ethernet slave device works properly and that the connection between the Modbus master and slave devices is configured correctly.
    Del manual del PLC saque la siguiente tabla de modbus
    Probe con varios valores pero con todos obtengo el mismo error.
    Es la primera vez que uso Labview y por lo tanto no tengo muchas armas para solucionarlo. Alguna ayuda?
    Saludos

    Bruno:
    Agradesco tu respuesta.. ahora he intentado lo que me has dicho y funciona... pero una pregunta mas, de esta manera el acceso compartido al puerto serie por donde sale la comunicacion lo negocian entre los tres server I/O o yo debo definir un esquema en donde quede perfectamente definido cuando acceder a cada uno de los dispositivos para que no haya conflictos en la comunicacion?. Te consulto esto mas que nada porque he intentado definiendo variables globales de escritura a los dispositivos en forma paralela o simultanea y aveces a alguno de los dispositivos esclavos no le llega la informacion que le envio..
    Atte..
    Adrian.-

  • Performanc​e of Modbus using DSC Shared Variables

       I'm fairly new at using Modbus with LabVIEW.  Out of the roughly dozen tools and API's that can be used, for one project I'm working on I decided to try using Shared Variables aliased to Modbus registers in the project, which is a DSC tool.  It seemed like a clever way to go.  I've used Shared Variables in the past, though, and am aware of some of the issues surrounding them, especially when the number of them begins to increase.  I'll only have about 120 variables, so I don't think it will be too bad, but I'm beginning to be a bit concerned...
       The way I started doing this was to create a new shared variable for every data point.  What I've noticed since then is that there is a mechanism for addressing multiple registers at once using an array of values.  (Unfortunately, even if I wanted to use the array method, I probably couldn't.  The Modbus points I am interfacing to are for a custom device, and the programmer didn't bother using consecutive registers...)  But in any case, I was wondering what the performance issues might be surrounding this API.
        I'm guessing that:
    1) All the caveates of shared variables apply.  These really are shared variables, it's only that DSC taught the SV Engine how to go read them.  Is that right?
       And I'm wondering:
    2) Is there any performance improvement for reading an array of consecutive variables rather than reading each variable individually?
    3) Are there any performance issues above what shared variables normally have, when using Modbus specifically?  (E.g. how often can you read a few hundred Modbus points from the same device?)
    Thanks,
        DaveT
    David Thomson Original Code Consulting
    www.originalcode.com
    National Instruments Alliance Program Member
    Certified LabVIEW Architect
    There are 10 kinds of people: those who understand binary, and those who don't.
    Solved!
    Go to Solution.

    Anna,
        Thanks so much for the reply.  That helps a lot.
        I am still wondering about one thing, though.  According to the documentation, the "A" prefix in a Modbus DSC address means that it will return an array of data, whereas something like the F prefix is for a single precision float.  When I create a channel, I pick the F300001 option, and the address that is returned is a range:  F300001 - F365534.  The range would imply that a series of values will be returned, e.g. an array.  I always just delete the range and enter a single address.  Is that the intention?  Does it return the range just so you know the range of allowed addresses?
       OK, I'm actually wondering two things.  Is there a reason why the DSC addresses start with 1, e.g. F300001, instead of 0, like F300000?  For the old Modbus API from LV7, one of the devices we have that uses that API has a register at 0.  How would that be handled in DSC?
    Thanks,
        Dave
    David Thomson Original Code Consulting
    www.originalcode.com
    National Instruments Alliance Program Member
    Certified LabVIEW Architect
    There are 10 kinds of people: those who understand binary, and those who don't.

  • Floating point number using Modbus RTU DSC LV 8.2

    I'm reading temperature from a Modbus conrolled device. I need to convert a temperature value (17053) read as a double type Shared Variable (SV) and convert it to ieee 754 type to show temp of 79 deg F as shown on the control front panel.
    I'm using DSC module LV 8.2. I'm wondering if the conversion is already done in DSC LV 8.5???

    seem to find my own answers after putting the post....
    I use a typecast to single but I had to change the double to 16 bit integer for the type cast to convert correctly.... see attached png
    Attachments:
    ModbusSVFloat.PNG ‏28 KB

  • LV Modbus library 1.2.1 - Error code 6101 (timeout)

    This seems to be a common problem but did not found a clear solution. Timeout (error code 6101) appears randomly during register(s) read in Windows and Real-Time environment and with various computers. No matter which RS232-RS485 converter or short/log cable is used. Does anybody know what is the main reason for this error?

    Bonjour,
    Je suis débuté en Modbus c'est pour cela que j'ai regardé de nombreux sujets de discussion sur les forums NI etc.. j'ai donc téléchargé la bibliothèque modbus, j'en ai même téléchargé et essyé 3 différentes, j'ai suivi tous les conseils que j'ai pu lire malheureusement mon programme ne fonctionne pas. Le but est de commniquer avec le controleur de température CAL 9400 afin de lui atribuer un setpoint et un heating rate notamment. Mon Pc portable est relui à lui grace à un adaptateur USB-RS232 et un autre cable RS232 qui fait relais. Aucun des exemples ne marche et j'ai à chaque une erreur différente. Je privilégie plutot l'exemple 3. J'ai donné l'adresse 1 au controleur de température qui est ici le " slave", mon PC étant le "master". Pourtant en entrant l'adresse 1 dans mon programme j'ai l'erreur 6101, alors que si j'entre l'adresse 0 dans mon porgramme il n'y a aucune erreur mais rien ne se passe non plus pour le controleur, quelle que soit l'adresse que je lui ai attribué, je ne comprends, pouvez-vous m'aider s'il vous plait ? sachant qu'il y a trois types de data pour le controleur apparament : 18ni,18E1 et 18O1 je ne sais pas ce que ca signifie.
    Vous trouverez ci-joint les trois exemples que j'ai essayé ainsi que la documentation sur le controleur de température et la manière dont on communique avec lui en modbus.

  • 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

  • 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 DSC point not reading correctly

       I'm using LV 2013 32bit on W7-64bit.  I'm talking to an industrial controller using Modbus over Ethernet.  My current software uses the DSC modbus interface, in which I define the Modbus bus itself within a library in the project, then define each Modbus point as an address inside that modbus definition.  Inside LabVIEW, you can then get to the Modbus data via Shared Variables.  I am currently using the dynamic shared variable calls, rather than static shared variables.  I have points that are Boolean (coils) and Reals, with some Read Only and some Read/Write.  In general, all of this works.
       However, there is one Read/Write Real that acts funny.  If I set it to a new value or if the industrial controller sets it to a new value, the industrial controller gets the new value.  The shared variable engine on my computer even gets the new value, as can be verified by opening the Distributed System Manager.  But LabVIEW continues to read the old value, with no errors.  Other Read/Write points work fine, and I've looked over the address definition several times and can't find any reason why this point should be any different than the others.
        Does anyone have any ideas why the DSM can see a new value of a shared variable, but LabVIEW continues to get the old value?  I've looked at the init case for the dynamic SV's, and I can't see any options there that I can tweak to try to resolve this.  My next attempt will be to rewrite the entire sub-system so that it uses NI's latest Modbus library and skips the whole DSC thing.  That will probably be much better for other reasons as well.  I've noticed that with DSC and Shared Variables, the first time the program runs it gets started pretty quickly, but subsequent runs can take up to two minutes to connect to all the SV's.
    Thanks,
       DaveT
    David Thomson Original Code Consulting
    www.originalcode.com
    National Instruments Alliance Program Member
    Certified LabVIEW Architect
    There are 10 kinds of people: those who understand binary, and those who don't.
    Solved!
    Go to Solution.

    Sorry, I can't help you in this case.  The config error was within my own software configuration.  I was just telling it to do the wrong thing.  Nothing that could be useful for anyone else.
    I hope you figure out your issue.  I know how maddening that can be.
    DaveT
    David Thomson Original Code Consulting
    www.originalcode.com
    National Instruments Alliance Program Member
    Certified LabVIEW Architect
    There are 10 kinds of people: those who understand binary, and those who don't.

  • Library for Modbus ???

    Hi, I have a project to control a motor system.
    The communication is RS485 through Modbus via Serial.
    The computer is the master and the control motor is the slave.
    I have just one system to control
    I found 3 free driver.
    MODBUS Library for LabVIEW Version 1.21
    http://www.ni.com/example/29756/en/
    LabVIEW Modbus API v1.1.3.32
    https://decibel.ni.com/content/docs/DOC-30140
    MODBUS included in DSC module for LV2014
    http://zone.ni.com/reference/en-XX/help/370622M-01/lvmve/choose_modbus_ioserver_vi/
    I already made a development with 1.21 from NI.
    Should it better to use Modbus library from DSC module ?
    What do you suggest me ?
    thanks in advance

    Hi Minikisscool,
    The Modbus Library for DSC is probably the more convenient to use but you need for that to have purchased the DSC module.
    The option you have choosen (the free low level API) is probably the most commonly used and if you did not experience any particular troubles using it, I suggest you stick to it ; )
    Have a nice day,
    M-Junior

Maybe you are looking for

  • Error while saving SO - item 000010 is missing in table YVBAP

    Hello Experts, We are facing following issue while delivering an order with BOM material. 1)     We created an order with sold-to customer blocked for delivery. 2)     Then we removed the block from customer and also from document header/shipping tab

  • Problem in connecting to Access Database.

    Hi,      I am new to this Java/JSP Concepts. I am using IBM Websphere Studio(Application Developer 5.1.2). I am facing a problem to connect to the Access database. I have written a java file to connect to the Access Database. When i compile my java c

  • OS7--sorting albums in horizontal (flow) view

    How can I sort albums by artist rather than by album title in horizontal view for iPhone OS7?

  • Aironet 1300 - problems with security

    Hi, I have two Aironets setup as below. They both have the radio configured and up. I suspect the issue is with the security. I am unfamiliar with how it works - if anyone can provide me any pointers, it would be much appreciated! thanks, Mark dot11

  • API or Interface table for receiving an RMA return line

    is there an API or interface table for receiving an RMA return line? any example/notes available that can i refer to ?