Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Contact Us
  • Home
  • Products
  • Automation Systems
  • Human Machine Interfaces (HMI)
  • NA

How to edit TIMESPAN and DATE variables in NA

Written by Arlo D'Cruz

Updated at December 17th, 2025

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Products
    Automation Systems Control Components Motion & Drives Quality control & Inspection Robotics Safety Sensing Services Software Switching Components
  • Amplify e-Store
    e-Store public
  • Public CSC
+ More

The TIMESPAN and DATE type variables are not compatible with the DataEdit object which means there is no easy way to let the user enter a new value for these data types. 

Sysmac does have keyboards which allow you to enter TIMESPAN or DATE types. These keyboards can be called manually via script. 

Example: Modifying a TIMESPAN via script

1. Define your TIME variable on the PLC

2. Define your TIMESPAN variable mapping on the HMI

3. Create a “DataDisplay” object linked to your TIMESPAN variable

4. Create an action which triggers when the user clicks the DataDisplay. The action will call a subroutine.

5. Add the following code to your subroutine (adjust the variable name as required)

Sub GetTIMEKeypad
	EditVariable( "HMITimeSpan")
End Sub

Your DataDisplay should now automatically show a keypad when pressed that allows you to edit the TIMESPAN variable.

 
 

Example: Modifying a DATE via script

DATE keypads can be generated in much the same way as Timespan keypads. 

1. Define your DATE_AND_TIME variable on the PLC

2. Define your DATE variable mapping on the HMI

3. Create a “DateTime” object linked to your DATE variable

4. Create an action which triggers when the user clicks the DataDisplay. The action will call a subroutine.

5. Add the following code to your subroutine (adjust the variable name as required)

Sub GetDATEKeypad
	
	EditVariable("HMIDate")
	
End Sub

Your DateTime object should now automatically show a keypad when pressed that allows you to edit the DATE.

 
 

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         

adjust modify

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • CX-Thermo doesn't connect to my Temperature Controller
  • How to Set Up User Authentication on NJ and NX PLCs
  • How to Configure NTP for CP1L/NX series PLCs
  • Obtaining your NA HMI IP address at runtime

Definition by Author

0
0
Expand