jgderousse (Customer) asked a question.

Fastest method to log encoder data

I have a BRX plc connected to 2 Sureservo drives using modbus RTU. I need to log data from 2 encoders every .025 seconds for a period of 60 seconds (around 4400 events). What is the most efficient way to do this. Do I open a file and write to it? Save each event to a register?

This device is also connected to a PC and using Ignition software. I am assuming at this point that it would not be fast enough to use it for the logging.

Thanks for any help

Joe


  • ADC_Tech_03 (AutomationDirect)

    Because of the high sampling rate you would need to store the data in and array of memory locations, such as N0-N40 for example. Then you could use the FILELOG instruction to drop the data into storage every second. Every second is the fastest rate at which you can write to storage.

    • HOST_franji1 (HOST Engineering)

      You can use FILELOG with your own interval. It has two modes of execution - enabled and log at a fixed interval, or edge triggered, to log on ANY event, including non-standard entervals (like 25ms).

       

      Just set up a 25ms Timer. T0.Done driving your EDGE triggered FILELOG to the RAM Drive. Then use FTP or EMAIL to send the file???

  • jgderousse (Customer)

    Is there a particular reason you chose a signed word location instead of a unsigned (V0-V40) location?

    • ADC_Tech_03 (AutomationDirect)

      I chose signed as an encoder might involve of a + or - direction. However other memory locations could work as well.

  • HOST_franji1 (HOST Engineering)

    DMLOGGER could work even better. I guess I don't remember all the cool features 😁

     

    You can log to a file on your PC using DMLOGGER. Details are in the Help on how to do that.

    • HOST_franji1 (HOST Engineering)

      Yeah, look at the Do-more Logger Utility help topic DMD0283 - it talks about how it can receive packets from your PLC and write them to a file on your PC.

      • jgderousse (Customer)

        I setup the dmlogger and put it on a 50ms timer (ST6). Below is the result. It seems the interval is not very consistent, sometimes 1ms or 80ms. I may have to go another route if this is typical

         

        10.0.0.31 Port 29298(0x7272),03/26/26 09:25:23.017 ,"42444 "

         

        10.0.0.31 Port 29298(0x7272),03/26/26 09:25:22.943 ,"42334 "

         

        10.0.0.31 Port 29298(0x7272),03/26/26 09:25:22.941 ,"42252 "

         

        10.0.0.31 Port 29298(0x7272),03/26/26 09:25:22.862 ,"42169 "

         

        10.0.0.31 Port 29298(0x7272),03/26/26 09:25:22.783 ,"42068 "

         

        10.0.0.31 Port 29298(0x7272),03/26/26 09:25:22.781 ,"41985 "

         

        10.0.0.31 Port 29298(0x7272),03/26/26 09:25:22.706 ,"41881 "

         

        10.0.0.31 Port 29298(0x7272),03/26/26 09:25:22.633 ,"41795 "

         

        10.0.0.31 Port 29298(0x7272),03/26/26 09:25:22.632 ,"41712 "

         

        10.0.0.31 Port 29298(0x7272),03/26/26 09:25:22.548 ,"41624 "

         

        10.0.0.31 Port 29298(0x7272),03/26/26 09:25:22.482 ,"41514 "

         

        10.0.0.31 Port 29298(0x7272),03/26/26 09:25:22.481 ,"41430 "

        Expand Post
      • HOST_franji1 (HOST Engineering)

        If that timing is critical, the FILELOG to a RAM Drive file and a 25ms TMR would give you very consistent log events.

      • HOST_franji1 (HOST Engineering)

        As an exercise, I wrote StartLog PROGRAM code block that logs some data every 25 ms to the RAM drive.

         

        Log25ms1

10 of 23