Hello Everyone,
Below is the STL code for converting display_period from HMI into S5 time format presented in an example.
I am not able to understand the below code completely..Siemens help suggests that:
By the above help timer T1 should be loaded with 50sec...because after OW W#16#2000 ACCU1 will be having 0010_0000_0101_0000...
But this is not happening...Please help me where I am incorrect...I must be ignoring some basics but i am not able to find myself out.
L 50 //display_period
ITB //convert input to S5TIME format
SLW 4
SRW 4
OW W#16#2000
SD T 1
AN T 1
JC END2
R T 1
S #DIR_update
S #SPEED_update
S #no_object
END2: NOP 0
If any one helps me in explaining the above instructions I am very thankful.
Advance thanks.
Below is the STL code for converting display_period from HMI into S5 time format presented in an example.
I am not able to understand the below code completely..Siemens help suggests that:
You can pre-load a time value using either of the following formats:
1.W#16#txyz; Where t = the time base (that is, the time interval or resolution)and xyz = the time value in binary coded decimal format
2.S5T#aH_bM_cS_dMS; Where H = hours, M = minutes, S = seconds, and MS = milliseconds; user variables are: a, b, c, d
· The time base is selected automatically, and the value is rounded to the next lower number with that time base.
By the above help timer T1 should be loaded with 50sec...because after OW W#16#2000 ACCU1 will be having 0010_0000_0101_0000...
But this is not happening...Please help me where I am incorrect...I must be ignoring some basics but i am not able to find myself out.
L 50 //display_period
ITB //convert input to S5TIME format
SLW 4
SRW 4
OW W#16#2000
SD T 1
AN T 1
JC END2
R T 1
S #DIR_update
S #SPEED_update
S #no_object
END2: NOP 0
If any one helps me in explaining the above instructions I am very thankful.
Advance thanks.