Long net-zero pulse#
Long net-zero pulse using wait loop as a subroutine#
1 set_awg_offs 16384, 16384 # Set the offset to half the maximum offset (1.25 V).
2 upd_param 10000 # Update the offset to 1.25 V and wait for 10 us.
3
4 move 999, R0 # Register R0 to be used for the wait loop such that the pulse is executed for the desired duration.
5 move @second_pulse, R1 # Set register to execute next pulse once wait loop is done. R1 is used as a pointer to next subroutine.
6 jmp @wait_loop # Call wait loop subroutine such that the pulse is executed for 10 ms.
7
8second_pulse:
9 set_awg_offs 0, 0 # Set the offset to 0 V.
10 upd_param 10000 # Update the offset to 0 V and wait for 10 us.
11
12 move 999, R0
13 move @net_zero_pulse, R1 # Set register to point to the net-zero pulse once the second pulse is executed.
14 jmp @wait_loop
15
16net_zero_pulse:
17 play_netzero 25000000, 10000 # Play a net-zero pulse with maximum pulse length of 25 ms and wait for 10 us.
18
19 move 2499, R0 # R0 set to 2499 to ensure to hold off until the maximum pulse length is achieved (10 us + 10 us x 2499).
20 move @done, R1 # Set register to point to the end of the program once the net-zero pulse has been executed for 25 ms.
21 jmp @wait_loop
22
23done:
24 stop # Stop the program
25
26wait_loop:
27 wait 10000 # Wait for 10 us
28 sub R0, 1, R0 # Decrement R0
29 jnz @wait_loop # Loop until R0 is 0
30 jmp R1 # Jump back to the value stored in R1.