jdjennings1962 (Customer) asked a question.

Trying to troubleshoot an unexpected 110 mS delay between a simple AO step change and AI observation. THis is longer than observed with another CODESYS PLC. Expected about 20 mS.

Can anyone give me suggestions for finding the source of an unexpected delay?

 

I have the P2CDS-622 with P2-8AD4DA-1 analog card. I wired AO0 directly to AI0 with a very simple program. Program cycle time set to 3 mS. AI on COURSE setting. Using high speed TRACE set to follow main program cycle time. Plotting the raw integer without filter, seeing 3mS resolution on trace. I am observing a delay of > 100 mS on trace to detect step change. With WAGO PLC in similar settings, I observe 26 mS delay. But specs of P2-8AD4DA-1 card appear better than specs of WAGO (single digit mS on AO/AI in Course mode).

 

Thank you

 

 


  • FACTS_BruceL (AutomationDirect)

    Yes that is too long, not sure if its related to CSYS and the Trace utility program overhead.

     

    The real reference is if you can scope it and see actual H/W performance. From writing the variable for the channel to the output changing on the scope. Dont mean to state the obvious, but just trying to get some data on this. That number should be less than 20ms for sure in Coarse mode.

    Selected as Best
  • FACTS_BruceL (AutomationDirect)

    Yes that is too long, not sure if its related to CSYS and the Trace utility program overhead.

     

    The real reference is if you can scope it and see actual H/W performance. From writing the variable for the channel to the output changing on the scope. Dont mean to state the obvious, but just trying to get some data on this. That number should be less than 20ms for sure in Coarse mode.

    Selected as Best
  • FACTS_BruceL (AutomationDirect)

    Little more detail....for the Output Hardware spec items with a variable write out, should be Scan Rate + Output All Channel Update Rate = ~ 7ms with 3ms Cyclic Scan.

     

    For outputs resolution ("Coarse") is not a factor.

     

    If you are going from Input Channel convert --> Output Channel drive be <50ms.

     

    image

    Expand Post
  • jdjennings1962 (Customer)

    Thank you, Bruce. I suspect that the TRACE is pulling a lot of strain, as you mention. Will try the other angles.

    Jeff

  • jdjennings1962 (Customer)

    Quick follow-up for clarity. I was able to get the full in/out cycle time down to 28 mS (from > 100 mS) by explicitly turning off the unused input AI channels. I made the mistake of thinking that not addressing them in code would turn them off.

     

    To confirm the measurement, I programmed a high/low flop counter that would flop AI as soon as the previous flop in AO was detected. Counted 100 changes in 2800 mS. I eliminated the TRACE completely, which didn't make much difference.

     

    Thanks.

    Expand Post
    • FACTS_BruceL (AutomationDirect)

      Really appreciate the update!

       

      And am encouraged to hear CSYS Trace is not impacting.