To produce digital signal in Pspice A/D I am using STIM1 stimulus part. The signal that I want to generate is having lot of transitions so for that reason I want to use repetitive commands in the edit properties of the STIM1. I have set the following properties:
COMMAND0 - 0s 0
COMMAND1 - LABEL=LOOP1
COMMAND2 - +1m 1
COMMAND3 - +1m 0
COMMAND4 - +1ms GOTO LOOP1 3 TIMES
COMMAND5 - LABEL=LOOP2
COMMAND6 - +2m 1
COMMAND7 - +2m 0
COMMAND8 - +2m GOTO LOOP2 –1 TIMES
the problem that I am facing is I am not getting output signal (check the figure) same as input. You can notice in the figure that the signal is low from 8ms to 11ms but as for the settings it should be low from 8ms to 10ms. Please anyone can help me with it.
In the statement right after LABEL, the time delay is ignored.
i.e. +1m in COMMAND2 is ignored during looping, while the +1ms in COMMAND4 is executed.
So, after running the GOTO LOOP1 3 times, the delay of +1m in COMMAND4 gets added to COMMAND6 and creates a delay of 3ms.