| 
The IEC 61131 way would be to raise an error flag if an overflow occurs. Any further steps are vendor specific
😉   
Von: 4diac-dev-bounces@xxxxxxxxxxx <4diac-dev-bounces@xxxxxxxxxxx>
Im Auftrag von Jan HolzweberGesendet: Freitag, 12. Juli 2019 15:13
 An: 4diac-dev@xxxxxxxxxxx
 Betreff: Re: [4diac-dev] Timeliterals in Lua
   
Just out of curiosity and error handling, if this should be handled when generating the lua code or just ignored, because it will not happen anyway :)
 Cheers,
 
 
 
Don’t think so 602 years of timespans should be quite rare. Why do you ask?   Best, Martin     
Hi,
 Ok, i will convert to nanoseconds then.
 Do overflow errors often occur with 64-Bit? I mean it could store time values up to 5277777 hours.
 
 Cheers,
 
 
 
Hi,   we have a similar discussion currently running in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=549172 I would suggest for ease of use and consistency to save all TIMEs in nanosecond resolution. Interactions between LUA
 and C code will be than easiest to implement.   Best Martin
     
Hello All!
 I have a question regarding time and in which unit we should convert time literals from structured text into lua variables.
 I already talked with Alois about this. He said in CPP he would do somethink like:
CIEC_TIME().fromNanoSeconds(60E9). Should we aim to convert all times also into nanoseconds in Lua or should we do a different approach?
 
 Cheers,
 _______________________________________________ 4diac-dev mailing list
4diac-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/4diac-dev _______________________________________________ 4diac-dev mailing list
4diac-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/4diac-dev |