STL Counter to Char

drip

Member
Join Date
Jan 2009
Location
canada
Posts
59
Hello, I came across this block to convert a counter into a char. I have tried to use it, but I am getting some errors, I am sure it is probably an easy fix, but could someone help me as I am new to STL.

Conv 10^2
L #count_1
L W#16#F00
AW
SRW 8
L W#16#30
OW
T #_100

Conv 10^1
L #count_1
L W#16#F0
AW
SRW 4
L W#16#30
OW
T #_10

Conv 10^0
L #count_1
L W#16#F
AW
SRW 0
L W#16#30
OW
T #_1



I was wondering what these errors are exactly, I was thinking that the "conv 10^2" is just a title heading, but I do not know what he is trying to do with the transfer "T #_10" any help would be appreciated. Thanks



I get an error at the following:

Conv 10^2 (all of the conv)
T #_10 (all of the T)
 
Conv 10^2 is probably a title, so needs // added in front (as do the other CONV title bits)

i.e.
Code:
[I]//Conv 10^2
   L     #count_1
      L     W#16#F00
      AW    
      SRW   8
      L     W#16#30
      OW    
      T     #_100
[/I]

The code looks OK to me, the last one does
SRW 0 which is not necessary.
 

Similar Topics

Hello friends, I have encoder connected with motor and i have did a counter in this encoder but i want your help to make a counter with one dp...
Replies
5
Views
2,123
Hi, am not an expert on Siemens STL, but I have and object to do on Siemens S7 400 using STL, kindly advice. Objective: - Cumulatively Count...
Replies
8
Views
5,055
I am just learning S7 and STL. So please forgive me if this sounds basic. I am using a CPU 416F-2 PLC. I have a counter and it increments once...
Replies
0
Views
2,017
I am just learning S7 and STL. So please forgive me if this sounds basic. I am using a CPU 416F-2 PLC. I have a counter and it increments once...
Replies
0
Views
2,535
I am just learning S7 and STL. So please forgive me if this sounds basic. I am using a CPU 416F-2 PLC. I have a counter and it increments once...
Replies
3
Views
2,687
Back
Top Bottom