Hello:
I would like to use the same clock source for two boards. I found that the External Sync block can be used as the input for the PWM (Variable) block (as the synchronization impulse source). However, I couldn’t find a block that allows me to extract or output the synchronization signal from one board to provide it to the other board.
best regards,
test.plecs (77.7 KB)
Typically the synchronization signal will be a “reference” PWM signal from the other board. You can use an existing PWM signal (e.g. ePWM1A since your first few channels have zero phase shift with a saw-tooth type modulator). You could also introduce a new PWM channel explicitly designed to generate synchronization events where you can adjust the synchronization pulse as needed.
Currently, I am using the ePWM1A pin of the first board and connecting it via jumper to the External Sync block, which successfully synchronizes both boards. However, this introduces another issue: the PWM signals on the second board rise at the same time even though the different phase shifts I set.
Since the synchronization signal ensures all PWMs are time-aligned, I would like to configure a phase offset so that each PWM channel starts its rising edge at a different point within the period.
In the model you posted the duty cycle on the first channel is always zero and so there are no rising edges for the synchronization input. Was that the case in during your testing? Can you increase the duty so that there is a synchronization pulse? I would also double check you’re measuring the correct channels as not all will be phase shifted according to your test model.
If there’s a risk of your “source” PWM channel to have zero duty, then you can create a new PWM output explicitly for synchronization as suggested earlier.
The duty cycle of ePWM1A on Board 1 has been set to 50% to ensure a clear rising edge for synchronization, and the ePWM1A output pin from Board 1 is connected via jumper wire to the External Sync input of Board 2.
However, the PWM outputs on Board 2 do not exhibit any consistent or fixed phase shift relative to each other, all outputs appear to rise at the same time, which means the phase shift input may not be working as intended.
Vout controlled(2 CTRL 1 by 1)NPC-DAB.plecs (355.0 KB)
Hi Camberlam, FYI Bryan is out of the office and will return on Monday, so you can expect an update from him after that.
Hello, I’ve followed up in your other thread 