09-05-2017 03:33 PM
I am using 4 analog outputs on a 7842R FPGA to control a 2-axis mirror scanner. Channels 0 and 2 control one axis, while Channels 1 and 3 control the other axis. The issue that I am facing is the first time I write a value to one of the axes, the channels for the other axis are set to -10 V. After the first time the second axis is set, the problem vanishes and both axes work as expected until the PXI Chassis reset.
The control data is in clusters which are written to the FPGAs with the read/write control. I observed the clusters with a probe, and all 4 of the clusters appear to have the expected values (for the axis I didn’t write to, the start value = 0 and mode = static.) This is shown in the first picture (the case structure has a case for 0-7, and are identical except the channel #)
The code on the FPGA has channels 0-7, each tied to a global variable. The globals are then tied to an AO control loop as shown in the second picture (2 FPGA Main VI.) The third picture shows the AO control loop that the globals are written to.
I know -10 is the lowest the AO pins are capable of writing, but I cannot figure out why the output voltage doesn’t match the expected value from the cluster until the first time it is written to. The value of the second axis is ~ 50 mV until the application is started and the first axis is changed, at which point it goes to -10 V.
Do you have any ideas what could be causing this? The scanner is only capable of taking -3 to +3, and I am concerned that the issue will cause the scanning mirrors to crash into each other.
Thanks for your time and help,
Michael Hirte
Stowers Institute for Medical Research
09-06-2017 12:17 PM
If you're not actively driving a value to the channel, it will actually output an unspecified floating value, which is why you're seeing an unexpected output on the channels you haven't written to yet, whether it be 50mV or -10V. Because of this, it is difficult to say why the change from 50mV to -10V only happens when you write to one of the channels as we don't spec this out. Could you write 0's to the I/O nodes to initialize them first in a safe state before going into a manual state to move the scanner?
09-08-2017 03:28 PM
Thanks for the suggestion. I tried writing zeros right after the RIO module was initialized, but the problem persisted. I was able to fix the issue by changing the value to 1 mV. then writing 0.