Hi Jeremy,
I understand from your issue that the analog voltage data you are trying to read using the "ADC" pin of your TI F280049C board is not reflected from the "ADC" block output.
After analysing the model, I have found the following possible issues and their workarounds associated with the "ADC" and "ePWM" blocks in your model:
For "ADC" block,
- Check if the analog voltage sensed is within the sensible range of the TI F280049C board.
- Verify if the "ADC" is sensing the analog voltage. You can do that by ensuring the "Conversion channel" of the ADC block matches the pin where the input voltage is provided.
- If you are trying to trigger the ADC with "ePWM" you can set that in the "SOCx trigger source" field of the "ADC" block by selecting the proper "ePWM" channel.
For "ePWM" block,
- The variable "PWM_Counter_Period" used in the "Timer period" field of the "ePWM" block is undefined in your model, which is the reason the carrier triangular signal cannot be generated. You use the following formula to find the period of the triangular carrier (as you are using the "UP-Down" mode of counting) pulse to generate PWM.
"Timer period"=(0.5) * F_clk/F_des
Here, F_clk = Clock frequency of the microcontroller,
F_des= Desired frequency of PWM
- The reference value to which the triangular pulse is compared is not defined in the block. You can define it by filling in the "CMPA units" field in "Clock cycles" or "Percentage" and providing the value in the "CMPA value" field to define the pulse width of the PWM.
Further, for more information on the "ADC" and "ePWM" blocks, please refer to the following MathWorks Ddocumentation links:
Hope this helps you in resolving the issue.