Nebul0us (Customer) asked a question.

How can I read data from an Excel spreadsheet with a P3-550 PAC controller?

I am using Productivity 3000 programming suite with a P3-550 controller. I need to read data from an Spreadsheet. Can this be done? Thanks in advance for helping!


  • Garry (Customer)

    Hi Nebul0us,

    Here is a post that will use Excel to retrieve data using Modbus TCP. (Ethernet)(VBA)

    HOW TO IMPLEMENT MODBUS TCP PROTOCOL USING VBA WITH EXCEL

    I would recommend using a program like AdvancedHMI. Save the data to a database and then view the data in the database.This will allow you to have multiple PC with excel to link to you data.

    PRODUCTIVITY 1000 SERIES PLC ADVANCEDHMI MODBUS TCP ETHERNET COMMUNICATION

    I hope this helps you out.

    Regards,

    Garry

     

    Expand Post
    • Nebul0us (Customer)

      Thanks for the link, I check it out. We are using Wonderware for our HMI/SCADA system with Modbus comms.

    • Nebul0us (Customer)

      So the link looks like it is for reading PLC data and writing that data to the spreadsheet. I need to do the opposite of that. I need to read the spreadsheet data and write it to the PLC. Any ideas?​

      • Garry (Customer)

        Hi Nebul0us,

        In the code you will see the write commands. It is commented out because I did not need them for my sample.

        1. Write the information
        2. 0000: Transaction Identifier
        3. 0000: Protocol Identifier
        4. 0009: Message Length (6 bytes to follow)
        5. 01: The Unit Identifier
        6. 16: The Function Code (read Analog Output Holding Registers)
        7. 0000: The Data Address of the first register
        8. 0001: The number of registers to write
        9. 02: The number of data bytes to follow
        10. 0030 The number to put into the register

        Regards,

        Garry

        Expand Post
  • kewakl (Customer)

    I wish that AD would release a BORG API for PxK.

    The structure and implementation is dirt-simple, but is not publicly available/supported..

  • John3049 (Customer)

    If you want to stay away from Modbus, maybe try DataWorx 2020 Standard from BizWareDirect. AD use to have a video using a DataWorx P3K instruction (software from BizWareDirect) from the Productivity programming suite but have since taken it down because BizWareDirect didn't offer upgrades to the newer versions of Windows. That has now changed, but I do not think that they have upgradded DataWorx P3k yet.

  • Cenabby (Customer)

    I've done something similar using CSV files saved from Excel and pulling them into the P3-550 through the SD card. One trick that helped was figuring out how to separate date and time in Excel first, especially if you're logging timestamps. You can use Excel formulas like INT for dates and MOD for time. Once split, it's easier to parse each part in the PAC using standard string handling.