Roberto,
The difference between SetCtrlVal and ATTR_CTRL_VAL is that the former immediately redraws the control with the new value, after each call to the function. The latter simply marks the control for redraw, which will happen whenever the CVI run-time engine has a chance to process events (after returning from the callback function, or whenever you call ProcessSystemEvents, ProcessDrawEvents, GetUserEvent, etc...)
The implication of this difference is that if you are making consecutive calls to SetCtrlVal, you're better off using ATTR_CTRL_VAL instead, so that a single redraw takes place, instead of one for each function call.
Note: if the control is hidden or overlapped, then the behavior of SetCtrlVal reverts to that of ATTR_CTRL_VAL.
- luis