The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
HelloWhen connecting the encoder directly to the C block, the software gives an error. What is the reason for this problem and what solution do you suggest?
I have identified the problem in the picture.
What error message did you see?
Your attached picture does not show how the encoder is connected to the C block.
This picture shows that all the input ports of your C block are floating, not connected to any signal.
Doesn't your C code need any input signal? If not, why do you have 3 input ports for the block?
Please attach you PSIM schematic to this question. The details in the components' parameter settings provide useful information for finding your problem.
HelloThank you for your replyThe encoder is connected to block C. I removed this connection to make sure that the mentioned error will be fixed or notNow I will show you the picture of the circuit with the complete connection and the corresponding errorOf course, I think that there should be an element between the encoder and block C, but I don't know what it is?
Hi, Reza,
In the 2nd picture, you have connected the 3 input signals of the C block "SSCB1" to the 3 signals outside the F28335 MCU. Those 3 signals are from a mechanical encoder.
The output signal of this C block "SSCB1" is connected to "SSCB2" which is obviously is inside of the F28335 MCU.
The question is: Is this block SSCB1 outside or inside of the F28335 code?
If this block is outside of F28335, you should connect its output to a F28335 port.
If this block is inside of F28335, you should use F28335 ports to bring the 3 input signals inside F28335. You may use the F28335 blocks such as ADC, Digital Input, Encoder, Capture, and etc.
Any signal outside of a MCU must be brought inside via some kind of port. The code inside of a MCU CANNOT read the outside signals without assigned connections.
Even if your MCU supports wireless connections, you must assign the signals to the wireless ports.
as rhonda mentions this connection is not possible.
if you remove the PWM block this will run. For every signal that will be compiled with the code gen it needs to go through a target peripheral like GPIO, ADC, SPI etc. then out through the PWM or GPIO. You need to be careful with this sort of signal if you put it through a GPIO you will likely require a high interrupt rate to properly resolve the encoder, this is why there is a purpose built encoder block, which is to the right of you c code. The peripherals of these targets are setup to deal with the issues of interrupt rates and edge detection.
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…