List Info

Thread: About data type 'TIME'




About data type 'TIME'
user name
2007-05-09 07:15:45
Could someone help me ?
The Mat manual says in IEC ST/IL
"Namely, the following elementary data types are not yet supported: TIME, DATE, TIME_OF_DAY, DATE_AND_TIME, STRING, WSTRING"
But I coded as below
LD t#0.2s
ST timer_0.PT
...
ofcource, it worked well.
Now, I want to write codes as below
LD var1
ST timer_0.PT
...
The var1 is integer which is passed from other module through plc point.
I think ;var1 must be type converted into TIME.
What Ishould do?

 ;   Thank you
   ; Ikeya



Re: About data type 'TIME'
country flaguser name
Portugal
2007-05-11 03:59:02
On Wednesday 09 May 2007 23:10, takeshi ikeya wrote:
> Thank you Mario! I always appreciate your kindness
>
> > So, if var1 contains the time in seconds, multiply
T#1s with var1 to
> > obtain a
> > TIME value.
>
> Multiplying  T#0.1s with var1 makes it possible to
control TON in 0.1
> second unit ?
>


 Yes.

 The timer resolution is limited by the following, whichever
is larger:
   - the period with which the timer code is being executed
by the MatPLC
   - the resolution of the clock_gettime() function.


 
  Cheers,

		Mario.
 

------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
MAT-devel mailing list
MAT-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mat-devel


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )