Input floating element problem
Hi,
I am trying to produce PWM signal with variable frequency. But i could not do this. When i try to produce that signal like in the pwm photo, the system warns like in the error photo. How can i solve that problem. My output variable type from c block is double. Could somebody help me about that problem ?
Answers
-
do the code gen examples run? This error looks to be a secondary error, there is something else wrong in the sim. Can you post a bigger screenshot?
0 -
Yes code gen run, if i don't connect to the ADC block. That is the bigger screenshoot.
0 -
A.Y said:
Yes code gen run, if i don't connect to the ADC block. That is the bigger screenshoot.
can you put all this on the other side of the ADC? It will need to be there if you are doing a proper digital control setup as the cblock is currently "outside" the MCU and will not be included in the code.
Can you also try with A0 grounded or with a constant applied? also what is the rate of the ZOH fs the PWM frequency?
0 -
I tried this but unfortunately could not run simulation. After that i tried replaced C block with Simplified C block, At least simulation is working for now. Maybe C block can not use with ADC or there is another something wrong but i can not solve that .
0 -
A.Y said:
I tried this but unfortunately could not run simulation. After that i tried replaced C block with Simplified C block, At least simulation is working for now. Maybe C block can not use with ADC or there is another something wrong but i can not solve that .
ah, which type of C block are you using? the simcoder c block or the code gen c block? there is a bug with the simcoder c block and I have a patch I can send you.
0 -
Where do you put your C block in your real engineering system?
If the C block is outside the F28335 DSP, do you have another MCU to run the code?
If the C block is inside the F28335 DSP, you should put the block at the output of the ADC, not the input of it.
If the C block is inside the DSP, you must use either a Simplified C block or a SimCoder C block for code generation.
As Albert has stated, PSIM2024.0 needs a service patch package for code-gen if the Simplified C blocks or SimCoder C blocks are used in a schematic. If you are using other PSIM versions, you don't have this problem.Please use the Altair support portal to create a support ticket so we can send you the PSIM2024.0 service package.
Here is how you can create a support ticket:
Contact Support0