jm (Customer) asked a question.

Output Module Pin Status

I see no way to get the status of output pins on an output module in the API. Am I missing something? For example, I am using a P1AM-100 with P1-15TD2 output modules and at different points in my program I want to see what outputs are on. I did a little digging around in the header files and didn't see an obvious way to modify them either without knowing more about communication between modules. I know I could keep track of them programmatically but it seems better and more error proof to get it "straight from the horse's mouth" as they say.


  • FACTS_AdamC (AutomationDirect)

    Hey @jm (Customer)​ ,

     

    For timing sake, like @Garry (Customer)​ said, it is better to keep track of them in your program yourself. However, using the readBlockData function, you can read the state of any output or input module.

    This example shows reading and writing discrete output modules via block data. You will just need to adjust your indexes according to what point you're interested in. I'm happy to help if you get stuck on the parameters!

     

    Thanks

    Adam

    Expand Post
    • Garry (Customer)

      Thanks, Adam,

      Learn something every day!

      Garry