Converting an Integer to S5Time in Access

R

Thread Starter

Rudi

Hello

Do you guys know a way to convert a integer field in access to a S5time value?

I need a way to convert this direct in MS Access.

thanks in advance
 
L

Luca Gallina

I guess integrated VBA should do the job, even if VB is not the most suitable language for BCD nibbles manipulation.

S5 time format is BCD coded, layout is BTTT where B is the time base and TTT is the time value.
TTT range = 0..999
if B=0 then value = TTT x 0.01 seconds
if B=1 then value = TTT x 0.1 seconds
if B=2 then value = TTT x 1 seconds
if B=3 then value = TTT x 10 seconds
 
S
That's also equivalent to

TTT x 10^B x 0.01 sec,

if a single expression is more convenient.

Also, in some Siemens CPUs there's a type of timer that works on a regular integer setpoint. Can't remember the name, but that's what I've used when I wanted to adjust the time delay from an HMI. You might be able to edit the PLC program to use that type.
 
Top