Home Forums Software Reading the PWM on PLC Multiplexed Digital Input 12

Viewing 3 reply threads
  • Author
    Posts
    • kanteshbondlakanteshbondla
      Participant
      Post count: 13

      Hello Audesse Team,

      We are currently using the FlexCase E along with a Red Beet unit. In this setup, we’re working with the VCU (S32K344) and intend to read a PWM signal through the Digital Input 12 (DI 12) pin. DI 12 is multiplexed with the Control Pilot pin on the Red Beet unit. To begin, we configured DI 12 as an SIUL GPIO in the MCAL settings; however, we haven’t been able to read the pin’s digital status. What changes or configurations should we apply to successfully read DI 12 as a GPIO or PWM signal?

      Thanks,
      Kantesh

    • AmirFAmirF
      Moderator
      Post count: 25

      Hi Kantesh,
      You can read the DICP or DI12 in the same way you read all other digital inputs.
      If you want to read the DI12 in GPIO mode, you need to define the pin in both Dio MCAL and in the pinout section in the config tool. For digital status read, you can use SIUL2.

      For PWM reads, you need to add a custom C code in your Simulink. Also, you need to set the pin in the config tool as input EMIOS, modify the pin in ICU MCAL, and set the clock reference, and interrupt setting.

      You can take a look at the attached example for both GPIO and PWM applications.
      Example file is compatible with MatlabR2022a and MBDT1.4. This is not part of our standard templates. Please use with caution.

      Thanks,
      Amir

      • This reply was modified 1 month, 2 weeks ago by AmirFAmirF.
      Attachments:
      You must be logged in to view attached files.
    • kanteshbondlakanteshbondla
      Participant
      Post count: 13

      Hello Amir,

      We have tested all the DIs on the TC64 with red beet, but only DI 12 is not working even with right configurations.

    • AmirFAmirF
      Moderator
      Post count: 25

      Hi Kantesh,

      What is the signal you are reading with DI12?
      Please keep in mind that low-level threshold on DI12 is 1.5V.
      Have you tried the sample code on the website?
      Let me know what are the exact upper/lower bands, frequency, and duty cycle of the signal you are trying to read on DI12?

Viewing 3 reply threads
  • You must be logged in to reply to this topic.