Modbus ip shared variable network failure

I am using lab view 8.6 DSC module to communicate to a watlow system which contains five watlow 96 controllers and an EM gateway.  I have created shared variables for the process temperatures and setpoints for each of the five controllers using watlow modbus register Numbers with a 400001 offset.  I have also created shared variables for Updating,CommFail,UpdateNow,and UpdateRate which where predefined. I have error when starting the VI if the SV  has been  dragged and dropped into the block diagram. The message is  Error -1967353902 (The Modbus I/O server failed to receive any response from the Modbus slave device.) occurred at SV in vi. If I bind a variable in the VI to this same SV the error does not occur but the variable cycles between Good, Network Failure, No known value, and device failure as stated in the variable manager watched variables.  The Updating, CommFail and UpdateRate all have a consistent Good in the quality column of the variable manager.  UpdateNow has X in value, type, timestamp, and quality columns.  CommFail and Updating does cycle between true and false randomly.  I have tried a third party software called SpecView 32 demo to see if the commincation with the modbus system is not working and I can create five watlow controlers on my screen and direct them to the ip address along with a unit address and the system works without faults.  This leads me to believe the commincation bewteen the SV Engine and the IP address is not correct.  HELP Please. 
Robert Jensen
UND EERC

If your application can deal with it I would recommend staying clear of the 'Networked Published' option.
When I started my Modbus development on cRIO....I left it enabled, and with ~100 shared variables on a 9074, the CPU was railing, and I saw a buffering behavior on the shared variables (which was not desirable in my application).
In my application I am using the old modbus library (as apposed to the new API) for cRIO to slave comms, the cRIO being the master.
I am also using the IOserver making the cRIO a slave to an external SCADA - and it passes essentially the same data arrays as I use on the modbus library for my local HMI [Not an NI product].....Which is two full Modbus frame writes (@ 120 words each, and about 60 words more for ~300 words outbound from the cRIO).
The IOserver slave was a recent addition and did not add much to the CPU load - although only 16 bytes is high speed, the balance of the total word package is at either 1 second or 3 seconds.
So, in my experince, the 'Networked Published' option adds significant CPU loading (on entery level cRIOs) YMMV.
I am huge fan of the shared variable engine (some at NI were pusing the CVT, and TCE etc...). However most of my shared variables are not the Networked Published variety (excepting local module channels) those have remained networked published for DSM (Distributed System Manager) use.

Similar Messages

  • Read LabVIEW shared variables ( network variables?) with VB6

    Hi, i need to read some LabVIEW shared variables (network variables?) using a VB6 program.
    Is it possible?
    I think that yes, using Measurement Studio for VB6 but I don't know how and I haven't found information in the  Measurement Studio for VB6 help file
    Could some one send me a program example or explain me how it is possible to read LabVIEW shared variables fromVB6?

    Hello quintella,
    To be able to interface with LabVIEW
    Shared Variables with Visual Basic 6 you will need to use NI Measurement
    Studio, which ships with examples on how to use VB6 with DataSocketing. Apart
    from Data Sockets, if you are using Measurement Studio 8.1 or higer, with the
    Network Variable Library introducted in NI Measurement Studio 8.1, you can read
    and write to shared variables in ANSI C, Visual Basic .NET or Visual C#. (http://zone.ni.com/devzone/cda/tut/p/id/4679)
    Here you have two links where you can
    find more information about how to use the datasocket option. In addition, there
    are several examples included in Measurement Studio with Network Variables and
    Datasocket.
    http://forums.ni.com/ni/board/message?board.id=230&message.id=2945&requireLogin=False
    http://forums.ni.com/ni/board/message?board.id=230&message.id=3324&requireLogin=False
    Regards,

  • Modbus and shared variable performanc​e in large applicatio​n

    Hi all,
    I am preparing to work on an application which is going to reading from up to 500 Modbus input registers on a CompactRIO over Modbus Ethernet using the LVRT Modbus IO Server implementation.  I've put together some minor test VIs on the local network to test the Modbus connectivity and understand in the shared variable minding mechanism.
    To save potential headaches in the future, do you all have any best programming/proejct management practices for using high channel count Modbus applications?  Has anyone done high channel count testing (similar to the link below) but for shared variables bound to a Modbus I/O Server?  Any caveats I should keep in mind?
    Performance Benchmarks for Network Published Shared Variables
    http://www.ni.com/tutorial/14675/en/
    Thanks,
    Chris
    d2itechnologies.com

    If your application can deal with it I would recommend staying clear of the 'Networked Published' option.
    When I started my Modbus development on cRIO....I left it enabled, and with ~100 shared variables on a 9074, the CPU was railing, and I saw a buffering behavior on the shared variables (which was not desirable in my application).
    In my application I am using the old modbus library (as apposed to the new API) for cRIO to slave comms, the cRIO being the master.
    I am also using the IOserver making the cRIO a slave to an external SCADA - and it passes essentially the same data arrays as I use on the modbus library for my local HMI [Not an NI product].....Which is two full Modbus frame writes (@ 120 words each, and about 60 words more for ~300 words outbound from the cRIO).
    The IOserver slave was a recent addition and did not add much to the CPU load - although only 16 bytes is high speed, the balance of the total word package is at either 1 second or 3 seconds.
    So, in my experince, the 'Networked Published' option adds significant CPU loading (on entery level cRIOs) YMMV.
    I am huge fan of the shared variable engine (some at NI were pusing the CVT, and TCE etc...). However most of my shared variables are not the Networked Published variety (excepting local module channels) those have remained networked published for DSM (Distributed System Manager) use.

  • Shared Variable: Server Failure

    I'm binding Labview 8.2 Shared Variables to Fieldpoint channels, using OPCFieldPoint Server. The OPC Server works properly, i can connect to it using Server Explorer 2.4.1 and see all the channels (though i had to do a repair installation of Fieldpoint 5.0.1 to obtain this!). But Shared Variables bound to OPC Items don't work, i get "Server Failure" error both in Variable Manager and in project VIs.
    Fieldpoint channels are visible in MAX, and readable using direct Bind to Source. Just OPC and NI Variable Engine don't seem to talk to each other, though everything is on the same machine. I have even set up the SVE as explained in http://digital.ni.com/public.nsf/websearch/8719713F089653C1862570F10074E06B?OpenDocument and set an administrator account (do administrators always have DCOM privileges?).
    Thanks for any help!

    With this kind of "intelligent" FP, you don't need to use OPC!
    You can create your variable and write in it in the field point, and read it from the PC, as you can see in the example picture i attached.
    You do this simply using the variable engine.
    Ciao!
    Attachments:
    example.JPG ‏113 KB

  • Protect acess to shared variable network

    Hi,
    I have a network with applications on several PCs and I used variable of type network-published for communicate between them.
    If somebody will do one conection with my network, because there are possibility of conection with my switch, then i can't protect my application.
    I want give enable at some variables that everybody can have acess, and another one variables disable acess.
    So I want share some variables of my application but not all.
    Thank you in advance

    Thaks Christian
    I found the next link
    http://zone.ni.com/devzone/cda/tut/p/id/3322

  • SLOW PERFORMANC​E OF SHARED VARIABLES

    Hello,
    We have developed application in LabVIEW 8.6.1 for testing mechanical equipments using cRIO 9074 (Real Time controller).
    In this application we have used shared variables (Network published) for communications between Real Time controller and Host PC. All shared variables are deployed on Host PC.
    Now we want to access the same application(Host PC application) from Tablet PC through wi-fi connectivity.
    We have created two seperate .exe to run the application on Host PC and Tablet PC.Shrared variable response for Host PC .exe with RT controller is good,but when we run Tablet PC .exe then response is sluggish(slow).
    In this case we create shared variables on Host PC (Network published) and tying to access it from Host PC and Tablet PC.
    In our application,  
    1)Both Host and Tablet PC operate on Windows XP.
    2)Programs on Host and Tablet PC are identical.
    3)Both PC's are on same subnet.
    Please provide appropriate help on this issue.
    Thanks in advance....
    Sachin 

    Have you seen this?

  • Labview 8.2 can't write shared variable

    Hi!
    I developed LV 8.2 program using shared variable (network published) variant type. After extension of variable the vi charased after writing value in shared variable. If i changed shared variable from network published to single proces type the vi working OK.
    Attachments:
    problem.jpg ‏23 KB

    Hello,
    I have created a network published shared variable of type variant, and successfully written to and read from it.  Can you also post a snipet of your code which reproduces the problem?
    General things to try in case include:
    1. undeploy and redeploy the shared variable.
    2. repair your LabVIEW installation - this will repair the variable engine, and I know of at least one case where this helped after it was corrupted.
    I hope this helps!
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • Problems writing to network published shared variable hosted on rt (set as modbus slave for crio)

    Hello Ni Forums
    This is my first post on this forum and I have been using labview for about 8 months now
    I have a problem regarding writing data to modbus registers through an i/o server set as a modbus slave for my 9074 hardware.After I have completed building project and deploying the variables and following instructions from here , it yields no result but a line zeros. I have the Ni DSM open and modbus master setup to see whether the data is actually being read/written from the respective sides which both yield the same line of zeros as well.  What I am actually trying to write to is an array of single precision floating data. The registers are structured from ranges F40000-F46534 for 10 elements or have them for range AF40001L1-AF46534L1 of item AF40001L10 where it is an array of length 10. (Referenced ranges here)
    I know 1 thing for sure, the modbus connection works and is ready for data requests, I tested this through NI DSM and manually set data for and my master received them . 
    System and Project specifications
    Windows 7 OS
    Labview Full Development System 2011
    No Labview DSC module but I am using the real time module as referenced by one of the documents
    This project is a real time application with fpga mode (not scan interface mode)
    The master and slave are the same subnet and network
    Modbus Connection Type: TCP
    9074 compact rio 8 slots
    9234 module x3 
    9221 module x1
    9472 module x1
    Shared Variable Engine service running on windows os and rtos system 
    Used this  guide to learn about the modbus protocol as I searched all over the internet to learn about modbus 
    I already having Modbus IO Server software installed on the crio through ni max version 1.8 for NI RIO 4.0
    attached file(s)
    Image of Crio software specifications
    Image of the Data being written into variable in rt block diagram
    Short Version of the problem: Why is the io variable not being written into with properly converted data?

    The data can have zeros but not all of them will be zeros and I have another program (on local computer for database storage)that is recieving the same data through TCP and they are not zeros. 
    If a machine is running and is active then the data that will be collected should not be zero , it should infact  be some analog value > 0.
    I will look into the function you described
    How do you view the errors in the IO server subfolders ?
    Is it the modbus register called error status that returns an error code if so that value is currently 0 
    Regards mzamstl
     

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

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

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

  • CRIO and ni 9234 modules not working or communicating through fpga with accelerometers, fpga connected to real time application which is also connected to shared variables linked to modbus slave

    Hi,
    I have a compact rio which has a 4 way chassis attached to that chassis is three ni9234 modules they are linked using fpga to a real time application then using shared variables in the low speed loop that are linked to a modbus slave to communicate with dcs, the ni 9234's have accelerometers connected to them with iepe ac coupled option on the c modules, my problem is the real time application seems to be running okay even when power loss occurs it restarts with no problem and the fpga writes to the portable hard drive bin files fine but without a accelerometer connected I get low noise readings as soon as I connect a accelerometer to any one of the 10 outputs it just goes to a fixed number (0.03125) as soon as disconnect it again it reverts back to reading noise, I have run a scan on the modules and only get a spike when I connect or disconnect the accelerometer, I have tested the voltage at the pins of the module and I get 22 volts dc which makes it more likely that the hardware is not the problem but a software is maybe causing this to hang-up, I attach project and files for your perusal. I also carried out a new project which in scan mode directly linked the module input to shared variable and the same scenerio again. Help would be much appretiated. 
    Many thanks
    Jason
    Solved!
    Go to Solution.
    Attachments:
    logger 2plusmodbus2.zip ‏679 KB

    Whren using waveform acquisition with the 9234s we recommend the following FPGA and RT template.
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/209114
    it can be extended as a data logger with:
    http://zone.ni.com/devzone/cda/epd/p/id/6388
    or using shared variables combined with scan engine
    http://zone.ni.com/devzone/cda/tut/p/id/9851
    The FPGA in all of these, as well as the RT framework have been used successfully by 1000s of users.  I would recommend giving these a try. 
    Preston Johnson
    Principal Sales Engineer
    Condition Monitoring Systems
    Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
    National Instruments
    [email protected]
    www.ni.com/mcm
    www.ni.com/soundandvibration
    www.ni.com/biganalogdata
    512-683-5444

  • Problems with communication across a network using shared variables

    I have two programs(projects) running on two different computers connected with a LAN. I am using LabVIEW 8.0, and the DSC-module. The program on one of the computers have measurements that I want to collect and show on the program running on the other computer on the network. I choose the indicator where I want to show the data, select ''Properties'', ''Data binding'', ''Shared Variable Engine (NI-PSP)'', ''Network Items'' and then browse for a Network...but the problem is that in my ''Network Neighborhood'' There is only one computer...and that is the one I am one...not the computer on my Network that I want to communicate with....
    Have anyone any suggestions on how to solve this?
    Kind regards Mari

    Mari,
    Check this link regarding trouble shooting network-published shared variables:
    http://digital.ni.com/public.nsf/websearch/6E37AC5435E44F9F862570D2005FEF25?OpenDocument
    This might be a firewall issue, so I would check that first.
    Frode

  • Polling variables using Modbus IP and labview 8.2.0 shared variables

    I'm using shared variable in order to read/write register on a Watlow PM controller over Modbus IP standard. Once I make a change to FP control, the shared variable polling starts and I no longer get update of any controls or indicators on the FP.
    Just wondering if this is an LV 8.2.0 issue and if any of this is addressed in LV 8.5?
    Thx ahead of time
    richjoh

    Hi richjoh,
    If I understand correctly, there are two issues to address: the status of the UpdateNow shared variable and the fact that your controls and indicators are not updating. 
    When you right-click on UpdateNow in your project and select Properties, what is the data type listed there?  Is it bound to one of the other shared variables that has a value in Variable Manager?
    After changing a control on the front panel, do you continue to see the values changing in Variable Manager even though the controls and indicators do not update on the front panel?  Do you see the same behavior regardless of which control you change? 
    Thanks for the additional information. 
    Jennifer R.
    National Instruments
    Applications Engineer

  • My project writes accelerome​ter data to usb drive but shared variables do not communicat​e with modbus

    Hi there,
    I have got a program that reads input from 3 off 9234 modules on a cRIO, the idea of the program is to read this data and save it in a bin file to a connected usb hard drive, the program also uses shared variables to connect the max signals from the 9234 then send thm to a modbus slave, my problem is that althought I am now getting the correct data on the usb drive I am not getting anything down the modbus link, I attach the program for you to see, all the shared variables are on the rt low speed loop, any help would be most grateful.
    Many thanks
    Jason 
    Solved!
    Go to Solution.
    Attachments:
    logger 2plusmodbus2.zip ‏679 KB

    Hi Jasonh,
    Thanks for posting your code! Due to the lack of comments on the code, would it be possible to direct me to where it sends the code to the modbus slave please?
    This tutorial on How to turn a RT Target into a Modbus Slave using IO Servers may also be of some help.
    Kind regards,
    Tori
    Student

Maybe you are looking for