Projet LabVIEW RT - Logiciel Modbus I / O Server - Labview 7.1

Bonjour,
Je souhaite savoir s'il est possible de mettre en place un projet LabVIEW RT sur ma cible (FP2000 & Labview 7.1) et d'installer le logiciel   "Modbus I / O Server" afin de transformer ma cible en esclave Modbus. La cible recevra des requêtes Modbus FTP d'un modem/GPRS (Ewon) pour gérer des alertes et envoyer des SMS.
Est-il possible avec la libraire nimodbus121 d'enregistrer des variables issues du programme sur le FP2000 afin que le modem puisse les lire puis gérer les alarmes et une page internet ?
Dans la doc Introduction to MODBUS j'ai lu que "L'ID  est généralement utilisée pour traiter l'esclave MODBUS. Lorsque vous utilisez MODBUS TCP, l'adresse de l'esclave est son adresse IP et l'ID dans l'en-tête MBAP n'est pas utilisé."
Le Modem à besoin de l'ID du FP2000 (entre 1 et 255) et je ne sais pas ou la trouver ?
Merci

Bonjour
en Labivew 7.1 RT, le plus simple est d'utiliser la bibiothèque NI-ModBus disponible sur le site NI Ele est justement écrite en LV7.1.
Par contre attention, cette bibiothèque n'est pas optimisé RT.
Elle ne limite pas le nombre de connexion et lance des thread parallèle.
Cela devrait fonctionné, mais il peut être nécéssaire de limiter le nombre de connexion en revoyant le paralléllisme.
Bonne journée
Ingénieur d'Application / Développeur LabVIEW Certifié (CLD)
Application Engineer / LabVIEW Certified Developer (CLD)

Similar Messages

  • Modbus I/O Server at Run-time

    Hello everyone.
    I needed an software that communicates with a third part PLC (siemens) via Modbus (serial) protocol, and I'm getting some problems with stand-alone application.
    I did the following steps:
    1- Created a new project;
    2- Created a new library;
    3- Created a new I/O Modbus Server (serial master mode);
    4- Created a variables bounded with a holding register (UInt16) from the PLC.
    5- Put that variable on a loop (timed) just to get its value.
    The program also deploys the created library at begin of execution and undeploys it at the end (working).
    The (simple) project worked fine at my development machine (with LabVIEW 8.6 and Real-Time Module installed), so I created a stand-alone application and an installer of it.
    Again, the installed software worked at my PC.
    But, here comes the problem, when I try to run my program at another PC that do not have LabVIEW it doesn't work.
    I have already installed the LV Runtime 8.6, tried to include it at my own installer (at Additional Installers tab - included Distributed System Manager and NI Variable Engine too), and still didn't work!
    I also tried to install the software in another PC, that have LabVIEW 8.6 but not the RT module, and it didn't work as well.
    The library and shared variable seems to be correctly deployed on SVE, so I think the error is related with the Modbus I/O Server.
    So, what can I do to a software using Modbus I/O Server run in a machine without RT development?
    There are some screenshots that I took while running the software at the both (develop. and client) machines above.
    Regards,
    Leandro Rondon
    - Sensoft Indústria e Automação Ltda.
    - Work phone: +55 16 3413-5489
    - Cell phone: +55 16 8827-4025 
    - [email protected] 

    Forgot the images:
     1 ) running the VI at development machine - labview 8.6 with RT module
    2) running the installed software at development machine
    3) distributed system manager from target machine before execution
    4) distr. system manager and the software error

  • Can I write to Modbus I/O Server addresses without creating bound variables?

    Hi all,
    I'm wondering if it's possible to use the Modbus I/O Server without explicitly creating bound variables?
    If I write a value to the bound variable at "ni.var.psp://My Computer/Slave/300001", the master can see the value.
    The variable properties paeg says that the variable is bound to "My Computer\Slave.lvlib\ModbusSlave1\300001"
    I deleted the bound variable and tried a few different ways to write directly to the I/O Server, but all of them gave me Error 0x8BBB0005. I tried the following:
    ni.var.psp://My Computer/Slave/300001
    ni.var.psp://My Computer/Slave/ModbusSlave1/300001
    ni.var.psp://My Computer/Slave.lvlib/ModbusSlave1/300001
    ni.var.psp://My Computer/Slave.lvlib/ModbusSlave1/300001
    I also tried replacing "My Computer" with "localhost" above. No luck.
    Is there anything I've missed? I'm asking because CPU usage is very high, and I thought I might be able to reduce that a bit by removing the 300 bound variables in the system.
    Solved!
    Go to Solution.

    You can use DataSocket with a path like psp:\\localhost\Slave\ModbusSlave1.400001 for read and write access.
    Check out the example VI "Monitor OPC Items with DataSocket.vi" in the LabVIEW examples.

  • 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 I/O server & Shared Variable Engine

    小弟做專題用到Labview,想請教一個問題,目前是用labview對智慧電表讀取資料
    主要用modbus I/O server(TCP/IP模式)和shared variable engine
    但是網路上大多數資料是教學如何建立I/O server和設定shared variable
    小弟想知道背後理論是什麼?
    例如:labview如何對modbus TCP/IP的封包進行處理,並取出所要資料。
    謝謝各位指教

    建議使用 google
    關鍵字 = labview shared variable concept

  • Possible to use Labview DSC to Modbus over Lantronix using ethernet encapsulation?

    Hi,
    I'm currently evaluating LabView DSC 2009. I want to connect to a Modbus PLC system, which is rs232, connected via a Lantronix box. I have the Lantronix software installed for com port redirection. I set up a serial Modbus I/O server, and every works great.
    I was also playing around with the demo of LabView OPC Servers, and noticed that instead of selection com2, I was able to select ethernet encapsulation, and directly type in the IP address & port of the Lantronix box, and it worked great as well.
    However, I noticed that when I close things out using the serial connection, it still leaves the port open & the computer connected to the serial port (verified using the Lantronix Manager). If I use the ethernet encapsulation route, it closes everything completely (since it doesn't use the installed Lantronix software redirector).
    I have another user who will occasionally need to connect to the PLC using ProWorx, over the same Lantronix box, using a different computer. This often requires me to manually close out & disconnect the port, unless using the encapsulation method.
    My question is: Using the DSC Module (over Modbus I/O server), can I use ethernet encapsulation instead of having to manually/force close the com port?
    Thanks,
    Jacob

    Hi,
    As you noticed, there are differences between Modbus RTU, Modbus RTU/IP (encapsulated) and Modbus TCP. The first involves the use of a Com port on your computer and on the PLC. The second involves the use of a Device Sever (TCP Server) without using a Com port on your computer and not on the PLC. The third involves Ethernet media only.
    Using Modbus RTU encapsulated, your computer keeps com ports free. So, you don't have to open and close the com ports. This task is performed by the Device Server (between PLC and PC).
    I have been using Share variables to read/write from/to an array of singles with success, and definetly it's better than doing it at single read/write.
    You will find tha NI OPC Servers and KepServer are the same software.
    Now you can read/write from/to an array
    All this process is performed without using PC's Com Ports

  • Modbus I/O Server Shared Variable Not Updating Immediately After Flush

    Hi everyone,
    Weird issue here... If I create a Modbus I/O server in a LabVIEW project, bind a shared variable to a holding register, write to the shared variable, flush, and read back, the value returned in an immediate readback is NOT the value I previously wrote. I've attached an example snippet.
    In this example, PLC Command Complete is TRUE coming in. I write a FALSE to it. I flush the shared variable buffer. I read back PLC Command Complete. When I do this, PLC Command Complete will return TRUE (???), and after 100ms or so, return FALSE. How is this possible??
    Some notes:
    The shared variable is NOT network buffered.
    The slave is NOT altering the value of this variable; only this snippet of code is.
    Altering the refresh rate of the Modbus server does not affect the outcome.
    If anyone has any idea as to what's going on, I would greatly appreciate it!

    Couple of points.
    First, your screenshot shows network shared variables, not single process!
    Next, network shared variables take time to update (much longer than NI tell you!) If you knock up a little timing noddy to set a variable and then loop reading that variable until the transition comes through you get results like this (runnng from the programming environment, I've not tried with a compiled exe):
    Network shared variable, no flush - approx 20ms (NI say is should be 10)
    Network shared variable, flush buffer - very fast (faster than the ms clock resolution) but still took between 14 and 20 iterations of my loop before the change percolated through (certainly not what you would expect)
    Single Process variable - instant (even without the flush)
    This has caused me so many problems in the past (my own race conditions are bad enough without NI throwing in extra ones with this unexpected behaviour) that I try to avoid network shared variables now.
    Change yours to single process and you should be fine (or do they need to be NS?)

  • Turning a LabVIEW built DLL into an ActiveX server

    Does anyone have a list of the steps you must go thru
    to convert a LabVIEW generated DLL into an ActiveX server. Do the functions become methods?

    Hi James,
    we have a library we deploy in three ways: as a LabVIEW library, as a DLL and as Active-X server.
    In the build file for the DLL we have made each "function to call" a top level VI.
    In the Active-X server each "function to call" is a dynamic VI. We created a new top level VI which will run when the server is started and stops after his window is hidden. In LV 6.x you need the winutil library to hide the window. If you close the window (through FP.Open set to FALSE) the server will stop. The window size is set to 1x1 in the VI Properties to minimize flickering on the screen during start of the Active-X server. You must check the "Enable Active-X Server" box on the "Application Settings" page in the app builder. In your client application yo
    u open a reference to the server and then you can open a reference to the VI. You set/read the controls and run the VI. There is sample code for Visual Basic on the NI web site. I have also sample code for Visual C++ single and multi threaded clients.
    If you are interested in the examples contact me at [email protected] and I will ask my customer to allow me to send it to you.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • I have a prpblem in enabling webserver i get message labview webserver not running error 54 , i checked IIS Manager and www the services r running ok ..can anybody tell what might be error ,,,iam on labview 6.1 and win 2003 server.,

    i have a problem in enabling webserver i get message labview webserver not running error 54 , i checked IIS Manager and www the services r running ok ..can anybody tell what might be error ,,,iam on labview 6.1 and win 2003 server.,

    If you already have IIS web server running, you need to run the LabVIEW web server on a different port to avoid conflicts. It probably won't start because the port 80 is already in use.
    Check options.."Web Server: Configuration" within LabVIEW.
    LabVIEW Champion . Do more with less code and in less time .

  • Is Labview 6i compatible with win 2000 server sp4?

    My server was upgraded to SP3 for Windows 2000 Server. That is causing a msgina.dll not loaded fault. Have exhausted Microsoft hotfix but no improvement so would like to upgrade to SP4. Just want to make sure there have been no issues.

    CM@metaldyne wrote:
    My server was upgraded to SP3 for Windows 2000 Server. That is causing a msgina.dll not loaded fault. Have exhausted Microsoft hotfix but no improvement so would like to upgrade to SP4. Just want to make sure there have been no issues.
    Talk about an old release! smercurio is right, LabVIEW never officially supported the Windows server variants. Not sure about 2000 but for Windows Server 2003 this was certainly for a reason as although you could install and run LabVIEW on there (no I don't think version 6i would install there) I know for sure you could run in some obscure behaviour sometimes.
    Windows Server being a specific platform used in IT departements who usually would rather jump from a plane without parachute than letting someone else install an application on their systems, it makes not much sense for NI to spend much energy in trying to make LabVIEW work flawlessly on it.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • LabVIEW as an in-process COM-server

    Hello:
    At the moment, I evaluating if LabVIEW is the best tool suitable for my next task.
    I would like to know if LabVIEW is an in-process COM server—an ActiveX DLL—that implements the IDTExtensibility2 interface. I am trying to add a COM add-in for a current Microsoft product.
    The MS notes also states the following:
    Non-modal forms cannot be displayed directly from a COM add-in. If you have non-modal forms, you can have your add-in call an external program (such as a Visual Basic executable) that enables a connection.
    Does LabVIEW meet these criteria or do I have to program in VB?-((
    Robert

    rberger wrote:
    > I would like to know if LabVIEW is an in-process COM server—an
    > ActiveX DLL—that implements the IDTExtensibility2 interface. I
    > am trying to add a COM add-in for a current Microsoft product.
    LabVIEW is not an in-process COM server. LabVIEW is started as a
    separate process either as development system or as runtime executable
    and the Active X interface is out of process to the other application
    invoking LabVIEW's Active X interface.
    LabVIEW is also not embeddable into other applications through Active X.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • LABVIEW.LIB was not called from a LabVIEW process

    Hi All,
    I've inherited LV code that calls a CIN node to access a motor controller.  I'd like to compile this code to a .NET DLL, but receive the following error when calling it from an external source:
    I've read the knowledgebase article explaining the problem from here, as well as the following support questions:
    http://forums.ni.com/t5/LabVIEW/Labview-lib-was-not-called-from-a-labview-process/m-p/232548
    http://forums.ni.com/t5/LabVIEW/Problem-with-lsb-LABVIEW-LIB-was-not-called-from-a-LabVIEW/m-p/48809...
    http://forums.ni.com/t5/LabVIEW/Labview-lib-was-not-calld-from-a-labview-process/m-p/718427
    http://forums.ni.com/t5/LabVIEW/Building-a-LabVIEW-DLL-with-VIs-that-use-CINs/m-p/632817
    The conclusion seems to be recompiling is the answer.  I've tried recompiling the original CIN vi within LV with no success.  Do they mean to recompile the original C code against the newer labview.lib (sorry, I'm not all that familiar with how the CIN nodes work)?  Any suggestions would be awesome.  Thanks.
    -Joe

    You can't make use of LabVIEW manager functions in non-LabVIEW based processes. Basically unless the C code is for a CIN or DLL that is to be called by LabVIEW (inside the development system or a LabVIEW built application), any function pulled in from labview.lib is not available. LabVIEW.lib is an import library that does not implement any functions but simply imports them from the LabVIEW kernel, either the LabVIEW development system or the LabVIEW runtime DLL. And no you can't just link in the LabVIEW runtime DLL into your .Net application. This DLL needs to be started up and initialized in very specific ways, that only LabVIEW itself knows about when building an application.
    Basically if you want to recompile the code (yes in C/C++) for use in a non-LabVIEW application, you also have to remove all the link libraries from the LAbVIEW cintools directory, and replace any use of functions now unavailable (link error: unavailable external reference) with other similar functionality from your C runtime library. Or implement those functions yourself using C runtime library calls.
    Another possibility could be to actually create a LabVIEW executable that exports the functionality as ActiveX Server. Or in LabVIEW 2010 you could also select to create a .Net Interop Assembly from inside the LabVIEW project.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • LABVIEW.LIB was not called from a LabVIEW process when creating unit tests

    We are developing a DLL to be integrated in LabVIEW using CLFs. So far we have the system working, but we wanted to create some unit tests in C as part of our release process. The problem is that when I link labview.lib in VS C++ and then call the EXE generated I get an error saying: "LABVIEW.LIB was not called from a LabVIEW process". As mentioned in http://zone.ni.com/reference/en-XX/help/371361J-01/lvexcodeconcepts/debug_dlls_and_dll_calls/:
    "Calling the shared library from another C program is also another way to debug the shared library. By calling the shared library from another C program, you have a means of testing the shared library independent of LabVIEW, thus helping you to identify any problems, sooner."
    Some of our functions, however, use LabVIEW specific instructions and we would like to test them in a realistic environment (i.e., calling to the actual functions instead of creating stubs).
    Is there any workaround to this problem?
    Thanks!!

    Hello SaraGr,
    Welcome to the NI Discussion Forums! I have a couple of questions to better determine the issue here:
    1. What is the LabVIEW version that you are using?
    2. Does your DLL uses Serial Compatibility VIs? If so, try using your development on NI-VISA instead of Serial.
    3. Are you using a Code Interface Node (CIN)? If you do, I see that from the help file you would need to compile the code for the new platform. Also, please remember that functions specifc to CINs (such as SetCINArraySize) will not work in a DLL.
    4. Be sure to include the header files in your program, like extcode.h. Please follow this white paper to link labview.lib to your program, or follow the Alternate Method.
    Regards,
    Daniel REDS
    RF Systems Engineer
    Help us grow.
    If a post solves your question, mark it as The Solution.
    If a post helps, give Kudos to it.

  • Using "panelresize.vi" in Labview 2013, in code originally written for Labview 2006.

    Hello,
    I'm updating code written in Labview 2006 to make it compatible with Labview 2013.  My code calls a custom TDMS file viewer vi.  This viewer calls a function called "panelresize.vi".  This is a NI vi that has been updated since the 2006 version.  The new version includes a "help - boolean refnum" in the input cluster, so that the vi now expects a cluster of 9 elements instead of the 8 that I am sending it.  I am not sure what this "help refnum" is, how to use it, or how to add this to my input cluster in the calling function so that the error goes away.
    Any suggestions?
    Thanks!
    Attachments:
    Untitled.png ‏392 KB

    Hi,
    it is a help button. You can add a help button to your customized File Viewer. If you don't want this button, you can make it invisible. 
    What requirements drive you to make your own customized File Viewer?
    FYI. In LabVIEW 2013, we made changes to improve the performance of the file viewer. For the compatibility, we kept the panelresize.vi and added a specific panelresize_tdms.vi for this improvement. panelresize_tdms.vi requires more than 9 elements.

  • Can anyone help me find the free full semester labview course slides that were on the labview web site but recently disappeared. I would like to use them in my course.

    Can anyone help me find the free full semester labview course slides that were on the labview web site but recently disappeared. I would like to use them in my course.

    The main page of the Academic section can be found here.
    I think the material you are looking for is the courseware.
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

Maybe you are looking for

  • How to change one iView to another in portal page by clicking the third one

    Hi all! I have created four iViews: two speedometers with web application designer and two iViews with visual composer. I added the speedometers and a visual composer iView #1 to a portal page (default view). The requirement is that by clicking the s

  • BRS issue

    Hi In SM35 session, after uploading BRS in FF_5 to knock off entries, we have a issue.  Open items for September, october are reflecting, but there are some Open items in AUGUST which are not reflecting in this session,these open items can be seen in

  • Not able to display WSDL

    Dear All, In PI 7.1 while dispalying WSDL we are getting the following error: <err> Object Service Interface BAPI_CUSTOMER_GETDETAIL2 | urn:sap-com:document:sap:rfc:functions not found in Enterprise Services Repository </err> I have checked the objec

  • Convert pdf files back to indesign files again

    my computer crashed recently so I need to recreate some idesign files from exported pdf files.  Is there a program that can import PDF files and make them Indesign files again with all the original componets there and ready to edit?  I created many p

  • How retrieve custom fields only when using SPListItemCollection?

    Hi with following code I am retrieving a DataTable from a List: using (SPSite site = new SPSite("http://...")) using(SPWeb web = site.OpenWeb()) SPList oList = web.Lists.TryGetList("Serverliste"); if(oList != null) DataTable dt = oList.Items.GetDataT