LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Get Output Data from an Xcontrol

Hello,

 

I'm trying to build an Xcontrol that implements a Calendar and if i put this xcontrol in my VI it must appears like a "timestamp" control in blockdiagram and after pushing the Xcontrol button on the UI it must return the selected date.

Now, since i have not so clear in my mind the basic concepts behind Xcontrols, what i've done now is:

 

1) I've added a Boolean control to facade and a related Event:value change to manage the push button event

2) in this event i've added a calendar control found on the web that gives as output timestamp data  (front panel and block diagram attached pics)

3) I've added a bundle by name to put a True Value on Data Change? in the "Action" associated Wire 

4) in the data.ctl of Xcontrol I've replaced the default data with a timestamp data

 

In these conditions if i place the control on the VI when the button is pressed the calendar appears as expected,

 BUT

How can i access the selected data? in the main VI block diagram there is the control with its output and if i create indicator on that one

another same Xcontrol is created (attached pic), i just don't figure out how to extract the data from this.

 

I suppose i have to use methods but i don't know how.

 

Any help would be greatly appreciated. Smiley Tongue

 

Thanks in advance.

 

 

0 Kudos
Message 1 of 4
(2,577 Views)

If your data type is a time stamp, then you can simply use that wire.

 

The reason another XControl is created when you select Create Indicator is that LV automatically uses the style of the control you use, but you can also connect it into a regular timestamp indicator (just like you can connect a digital numeric control to a meter numeric indicator. The data type is what's important, not the type of control).


___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(2,553 Views)

Hello,

 

I hope you are satisfied with this solution 🙂

 

 

Antonios
0 Kudos
Message 3 of 4
(2,536 Views)

Sorry for the delay, Thank you 

Smiley Happy

 

Finally I have built a customized Xcontrol to accomplish the task, 'cause my requirement is that the control has to appear as a simple control in the VI that uses it, and using the solution you proposed to me implies that i have to build an event structure specially for this task.

 

MR

0 Kudos
Message 4 of 4
(2,518 Views)