01-19-2012 03:12 AM
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.
Thanks in advance.
01-19-2012 09:44 AM
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).
01-20-2012 10:45 AM
Hello,
I hope you are satisfied with this solution 🙂
01-24-2012 11:16 AM
Sorry for the delay, Thank you
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