Hi, when I use the pulse generator block i can choose the frequency of the sqaure wave form. PLECS samples the wave form two times at period so half of the period must be a integer multiple of the discretization step size.
If I use simultaneously two different pulse generators how will the softwer respond?
If you use a fixed step solver or generate code from a PLECS model, all discrete time constants must be integer multiples of the solver step size. It doesn’t matter how many time constants there are in the model since each of them must fulfil the criteria.
If you use a variable step solver PLECS automatically generates solver steps as needed in most cases. In particular, for a pulse generator it generates solver steps at the rising and falling edges of the signal. Depending on the simulation options “Synchronize fixed step sample times” and “Use single base sample rate” PLECS tries to find a common base rate and/or to synchronize the sample times in the system. This can be used to make sure, for example, that two pulse generators, one running with double the frequency of the other, are updated in the in the same simulation step whenever the slower of the two is updated.