Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Format for Time type

Format for Time type 2 weeks 1 day ago #10630

I have a number of time-tagged log entries to read, sort and display (with date/time) from ModbusTCP slaves.
The time from the slaves is POSIX time - but what functions does Proview have to convert this data into its own time format?

What is the Proview representation for time?
The administrator has disabled public write access.

Format for Time type 2 weeks 1 day ago #10631

  • benoit
  • benoit's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 153
  • Karma: 0
Hi Bruce,
maybe this link can help you...

www.theseus.fi/bitstream/handle/10024/60...3AD52E1A0?sequence=1

/Ben
The administrator has disabled public write access.

Format for Time type 2 weeks 4 hours ago #10632

Thanks Ben -

Not quite my question, though. I caused confusion by saying the source was over Modbus TCP.

The question is for any POSIX time as an integer (a count of seconds since midnight December 31 year 1969), how do I convert to the Proview pwr_tTime type. I don't see any pre-defined conversions, and the Plc _arithm blocks do not offer Time outputs.
The administrator has disabled public write access.

Format for Time type 1 week 6 days ago #10635

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 2753
  • Thank you received: 371
  • Karma: 118
Hi Bruce,

The ProviewR time is a struct with two 64-bit words, tv_sec and tv_nsec. tv_sec is the number of seconds since the Unix epoch and tv_nsec nanoseconds. This is identical to the unix time on 64-bit linux, but not on 32-bit linux where the time is two 32-bit words. In your case you can set tv_sec to the received time and tv_nsec to zero.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: Bruce@Spang
  • Page:
  • 1
Time to create page: 0.421 seconds