Dsc module modbus server handling uint8 variables

Hello!
I have a problem with handling Modbus uint8 variables in the dsc module . Unit8 Shared variables
are available in labview but Modbus i/o server Unit8 variables are not:
http://zone.ni.com/reference/en-XX/help/371618J-01/lvmve/dsc_modbus_using/
In our controller we split some 16 bit modbus registers into two 8 bit variables to pack some more usefull data in there. 
All of my shared variables are running nicely in the shared variable engine but I've no way of
easily binding them to my Modbus i/o server uint8 variables easily.
Any ideas?
I like the auto-scaling logging and binding of the DSC module shared variables
so I want to avoid some manual labview processes.
I want to view all shared variables in my front ponel at run time. I have 300+ variables so I'm trying to avoiding manual one-off hacks.
James

jamesy777, 
The reason Unit8 variables are not available in the Modbus I/O sever is the nature of the I/O server data types compatible with the registers. If you’re writing to two registers, you can just read those two separate registers as U16s in LabVIEW. Otherwise, if you’re writing to the upper and lower half of the register, you can split the register into its 8-bit halves using the Split Number function in LabVIEW.
Split Number Function - http://zone.ni.com/reference/en-XX/help/371361L-01/glang/split_number/
Regards, 
 

Similar Messages

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

  • Modbus (DSC Module) - Illegal Data Address

    Hi
    I need to implement a Modbus Slave in an application on a cRIO system. I set up a "I/O server" (DSC Module) and created shared variables for all the registers I need. The Slave has been tested and works fine, I'm using about 20 holding registers and I'm able to both read from and write to them.
    The issue is that when the Modbus Master reads a holding register that I have not implemented the slave replies with the value "0x00 0x00" (LabVIEW default for integer) and not with exception response code 02 (a holding register inquiry for a nonexistent address should reply with function 0x83 and code 0x02 - Illegal Data Address).
    Is it possible to change a setting or something, in order to force the DSC Module to send an exception response code, in stead of simply a default value, for registers that are not specifically configured?
    Hope someone can help me - I would really like not to write all the necessary code for a modbus slave myself.

    Hi Lenvno
    Thanks for your reply.
    I think you misunderstood me.
    I have an application running on a cRIO. On this cRIO I need to implement a Modbus Slave in which specific holding registers should be used. Through a serial connection a different device, acting as a Modbus Master, obtains information from this slave.
    On the cRIO, in my LabVIEW application, I have created an I/O server - Modbus Slave. Using shared variables I write values to specific holding registers on the Modbus Slave.
    The Modbus Master obtains the values from these registers using function code 0x03, read holding register - this works correctly. However, when the Modbus master query registers that I have not defined, the I/O server on the cRIO replies with a register value of 0, instead of Illegal Data Address. It seems like when using this I/O server, all possible Modbus registers is filled with the LabVIEW default value and the slave therefore always will reply with a value even if the register is not used.
    My question is therefore, how can i change this? If the Master query a register that I am not writing to (and is therefore unused), I would like the slave to reply with "Exception Response" code 0x02 - "Illegal Data Address", and not just the value of 0. 
    /Simon

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

  • Mobile module modbus I/O Server

    Hi,
    Is it possible to establish a communiccation with modbus protocol between the PDA (master) and the slave device via WIFI connection?
    I like to do this with configuring the I/O Server, not with the modbus library.
    Best regards,
    Zdenko.

    Hello,
    I am sorry to give you a negative answer to your question.
    I have LabVIEW Mobile module 2009 and DSC  and a PDA target does not support I/O Server.
    I have also installed modbus library, but some functions and proprieties under library's vi s are not supported under mobile target.
    Probabily you could develop very low level code for mobile to implement modbus server, but it's very complicated.
    Regards,
    Emil

  • Is it possible to connect labview with opc server without using NI dsc Module ?

    Hellow sir,
    I want to get data over labview using OPC server and i am not using any dsc module vi (Alams, print, GUI, security).I am using share variable to get data from OPC server to labview. Now i want to deploy that application to third party computer. (where there is no NI software is installed)
    i am using labview 8.6 and 2009.
    Many ? like....
    1) what is the procedure to install that application in third party computer.
    2) Do i need to use my dsc run time licence..?
    waiting for your valuable feed back.
    Thank you.
    CLAD
    Labiew programmer

    Hi, When you connect to NI OPC Server by creating New I/O Server > OPC Client. You will see all registered OPC Servers running on local machine or remote machine. I used KepServerEx from Kepware and LSIS OPC Server from LG with no problems. Just make sure that the OPC server is running.
    Hope it helps
    Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
    Assistant Lecturer
    Mechatronics Department
    Faculty of Engineering
    Misr University for Science & Technology
    Attachments:
    LG.png ‏57 KB

  • Response time between LabVIEW w/DSC module and RSLinx OPC server hosting FlexLogix PLC tags too long

    We are experiencing communication response time delays between LabVIEW with DSC module and RsLinx OPC Server hosting all FlexLogix PLC tags (around 500-600 tags).
    The nominal response time for the system watchdog is < 500ms, but we occasionally have spikes of up to 1.5 seconds once every few days even when the system is idling.
    Changing more than six PLC connected shared variables at the same time from LabVIEW also causes the watchdog response times to spike above 500ms.
    Our watchdog is programmed so that LabVIEW toggles the watchdog bit to 1 as soon the shared variable event detects that the PLC has toggled it to 0. The PLC, however, waits 300 ms until it toggles it.
    Our system:
    Windows XP SP3
    LabVIEW 9 F3
    RSLinx Opc Server v2.54
    Allen Bradley FlexLogix PLC

    What is your update rate set for in the RSLink OPC server?
    You aren't toggling the same flag from both ends are you?
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • LabVIEW 8.6.1 DSC Module and SQL Server Agent

    I had the following system constellation:
    - LabVIEW Professional Dev System 8.6.1 installed (complete)
    - SQL Server 2005 Express
    Since Microsoft's SQL Server 2005 is no longer distributed, I had to install SQL Server 2008 Express on my system, too.
    Everything is working fine, but after installing the 2008 Express version the SQL Server Agent appears in the '2008 instance!
    This is quite good, but normaly the Express editions doesn't contain the Agent...?!
    Since LV8.5 (?) the DSC module uses Microsoft SQL Server Express, right? (--> This is very good, but the documentation of the DSC module is more than bad.!!)
    Is there any context between SQL 2008 Express <--> LV DSC??

    Hi _avr_,
    There's no documentation about LV DSC
    supporting SQL Express 2008 because it's not supported. It may work if
    you were to detach the database and reattach it, but it's something we
    have not tested.
    You are writing, that SQL Server 2005 Express is no longer distributed, however this is a Software which is a part of Installation Pack of a DSC Module. So if you have the DVD for LabVIEW with DSC Module you could install it without any problem. For DSC Module 8.6 we included the SQL Server 2005 Express SP1 on the DVD.
    I do not really now why in your case the Agent is appering. You have right, the SQL Server 2008 Express does not contain any Agent.I do not have any explenation for it.
    NI supports only DSC with SQL Server 2005 Express. The DSC Module 2009 is also working with SQL Server 2005 Express SP1. For Windows 7 SQL 2005 SP3 is recomended. 
    I would suggest you to deinstall the SQL Server 2008 Express.
    Best regards,
    ENIA
    NI Germany

  • DSC Modbus Server

    Hello there,
    I have an upcoming project where I will use DSC and Modbus for the first time.  My sensor network will be Modbus over RS485 but the piece of plant I need to talk to is Modbus over RS232.
    When in a LabVIEW project I create a new Modbus I/O Server, I have the option to select Modbus Serial or Modbus Ethernet. 
    My question is - does Modbus Serial support RS232 and RS485?
    Thank you,
    Martin

    Here are a few more links that you may find useful.
    Connect LabVIEW to Any PLC With Modbus - http://www.ni.com/white-paper/13911/en
    Using Touch Screens with LabVIEW through Modbus Serial Devices - http://www.ni.com/white-paper/4722/en#toc2
    Best Regards
    Paul
    Applications Engineer
    NIUK
    I accept Kudos and BTC Tips :-D
    Address: 1NyXnWf9kdjVzjWcW5w4P1V3b1EY4yXP12

  • LabView 2014 - DSC module with Ethernet Modbus: Error 56

    Sorry,
    I try to connect modbus by Labview 2014 DSC module like this figure, and it occurred error code 56 at "Read Input Registers",
    I have look for many soluctions, but still fail, can someone help me? thank you very much!

    Did you confirm the address and port of your slave device is correct? Also, is your device a modbus master device or slave device?
    I suggest you to read the help first, and then run the corresponding example
    You can run the two example to test if the modbus function is OK. Then you can come back to test your third party device.

  • Programming batch modify properties of shared variables DSC Module

    DSC module to establish a large number of shared variables, you need to modify the property values ​​programmed variables, rather than setting property values ​​when creating variables.  
    DSC module to build tens of thousands of shared variables, alarm limit properties of these variables need to be set after the software is released by the customers themselves, rather than set when you create the variable.  
    So many variables, how programming in the software interface can be set variable attributes?
    Solved!
    Go to Solution.

    请参考http://digital.ni.com/public.nsf/allkb/5292824E278CF8B948257254002DEE60

  • Modbus can't share variables: error -1967353901

    Hi guys,
    I'm using for my first time the dsc module,
    and specially the modbus communication part.
    I've tried on winXP (installed on VMware) the given exemples:
    Modbus Fundamentals.vi and ModbusSimulator.vi work,
    but when i want to build mine, it's going on errors.
     - 1: Error -1967353901 occurred at Shared Variable in P1_server_vi.vi
     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.
     This error or warning occurred while writing the following
     Shared Variable:
     \\My Computer\P1_server_lib\000001
     \\my_ip\P1_server_lib\000001
     - 2: it's running but the values of the shared variables are not shared,
      between the server and the client.
     - 3: when i'm using the library of the given exemples, its working,
      I can even add or remove some variables.
     So i looked the configuration of the given library, and the one
     i've created, to compare them, but they are strickly the same.
     Restarted my PC, run it again still the same errors.
    I've tried too on Win7, (no WMware) none of them work,
    neither the given exemples or my program.
    I've enable all NIs software from the firewall.

    Of course,
    Thanks for the reply, I'll be pleased to get the why of this matter.
    I sent you in a .zip file, two projects and their .lvproj, .vi, .lvlib and .aliases
    You have P1_server which is to simulate the server, and P2_client for the client,
    using just one shared variable (create bound variable from the serve) named 000001.
    An action from the server on the boolean button should occured on client Boolean Led.
    But ...
    Best Regards
    Martin
    Attachments:
    dsc_modbus_LMartin.zip ‏18 KB

  • DSC: Custom IO Server: On Input Change

    I have written a custom IO Server VI using DSC Module.  Using NI DSM, I see that the server status is 'Active'.
    Again using DSM, I change the value of the control that is suppose to trigger the VI to run, but it does not run.
    What am I missing?  I have been successful at creating several Custom Periodic Servers, but this is my first 'On Input Change'.
    Note: I am not using 'shared variable value change notification' in this On Input Change VI, because Lesson 4 of DSC Training leads me to believe that mechanism is not necessary.
    Anyone have examples of both types of custom servers?
    Thanks
    Solved!
    Go to Solution.

    Okay, I got it to work.  Got a new, very simple server code to work.  Then removed original library from project, recreated IO server from scratch, added back into project, and now it is working.
    Would still like to see examples of both types of custom servers to see how to handle error conditions.. Lesson four says 'make sure VI is robust enough to handle/recover from error, but doesn't give examples.

  • 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

  • Programmat​ically configure Modbus server.

    Is it possible to programmatically configure an I/O server (e.g. Modbus Ethernet) in any way other than the Express VI provided with the DSC module? Many of the attributes are "hidden" in the dialog boxes, instead of being easily readable on the block diagram. Additionally, if I want to create a class encapsulating Modbus clients, there seems little ability to write accessors for attributes such as "maximum data points per command" or "first word low in 32-bit data types."
    Any help/thoughts are appreciated. If the functionality doesn't exist, then I hereby submit a feature request.

    I'm learning how to use the Actor Framework to build an application for controlling, monitoring and aquiring data from a large research facility. One thought for creating a hardware abstraction layer is to have a generic "Modbus client" class. Modbus clients all share general characteristics, such as the attribute settings currently rolled up in the Express VI for creating and configuring I/O servers. Certainly, one can imagine setting up each client "by hand," but then you're not saving yourself any work. If you could handle full setup programmatically, then when a new Modbus client object is instantiated, the work load should be lessened. There's also the issue of transparency to someone creating a new object. Since you can't write accessor methods for advanced attributes, the only way to interact with those attributes is via the dialog box, which obscures how the client is configured and subsequently behaves.
    Since I'm relatively new to the OOP stuff, it's possible that I'm overthinking the whole issue and making it harder than it needs to be. It still would be nice to be able to write a method to set the advanced attributes, instead of having to hunt through dialog boxes to find the options. I'm not generally a fan of Express VIs, because I'm often engaged in tasks that are beyond the functionality they provide and they obscure reading of code by failing to provide full disclosure about inputs and outputs.

Maybe you are looking for

  • Problem with Intro to IDVD Help!!!

    I have created an IDVD form Iphoto pictures are great music is good and when I preview its fine. When I burn it and put into the DVD player the last picture of the slide shows up and then right after the intro appears. what am I doing wrong? Help nee

  • Are there any Apps compatible with Aventail VPN?

    My corporate network uses Aventail VPN. I know the Macs are able to access my desktop, but so far I have not seen an iPhone App which does as well and my IS department is not very pro-Apple, or helpful. Are any of the VPN apps for the iPhone compatib

  • Oracle Instant Client 10.1.0.4

    Hello.... I just wanted to know what are the changes maded to the Instant Client version 10.1.0.4. I saw the new version is available for Win32 and we used it extensively so I would like to know the changes.... thanks

  • Java Webstart - Java 7_7 on 32-bit Windows 7  will not run in IE

    Hi, I cannot get javaws running from the browser. it works fine from the command line? any help?

  • Photoshop Elements 10, Organizer funktioniert nicht mehr

    Beim Einschalten von Adobe Photoshop Elements 10, Organizer erscheint ein Fenster mit dem Hinweis " Elements 10 Organizer funktioniert nicht mehr, es wird nach einer Lösung für das Problem gesucht". Darauf folgt: "Das Programm wird auf Grund eines Pr