DavidG (Customer) asked a question.

P1-04AD not reading 0-20mA signal

I have a P1AM connected to a P1-04AD analog input module and have a 2 wire 4-20mA pressure gauge hooked up to channel 2 per the data sheet. For some reason, I continue to get a reading of zero even though I've verified the presence of a 5mA signal coming off the gauge. I assume I'm missing something simple here but I cannot figure it out. Code is slightly modified P1AM analogInput example sketch .

  1. #include <P1AM.h>
  2.  
  3. int inputCounts = 0; //Reading in Counts
  4. float MilliAmps = 0; //Reading in Volts
  5.   
  6. void setup(){ // the setup routine runs once:
  7.  
  8. Serial.begin(115200); //initialize serial communication at 115200 bits per second
  9. while (!P1.init()){
  10. ; //Wait for Modules to Sign on
  11. }
  12. char P1_04AD_CONFIG[] = { 0x40, 0x03, 0x00, 0x00, 0x20, 0x03, 0x00, 0x00, 0x21, 0x03, 0x00, 0x00, 0x22, 0x03, 0x00, 0x00, 0x23, 0x03 };
  13. P1.configureModule(P1_04AD_CONFIG, 1);
  14. }
  15.  
  16. void loop(){ // the loop routine runs over and over again forever:
  17.  
  18. // inputCounts = P1.readAnalog(1, 2); //Reads analog data from slot 1 channel 2 of the analog input module
  19. // MilliAmps = map(inputCounts, 0, 65535, 0, 20.0 );
  20. // Serial.println("Channel 2 is reading: ");
  21. // Serial.print(MilliAmps,2); //Print the value in Volts up to 2 decimal places
  22. // Serial.println("mA");
  23. // Serial.print(inputCounts); //Print the value in counts
  24. // Serial.println(" Counts");
  25. Serial.println(P1.readAnalog(1, 2));
  26. delay(100);
  27. }

lines 19-26 are commented out to avoid any issues with my remapping the 10 bit signal to the 0-20 mA range and just check if the module is reading anything.

 

TIA


AL9000 likes this.
  • FACTS_AdamC (AutomationDirect)

    Do you have 24V wired to the terminal block of the module?

    Do you have a P1000 Power supply or external 24V connected to the P1AM-100?

    Selected as Best
  • FACTS_AdamC (AutomationDirect)

    Do you have 24V wired to the terminal block of the module?

    Do you have a P1000 Power supply or external 24V connected to the P1AM-100?

    Selected as Best
  • DavidG (Customer)

    I have 24V coming in to the bottom of the P1AM. I see now that the P1-04AD also requires 24v and 0V at the bottom of the module. I will try fixing that.

  • DavidG (Customer)

    that did it. thanks!