12-13-2021 03:28 PM
This will be my first question post to this community so constructive criticism is welcome.
I am building a UI that allows the operator to change various input to a synchro assembly while also displaying via an indicator dial what the synchro's angle is at. This dial indicator updates its value periodically using a simple timer and the EVENT_TIMER_TICK event type. This part works. when I mux into what synchro to digital converter I want to display while providing reference and input voltage I see the dial doing revolutions as I intended. For further information I have a LabView project from which I generated an FPGA bitfile that I run to both provide input and read my synchro to digital converters. This project on a whole is run on a NI PXI controller connected to a number of other PXI instruments.
The problem is this, anytime that I move my mouse over the panel the dial resets to 360 degrees for a tick before returning to the actual measured value. Not a single one of my call back functions for this panel use EVENT_MOUSE_POINTER_MOVE yet it seems something like this would be the case. To specify it is not only the dial itself but anywhere on the panel that movement of my mouse triggers this behavior.
Any tips or suggestions would be appreciated!
12-14-2021 09:43 AM
I solved my own problem. it had to do with where my variables were declared in the callback function. Within the event case structure but before the event commit case. when a mouse move event triggered the callback function the math on the angle variables would execute without a measurement update therefore getting progressively larger (>360). Then when a tick would happen they would be updated with measurement and brought back to reality.