OSCAT Forum

oscat.lib => oscat.lib fuer TwinCAT/CoDeSys => Thema gestartet von: SweElite am 18. Mai 2011, 10:43:40

Titel: Question / problem with TIMER_1
Beitrag von: SweElite am 18. Mai 2011, 10:43:40
Hello !

Sorry for writing in English but i hope someone can help me with a problem with TIMER_1.

At the input "Day" there should be "BYTE". What should i enter for the following days ?

Monday =
Tuesday =
Wednesday =
Thursday =
Friday =
Saturday =
Sunday =

Thanks alot in advance for any help !

Regards.
Christoffer / Sweden
Titel: Re:Question / problem with TIMER_1
Beitrag von: Fussel0804 am 18. Mai 2011, 12:07:40
Hi!

1 Byte has 8 Bits.

Bit 0 = Sunday
Bit 1 = Monday
Bit 2 = Tuesday
Bit 3 = Wednesday
Bit 4 = Thursday
Bit 5 = Friday
Bit 6 = Saturday
Bit 7 = not used

To set the Timer at Sunday, Wednesday, Friday, Saturday you have to set the Byte to 0110 1001

Regards.
Stefan Hantschel
Titel: Re:Question / problem with TIMER_1
Beitrag von: SweElite am 18. Mai 2011, 12:48:04
Thanks alot for your reply !

In language CFC i had at the input write it like the following 2#0111_1111   

But i really dont know what the 2# really does ? Could you explain ?

Regards,
Christoffer

Hi!

1 Byte has 8 Bits.

Bit 0 = Sunday
Bit 1 = Monday
Bit 2 = Tuesday
Bit 3 = Wednesday
Bit 4 = Thursday
Bit 5 = Friday
Bit 6 = Saturday
Bit 7 = not used

To set the Timer at Sunday, Wednesday, Friday, Saturday you have to set the Byte to 0110 1001

Regards.
Stefan Hantschel
Titel: Re:Question / problem with TIMER_1
Beitrag von: Fussel0804 am 18. Mai 2011, 12:57:08
2# Binary Format (0 or 1)
16# Hex format (00 ... FF)
Titel: Re:Question / problem with TIMER_1
Beitrag von: SweElite am 18. Mai 2011, 13:30:04
And that also explains the _ in the numbers ?

2# Binary Format (0 or 1)
16# Hex format (00 ... FF)