Announcement

Collapse
No announcement yet.

P1-15CDD1 Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • P1-15CDD1 Help

    Hello,

    I am trying to work with a P1-15CDD1 unit just using the example input and output codes that are given to learn on how to send a high then low voltage. I have 0V at pin 1 and 18, 24V at pin 10, and pin 11 connected to pin 2. I am seeing the pin 11 LED light up then go dark which follows the code. However, I am not seeing any variation in the actual voltage output and am just getting a solid glow in pin 2 LED. Is my code or wiring to blame for this?

    Code:
    #include <P1AM.h>
    
    void setup(){ // the setup routine runs once:
    
    Serial.begin(115200); //initialize serial communication at 115200 bits per second
    while (!P1.init()){
    ; //Wait for Modules to Sign on
    }
    }
    int input;
    void loop(){ // the loop routine runs over and over again forever:
    
    P1.writeDiscrete(HIGH,2,1);
    delay(1000);
    input = P1.readDiscrete(2,1);
    Serial.println("input value ");
    Serial.println(input);
    P1.writeDiscrete(LOW,2,1);
    delay(1000);
    input = P1.readDiscrete(2,1);
    Serial.println("input value ");
    Serial.println(input);
    }

  • #2
    Check your wiring pin 18 should be 24 VDC + not 0 V

    Comment


    • #3
      From the wiring diagram it seems like pin 10 and 18 should not have the same voltage though?

      Comment


      • #4
        Since this module is a combo module the first 8 inputs can be wired as sinking or sourcing, the 7 outputs are sinking only. Outputs must have 24vdc on pin 18 and 0vdc on pin 10.
        Click image for larger version

Name:	module.png
Views:	60
Size:	69.8 KB
ID:	129265
        Last edited by ADC_CommTeam02; 03-11-2020, 09:59 AM.

        Comment


        • #5
          I made the adjustments you mentioned above. I have 0V on 1, and 10. 24V on 18. and pin 11 connected to 2. I am still seeing the blinking light on 11 however I am still not seeing any variation (stays at 0V) in the voltage reading and pin 2 is now only showing 0V without variation. Any ideas on why I am not getting a HIGH and LOW change like the code suggests?

          Comment


          • #6
            Originally posted by kstandke View Post
            I made the adjustments you mentioned above. I have 0V on 1, and 10. 24V on 18. and pin 11 connected to 2. I am still seeing the blinking light on 11 however I am still not seeing any variation (stays at 0V) in the voltage reading and pin 2 is now only showing 0V without variation. Any ideas on why I am not getting a HIGH and LOW change like the code suggests?
            You need to set up the inputs for sourcing. The outputs are sinking.

            Pin 1 +24
            Pin 2 tied to pin 11
            Pin 10 0V
            Pin 18 +24

            Comment


            • #7
              I think I found the issue. Pin 1 needs to be connected to 24V not 0V.

              Comment

              Working...
              X