Hi !
I have a "time value" parameter named
set_date_time. This parameter alows the user to introduce a different date/time
into my system.
For historical reasons (there was a time when this data/time
parameter was an octet string rather than a "time value") I also want
to be able to have
a DD method that allows the user to introduce the same
information, this time by selecting the "Introduce new date" from a
menu (the part with integrating
this into a menu is no problem)
By looking into the DD spec I saw that I could use
"edit_device_value" prebuild method (I think it's still caled a
method) to achieve this. What I want to obtain is of course
a means for the user to get the same validation of the introduced
date/time as is the case with using directly the interface to the parameter
(when a box appears and there you can
see the required format yy/mm/dd and hh/mm/ss)
Here is the method that does not work as expected: METHOD m_set_date_time
{
LABEL "Set date time";
CLASS OUTPUT & SERVICE;
DEFINITION
{
long status;
unsigned long param_id;
unsigned long member_id;
unsigned long ids[1];
unsigned long indices[1];
long id_count;
id_count = 0;
param_id = ITEM_ID(PARAM.SET_DATE_TIME);
member_id = 0;
status = edit_device_value("|en|Enter new date time:\n", ids, indices, id_count, param_id, member_id);
status = send_all_values();
}
}
The problem is that when you select the execution of this
method in NI Configurator 3.1.1 you get an "text edit field" that
does not impose any constraints or indication to the user as what he is
supposed to introduce there.
Is there any way to be able to achieve this by using the methods and basing the
validity check on the host system (NI Configurator)?
Thanks for your time !