Immediately write outputs - more on modbus plus performance

more on modbus plus performance
I have more dilemmas considering modbus plus. I'm trying to reduce the unnecessary traffic as much as possible, so I've unchecked "immediately write outputs" in advanced settings for modbus plus hoping that lookout will write to plc only when modbus object is polled. However, it seems that it doesn't happen that way, looks to me like lookout is writing to plc poll or no poll. I need to cut down the traffic because I have delay in system response and I'm considering lookout's share in it.
I have a feeling that making a system with deterministic response (which should be one of mb+ highlights) is quite cumbersome and sometimes impossible.
Can anyone comment on this issue and maybe share ideas for improving modbus response time? Is there anything about modbus plus and lookout on ni.com that I'm not aware of?
Darko

By default, Lookout writes Outputs immediately (without waiting for the poll).  BUT, if you uncheck the "immediately write outputs" setting, it should write only when polled.  If it's not doing this, it's a bug -- can someone at NI verify this? 
Couple of things you can try for improving communication performance:
1. Make sure you're not writing outputs every-so-many polls (unless you really have to).  By default, Modbus Object writes the Outputs every 100th poll -- even if none of them have changed.  Use the Modbus INI settings to change this behaviour:
http://digital.ni.com/public.nsf/allkb/2E64D5CF87CA6A1086256BB30070DC1A
2. If you have some IO points which don't need to be read as fast as others, use a second Modbus object for these with a slower poll rate (but on the same address, etc.). 
3. Use an appropriate update deadband for your analog reads -- you can filter out "noise" from data this way.  Note that the IO are still read every poll, but aren't propagated to the rest of the system unless the deadband is surpassed.
Hope this helps,
-Khalid

Similar Messages

  • Lookout modbus plus performanc​e

    I'm running 9 Schneider Electric PLCs Compact 265 connected to Lookout v5 PC via modbus plus. I have cyclic stalls of transport, each 50 secs or so, which last for 3 or even more seconds. I've tried all the settings there are on modbus object in Lookout, but with no success, only different graph shapes in performance monitor (you can have a look at graphs at the end of mail). Even single PLC on network (with others shut down) freezes the communication for more then second, which is unacceptable since I need to refresh my data at least each 350ms.
    I've considered 3 things:
    1. PLC underperforms
    I've checked scan time in PLCs, they're all running smooth with scan time under 90ms. This time doesn't increase even during modbus peaks, I've reduced watchdog to 100ms and it never triggered. Looks to me like plc has more than enough time for modbus, so plc should not be the problem.
    2. PC underperforms
    Hardly a problem, PC running under 5% most of the time, never goes over 50% no matter what I do.
    3. modbus underperforms
    Statistics show no garbled or timed out frames on any plc, so wiring should be fine.
    PLC uses 130 registers of memory (type 4 – holding register). With all registers back to back (no slack between registers), this should mean that all the memory can be transferred in 2 frames. This also means total data load per sec should be
    9 plcs * 3 refreshes * 130 reg * 2 bytes = 7030 bytes.
    Even with overhead included, this is so little compared to theoretical 120 kbytes modbus plus should be able to perform, so nothing else for me to do but scratch my head.
    I've checked Lookout source for any loops which could initiate some read or write at 50sec cycle, but there's nothing even close anywhere in program.
    Am I missing something? Can anyone tell me why modbus freezes my system?
    Bye everyone,
    Darko
    SVETLOST TEATAR

    Hello,
    It’s been a while since I last checked the forum, but in the meanwhile I’ve resolve the problem.
    The solution lies in modbus.ini and the way modbus object communicates with modbus secondary, an issue not properly covered by help and ni.com. Unless defined otherwise in modbus.ini, modbus object will refresh all of the configured memory points in your plc each 50 or so polls (I can’t remember which is the default value). This can be a problem if the number of memory points is large, because it congests modbus and creates performance stalls.
    You can read more about this here: Lookout Driver Objects - Custom INI File Settings (http://zone.ni.com/devzone/conceptd.nsf/webmain/E​54F75254BBE772786256CFC00700B5F).
    Thanks everybody for joining in.
    Bye,
    Darko

  • Write output to binary file in C/C++?

    How can I write output to a file in binary format instead of ascii?
    Or... if I am using a buffer.. to write a buffer to binary format instead of ascii?
    I am writing a lot of data to a text file and I would like to reduce the size by writing it all into a binary file instead of ascii?
    Last edited by kdar (2012-12-13 14:36:41)

    Basic I/O?
    char buffer[100];
    // C++ style
    ofstream file;
    file.open ("data.bin", ios::out | ios::binary);
    file.write(buffer, sizeof buffer);
    /* C style */
    FILE* file2 = fopen("data2.bin", "wb");
    fwrite(buffer, sizeof buffer, 1, file2);
    A lot of people prefer the old C style functions for binary i/o even in C++ (and iostream for formatted i/o). Writing and readong more complex structures requires some castin, in C++ usually done with reinterpret_cast<char*>(someStructure).

  • String formatting with Write-Output

    I have a FileInfo object that I want to print the full file name member value.
    I tried this:
    Write-Output "Scanning $file.FullName..."   
    However that just prints out:
    "Scanning c:\foo.txt.FullName..."
    What is the proper way to format the FileInfo.FullName using Write-Output (In C#, I would use String.Format)?
    thanks

    Wrap $file.FullName in $(), such as $($file.FullName). Read more by searching for the subexpression operator.

  • ProtocolException: Cannot write output after reading input

    If I use the following code
    this.conn is a database connection while urlConn is a HTTPUrlConnection
    if (String.valueOf(urlConn.getResponseCode()).trim().startsWith("2"))
                   {     this.conn.commit(); }
                   else
                        System.out.println("FAILED BECAUSE " + urlConn.getResponseMessage());
                        throw new MppException(urlConn.getResponseMessage());
                   byteStream.writeTo(urlConn.getOutputStream());I get the following exception
    ProtocolException: Cannot write output after reading input
    if However I change the order and instead use
    byteStream.writeTo(urlConn.getOutputStream());
    if (String.valueOf(urlConn.getResponseCode()).trim().startsWith("2"))
                   {     this.conn.commit(); }
                   else
                        System.out.println("FAILED BECAUSE " + urlConn.getResponseMessage());
                        throw new MppException(urlConn.getResponseMessage());
                   It works fine but in that case there might be a deadloack on the server side since both the client and server in that case try to modify tables on the same db.
    any work arounds???????

    HTTP is a request / Responce based protocole where all the data to be send to the server must be included in the request and then the server send all the data as the responce.
    By the time you read the responce the request is already send and the server have finished processing it. So it is not posible to send more data to the same request.

  • No ISA slot available in PC. How can I use PCI-85 Modbus Plus card with Lookout?

    My application is to communicate with two Modicon PLCs using Modicon's ModBus Plus (PCI based PCI-85) network card inside my PC, and using Lookout as an SCADA software. Since there is no ISA slot available in new PCs, I can not use Modicon's ISA-85 Modbus Plus networc card. But Lookout does not support PCI based PCI-85 card, how can I use PCI-85 card then, with Lookout? Why doesn't Lookout support it? I asked the following question from from the Modicon's representative about it:
    If I purchase Modbus Plus Driver Suite CD (SWMXDS001, 05, or 10 etc),will I be able to use Lookout SCADA software (by the way, it supports standard MB+ prtocol) for my application? If yes, can I use any version of an
    y of the ISA, PCI, or PCMCIA based MB+ card?
    His answer was:
    The Modbus Plus Driver Suite will talk to any version of card, PCMCIA, ISA, and PCI. The question now is will the SCADA package you are
    planning on using be able to talk to the Modbus Plus Driver Suite? You must contact National Instruments and ask them if they support Modbus Plus, and if
    they used the MB+ system developement kit to develop their product. Or if they wrote their own MB+ drivers, do they work with Modicon hardware?

    Hi,
    currently Lookout does not support the PCI-85 card. The only card supported for Modbus Plus is SA-85. Please see for further information:
    Where can I Find Drivers for Communicating to PLCs, RTUs, and Other Industrial Hardware?
    How to configure the SA-85 card for Modbus Plus
    Hope this helps
    Roland

  • More than one service Performer per sales order position

    Hallo ByD community
    We are using service type "Service - time and material" in our sales orders and we are using the integrated time recording in the self-service (time sheet) to track actual times for an sales order. For that you have to assign a service performer in the sales order position, so that the person is able to enter acutal times for this sales order Now it can happen that not only one person, but a team (or two or more people) has to record times for this sales order position.
    is that possible and if not what would you suggest.
    F.e.. in project management you can activate time recording for a project task for several people.
    Thank you :-)
    BR

    Hi  lisa ,
    It is not possible to enter more than one service performer for a service in sales order .
    But you can  perform the service with two people and have two service confirmations.
    The time entered in service confirmation will be reflected in invoice only(if time and material).
    Also you cannot enter the time sheet with respect to sales order , it is only valid for project task and
    and time types.
    Regards,
    Harish

  • Calculate the size(in bytes) that will be displayed to the console by command Write-Output

    Is there some way to check the size(in bytes) of the output that will be displayed to the console using Write-Output command. I want the console to display only the first 1024 bytes of the objects output.

    Hi Sachin,
    in that case let me add an example on how to read content from a file that may be or may not be a text file:
    $string = [System.Text.Encoding]::UTF8.GetString([System.IO.File]::ReadAllBytes("D:\example.txt"))
    Theoretically, the "Get-Content" cmdlet ought to do the same, however I have occasionally experienced different results.
    You can choose to not convert it to string and just print the bytes too (or choose another encoding of your preference). Remember, a single letter usually uses 2 bytes, thus reading the first 1024 bytes from a file you converted to text would mean printing
    the first 512 letters.
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • Can I make SQL*Plus output more readable like this ?

    Version : 11.2
    Can I make sql results more readbale like below using SqlPlus ? ie. enclosing result columns neatly in a table like structure.
    +------------+------------+
    | department | Avg Salary |
    +------------+------------+
    | Finance    | 63863.2479 |
    | Hardware   | 66308.3700 |
    | HR         | 66402.6549 |
    | QA         | 66012.7119 |
    | Software   | 61928.2700 |
    | Switch     | 66413.2231 |
    +------------+------------+I think this is from MySQL or Postgress (the below doesn't anything about that)
    http://guylichtman.com/db-spring06/hw1_solution_sql.txt
    If not possible using SQL*Plus , can this be done using some other tools like PL/SQL developer (which we have) ?
    Not a business case . I just want to send some SQL training stuff to my friend.
    Moreover , during posting in OTN, it would be better to post some sample data , so that volunteer gurus can quickly understand what they are looking at.

    Hi,
    GarryB wrote:
    Version : 11.2
    Can I make sql results more readbale like below using SqlPlus ? ie. enclosing result columns neatly in a table like structure.The default output is in a table-like structure, with rows and columns, and with the columns aligned. It looks like you want extra lines around those rows and columns.
    +------------+------------+
    | department | Avg Salary |
    +------------+------------+
    | Finance    | 63863.2479 |
    | Hardware   | 66308.3700 |
    | HR         | 66402.6549 |
    | QA         | 66012.7119 |
    | Software   | 61928.2700 |
    | Switch     | 66413.2231 |
    +------------+------------+COLSEP is an easy way to get some of what you want:
    SQL> SET  COLSEP  "  |  "
    SQL> SELECT * FROM scott.dept;
        DEPTNO  |  DNAME           |  LOC
    ----------  |  --------------  |  -------------
            10  |  ACCOUNTING      |  NEW YORK
            20  |  RESEARCH        |  DALLAS
            30  |  SALES           |  CHICAGO
            40  |  OPERATIONS      |  BOSTONSQL*Plus can also generate HTML output, but you have to use a browser, not the SQL*Plus interface, to get see the output formatted.
    I think this is from MySQL or Postgress (the below doesn't anything about that)
    http://guylichtman.com/db-spring06/hw1_solution_sql.txt
    If not possible using SQL*Plus , can this be done using some other tools like PL/SQL developer (which we have) ?
    Not a business case . I just want to send some SQL training stuff to my friend.
    Moreover , during posting in OTN, it would be better to post some sample data , so that volunteer gurus can quickly understand what they are looking at.If we could get everyone on this forum to post any kind of formatted output, that would be wonderful! Personally, the extra lines wouldn't help me any, however.

  • Cannot write negative values on modbus server on cRIO 9068

    Hello everybody,
    I'm trying to move a project from a cRIO 9114 platform to a cRIO9068, the reason is for a heavy difference in terms of CPU power, memory, FPGA performance etc..
    On real time side I deploy a TCP modbus server, and I publish just I16 data.
    The problem comes when the program try to write a negative value in a variable binded on modbus. That variable is in the same format (I16), so the program could write negative values between 0 and -32768, but everytime the modbus force the value to zero.
    I tested the modbus also with "NI Distribuited System Manager 2014" but still cannot write negative values on I16, but I can if I consider data as I32!!!
    (see enclosed files)
    Moreover I deployed a modbus server on my PC and in this case all goes right.
    Some more information:
    I'm working with labView 14.0f1.
    On cRIO are installed "Labview RealTIme 14.0.0" and "Modbus I/O server 14.0.0".
    I tested the feature on three different cRIO 9068 with  same result.
    I'm thinking that's something wrong with cRIO 9068, can somebody help me?
    Thank you
    MZ
    Solved!
    Go to Solution.
    Attachments:
    Force negative value I16.jpg ‏48 KB
    Force negative value I32.jpg ‏48 KB

    marcello.zoppetti wrote:
    How can I track the CAR?
    Just watch for it in the new release notes for a version of LabVIEW and the patches.  NI does not make their bug reports public.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • SQL Developer vs. SQL*Plus Performance???

    Hi,
    DB: Oracle 10.2.0.3.0
    SQL Developer: 1.2.0
    SQL*Plus: 10.2.0.3.0
    I am running the same query once in SQL Developer (Response time 10 sec.)
    The same query in SQL*Plus takes over 20 Minutes.
    SQL*Plus is using SQL*Net right?
    Is that the reason?
    Thanks

    Hi,
    how can I check for SQL Developer?
    Does SQL Developer use SQL*Net also?
    I changed the arraysize to 1000
    but does not see any performance gain.
    The query still taking more than 6 minutes.
    The same in SQL Developer runs within 10 seconds!
    Thanks

  • Ckeck Writer(XML), more than 1 check per page

    Is it possible to print more than one check per page using check writer (XML)?. Preview looks fine (3 checks per page) but the output of the process that actually prints ( Payroll File Reporter ) keeps sending 1 check per page.
    Thanks in advance,
    Jose

    To do a multiple records per page merge you use only one set of placeholders, in the upper left position. ID will duplicate everything as many times as will fit according to the spacing you set up in the merge options.

  • SQLIO - Write test shows reads only in Performance Monitor

    So I'm running write tests against a SAN using SQLIO. In parallel I'm watching the machine using Performance Monitor. What I see is that during write tests only reads are shown in
    PerfMon. Can anyone help me to understand? I discussed SQLIO results with some infrastructure vendor and the results didn't build up a lot of trust in that tool...
    Thomas Pagel

    Hi Thomas Pagel,
    I do a test in my environment, it shows well as the following screenshot.
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
    For more information, there is an example about SAN performance tuning with SQLIO, you can review the following article.
    http://www.toadworld.com/platforms/sql-server/w/wiki/10406.san-performance-tuning-with-sqlio.aspx
    Regards,
    Sofiya Li
    If you have any feedback on our support, please click here.
    Sofiya Li
    TechNet Community Support

  • Jre 1.5 waitfor hangs windows xp if output more than 17 lines

    I have seen many postings on the "waitfor" part of an external process. I am too having issues with it. For some reason when there is more than 17 lines of output, "waitfor" hangs. I am executing a simple external command to prove the point. I run the command c:\rundir.bat. All this program does is an "echo hello" multiple times (I alter the number of times to find the threshold).
    Any ideas?
    Code snipit:
    Command is an array of 3
    cmd[0] = "c:\windows\system32\cmd.exe"
    cmd[1] = "/C"
    cmd[2] = "c:\rundir.bat"
    p = Runtime.getRuntime().exec(cmd);
    rc = p.waitFor(); // Hangs forever if more than 17 lines of output.
    if (rc != 0) {
    success = false;
    br = new BufferedReader(new InputStreamReader(p.getErrorStream()));
    else {
    success = true;
    br = new BufferedReader(new InputStreamReader(p.getInputStream()));
    }

    1) Search these forums. This problem has been asked over and over again.
    2) Read the entire System.exec() and java.lang.Process javadoc. The situation you need to prevent is well-documented.
    Briefly put: the error and output streams of the external process must be timely read; failure to do so when executing a process which writes to either or both of these streams can cause deadlock, since writing to a stream may block and the operating system provides limited buffer space for these streams. You will need to use multiple threads.

  • Spool output more than 255 characters

    Hi ,
    i am running a ALV report in background whose output is more than 255 characters . but spool is showing only 255 charcters.
    Do we have any setting to change to display all characters.
    Or any OSS notes that can be applied.
    Thanks & regards,
    Sonika Ahuja

    Hi,
    You need to change the Format Type through SPAD transaction. The Format Type decides the number of rows and columns per page. By creating a new format type as per your requirement would solve the probelm.
    Also, in the Report declaration, change the Line-Size to 300 or as per the width of your output.
    For further details pls. refer this thread :
    Re: Spool List output display > 255 char when the rpt is run in Background
    Best regards,
    Prashant

Maybe you are looking for