1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. Fanuc Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Determining the Date from CREATE and MODIFIED in TP *.LS Files

  • cattmampbell
  • July 18, 2024 at 5:24 PM
  • Thread is Unresolved
  • cattmampbell
    Reactions Received
    4
    Trophies
    1
    Posts
    17
    • July 18, 2024 at 5:24 PM
    • #1

    I'm trying to programmatically parse the date from the CREATE and MODIFIED in TP *.LS files, but I am having a difficult time determining the year, month, and day because they are formatted as 2-number values separated by a - character, for example:

    Code
    CREATE      = DATE 23-09-24  TIME 18:48:42;
    MODIFIED    = DATE 23-09-24  TIME 20:53:32;

    In the example above, the first (23), second (09), and third (24) 2-number values could be the year, month, or day.

    Writing logic to determine if a 2-digit number is greater-than 99 (not the year), greater-than 12 (not the month), greater-than 31 (not the day), does not cover the example above considering:

    • The first (23), second (09), and third (24) 2-number values could be the year (less-than 99).
    • The first (23), second (09), and third (24) 2-number values could be the day (less-than 31).
    • The second (09) 2-number value could be the month (less-than 12).

    I checked the ERR*.LS files from the same Robot to see if the formatting was the same, but it uses a 2-number value for the day, a 3-letter value for the month, and a 2-number value for the year, for example:

    Code
    851752" 15-OCT-23 20:10:10 " APPL-175 Backup started           " " WARN 00000000" "
    851753" 15-OCT-23 20:01:10 " APPL-176 Backup finished          " " WARN 00000000" "
    851754" 15-OCT-23 19:54:26 " SDTL-115 Data Output is completed " " WARN 00000000" "

    I found many examples in the Version 9.30 of the HandlingTool Manual, but the formatting is different as it uses a 2-number value for the day, a 3-letter value for the month, and a 4-number value for the year, for example:

    Code
    Creation Date:     21–FEB-2006
    Modification Date: 21–FEB-2006

    In Version 9.30 of the HandlingTool Manual, Creation Date is described as:

    Quote

    Creation date is the date on which the program name was created.

    In Version 9.30 of the HandlingTool Manual, Modification Date is described as:

    Quote

    Modification date is the date, according to the calendar in the controller, when the file was last displayed in the editor. This information can be displayed using the [ATTR] function key on the SELECT menu.

    Is there a System Variable or a setting that determines how the year, month, and day are formatted in the CREATE and MODIFIED in TP *.LS files?

    Edited once, last by cattmampbell (July 19, 2024 at 6:01 PM).

  • AnandTUD
    Reactions Received
    12
    Trophies
    2
    Posts
    42
    • July 19, 2024 at 9:24 AM
    • #2

    If I am not wrong, the format in CREATE and MODIFIED is DATE YY-MM-DD TIME HH:MIN:SS;

    You could use Karel to get more info using GET_ATTR_PRG and CONV_TIME_STR functions.

  • DS186
    Reactions Received
    201
    Trophies
    6
    Posts
    1,076
    • July 19, 2024 at 10:43 AM
    • #3
    Quote from AnandTUD

    If I am not wrong, the format in CREATE and MODIFIED is DATE YY-MM-DD TIME HH:MIN:SS;

    You are right. This is the correct format used for date and time.

  • cattmampbell
    Reactions Received
    4
    Trophies
    1
    Posts
    17
    • July 19, 2024 at 4:27 PM
    • #4
    Quote from AnandTUD

    If I am not wrong, the format in CREATE and MODIFIED is DATE YY-MM-DD TIME HH:MIN:SS;

    AnandTUD This means the examples from the HandlingTool Manual are more like pseudocode than they are applicable/loadable examples?

    Code
    Creation Date:     21–FEB-2006
    Modification Date: 21–FEB-2006

    If this is the case, it looks like Process Simulate exports *.LS files with incorrectly formatted CREATE and MODIFIED values, for example:

    Code
    CREATE              = DATE 2023-12-07  TIME 09:44:02;
    MODIFIED            = DATE 24-07-19    TIME 10:10:14;

    I imagine the TP interpreter would be able to accommodate similarly formatted CREATE and MODIFIED values, or someone else would have posted a similar question before I did.

    Thank you!

    Edited once, last by cattmampbell (July 19, 2024 at 6:03 PM).

  • DS186
    Reactions Received
    201
    Trophies
    6
    Posts
    1,076
    • July 19, 2024 at 8:49 PM
    • #5

    If you enter the DETAIL screen of a program in the Teach Pendant SELECT menu, the format of date and time looks like this:

    Code
    Creation Date:     21–FEB-2006
    Modification Date: 21–FEB-2006

    If you open a *.LS program with a text editor, the format of date and time looks like this:

    Code
    CREATE = DATE 2023-12-07 TIME 09:44:02;
    MODIFIED = DATE 24-07-19 TIME 10:10:14;

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Tags

  • Fanuc
  • tp
  • Syntax
  • teach pendant

Users Viewing This Thread

  • 1 Guest
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download