Hi,
It seems like you are seeing two problems with your current setup. The first is the voltage spike that occurs when you switch voltage levels. The second is the voltage output when the program is finished running.
The first problem may be due to either a transient effect in the ballast or glitching on the analog output of the NI-6215. Since the magnetic ballast relies on inductive effects, a sudden change in current may be damaging. The other cause may be glitching which originates at the digital to analog converter (DAC) when voltage levels change. There is more information on glitch energy found in
this article. There are two solutions for glitching presented in
this article but they are both require additional hardware. It may be useful to know the amplitude of the spikes that you are seeing.
The second problem is due to the fact that the analog output will continue to output the last voltage value until a new value is set or the device is reset. The can be compensated by just writing another voltage or resetting the device right before the program ends.
Regards,
Kent
Applications Engineer