Features, discussions, tips, tricks, questions, problems and feedback

Time from Fx5U to Maps Scada


I Want to Read pump working time with MAps.

I want to see working hours like in GX Works.

How Should I define to the Agent D602, D604 D606 and D608?


Beytullah ÇOLBAN

The Time type is not supported, so You will need either convert it inside PLC (using TIME_TO_* function) and then scan separate elements like days/hours and so on scan to respective DATE agent slot.

Using TIME_TO_DINT You will convert the TIME type into Miliseconds. You can scan such value directly to cTime slot of Date agent (remember to address it as 32 bit DINT!! Check driver documentation on how to scan 32bit values).
CTime slot of Date agent is number of milliseconds since 1970-01-01, but since TIME type in Mitsubishi programming has limit 25 days, You can easily just use then to display this on screen with day, hour and minute slots.

1 Like


I have solved the Problem.

the values keep millisecond format (with Time Data type) in PLC.

I have read with with millisecond.
then I have converted to day, hour, minute, second with c#.

it is working very perfect.

You can find my method as follow.

TimeSpan t = TimeSpan.FromMilliseconds(ms);
string answer = string.Format("{0:D2}h:{1:D2}m:{2:D2}s:{3:D3}ms", 
1 Like