Brutzy (Customer) asked a question.

Serial Connectivity Trouble

Windows 10, Device Manager Shows ... USB Serial Device (COM6) ok

Arduino IDE: Tools _ Board _ P1AM-100 highlighted ok

Tools _ Serial Monitor _ error message _ "This channel is not valid"

Using Productivity Blocks example blinkOutputPoint.apb

IDE Compile _ Found upload port: COM8 ?

I keep changing _ Tools _ Port _ between Com8 and Com6?

Does baud rate matter?

 

#include <P1AM.h>

#include <P1_HSC.h>

 

void setup()

{

 while(!P1.init())

 {

 }

 

}

void loop()

{

 P1.writeDiscrete(HIGH, 1, 13);

 delay(5000);

 P1.writeDiscrete(LOW, 1, 13);

 delay(1000);

}

 

 


  • FACTS_AdamC (AutomationDirect)

    Ah that's your issue then. The P1-15CDD2 has 8 input channels and 7 output channels. Input and output channels are numbered separately on combos, so if you are trying to address output channel 5, you can just write 5 e.g. P1.writeDiscrete(HIGH, 1, 5);

     

     

     

    Selected as Best
  • FACTS_AdamC (AutomationDirect)

    What modules do you have in your base? And what order are they in?

    That message usually appears when you're referencing a channel that is higher than is available in a module e.g. writing to channel 13 in an 8 channel module such as the P1-08TRS.

  • Brutzy (Customer)

    Left to right

    P1-01AC Power Supply

    P1AM-GPIO

    P1AM-ETH

    P1AM-100

    P1-15CDD2 (IO Card)

    • FACTS_AdamC (AutomationDirect)

      Ah that's your issue then. The P1-15CDD2 has 8 input channels and 7 output channels. Input and output channels are numbered separately on combos, so if you are trying to address output channel 5, you can just write 5 e.g. P1.writeDiscrete(HIGH, 1, 5);

       

       

       

      Selected as Best