LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Coercing "Data In" in XControl

Hi everybody,

 

I am having difficulties with an XControl. I did set up an XControl which provides a circular slider as shown below:Slider XControl

This control has a minimum and a maximum value which it can display. In the case above the minimum value is 10. When I use terminal, local variable or property node to write a value to the XControl I need/want to take care that the value saved by the control is within the min/max range.

So I corece the value internally. The image below shows the "Data Change" event of the XControl. The coercing is done inside the UpdateSliderVisual.vi.

XControl Facade_ Data Change Event

UpdateSliderVisual.vi gets the "Data In" value as input and outputs the coerced value. E.g. a value of '1' is written to the terminal of the XCotnrol. The "Data Change" Event is fired inside the XControl the value is coerced to '10' and provided via "Data Out". The XControl documentation states: "Data Out: The data that is passed to the Data State for use as the Data In during the next iteration".

 

My Problem:

==========

When I pass a value to the XControl which will be coerced the data is only saved if I set the "Data Changed?"-Action to True. But when I do so. An event is fired in the calling VI which is not desired.

I already tried to use the "Data Entry"-property of the "Data In" control to coerce tha value. But these settings do not seem to have an effect.

 

Is there a solution to my problem? Is this behaviour a bug or a feature?

0 Kudos
Message 1 of 2
(2,230 Views)

Hi,

 

please provide the code (Xcontrol and calling code) so the community can help you more easily.

Thank you!

 

Best regards,
Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
0 Kudos
Message 2 of 2
(2,176 Views)