help for STL code lines...

eem_murat

Member
Join Date
Nov 2009
Location
Istanbul
Posts
30
Hi all,
I have some problem about my plc codes lines so if you help me , I will be very happy.
First of all,

we assume that #inDriveNo:=49 and I wonder some values of code line.
-------------------------------------------------------------------------------
OPN "XYZ" //DB52
L #inDriveNo
SLD 6
LAR1 // Line A
L DBW [AR1, P#0.0] //First DP area address,
T #outAddress //Line B
SLD 3
LAR1 //DP area pointer, Line C
L PIW [AR1, P#0.0] //Status word
T #tmpDriveSt // Line D
T #outDriveStat
-------------------------------------
#inDriveNo(int),
#tmpDriveSt (word),
#outDriveStat (word)

please check and follow below lines;
#inDriveNo= 0000 0000 0011 0001
AR1=392 Line A
and I dont know what is the other parameter values?
For example,
What is the value of AR1 in Line A
What is the value of Accu1 in Line B
What is the value of AR1 in Line C
What is the value of #tmpDriveSt in Line D

Thank you very much for your helpings.
 
How is this:

Line A 392.0
Line B - Contents of DB52.DBW 392
Line C - Unknown based on value in DB52, above
Line D - unknown based on PIW input from previous line (load)
 
How is this:

Line A 392.0
Line B - Contents of DB52.DBW 392
Line C - Unknown based on value in DB52, above
Line D - unknown based on PIW input from previous line (load)
hi Mike,
Thaks for your answer but I want to give some detail about Line C to understand better.
inside of DB52;
Adress Name type initial value
+392 49 "DRIVE_udt_ComData"

inside of DRIVE_udt_ComData UDT11;
Adress Name type initial value
0.0 DRIVE_I_O_Address INT 0


Now I want to ask that DB52.DBW 392 initial value is absent so ı dont know how ı reach the DB52.DBW 392 's value.

 
Last edited:
Go monitor the DB to see what the value is.
Also monitor the STL code to see if you can walk through the code. Use F1 to get help for instructions that you do not know.
 
There are DB52 and Motor HW config detail picture in below.
adsız.jpg
mot.jpg

Thanks for all answers,and I try to solve all code lines step by step and If you check my solution, I will be very happy.

#inDriveNo = 0000 0000 0011 0001 = 49
SLD 6 = 0000 1100 0100 0000 = 392
AR1= 392
L DBW [392+0] = DB52.DBW392= 1556
#outAddress = 0000 0110 0001 0100 =1556
SLD 3 = 0011 0000 1010 0|000 =1556
AR1 =1556
L PIW [1556+0]
T #tmpDriveSt = PIW(1556)
T #outDriveStat =PIW(1556)

#tmpDriveSt = PIW(1556) but what is PIW(1556)'s values?
 
PIW 1556 will be the actual value from the DP slave. The value will be dynamic. I am guessing the actual speed of a drive. Create / use a VAT table to monitor it. Your STL code also passes it back to the calling routine, so you should be able to monitor it there as well.
 
Thank you very much.Your helps were so important for me. And now I try to understand PPO type-2 4 PKW 6 PZD and
PIW 1556
PIW 1558
PIW 1560
PIW 1562
PIW 1564
PIW 1566

PQW 1556
PQW 1558
PQW 1560
PQW 1562
PQW 1564
PIW 1566
is it true?
 
ss.jpg
Thank you very much.Your helps were so important for me. And now I try to understand PPO type-2 4 PKW 6 PZD and
For example PKW 1556 4 WORDS length but ı wonder that what is the mean.
PIW 1556
PIW 1558
PQW 1556
PQW 1558 like this or is there a another statement?
Is it true?
Thaks a lot...

quote]
 
PIW 1556 is the first word returned in the profibus telegram from the drive; Most probably the drive status word. You need to check the configuration of the drive to confirm this.

Another thing to note is that random read and write statements to a profibus slave can potentially cause data consitency errors in inconsistent data updates between the DP master and the slave. It is preffered to use SFC14 / SFC15 to read and write consistent data to / from a profibus slave.

Nick
 

Similar Topics

Hey everyone, In the middle of deciphering STL code in S7 plc and I'm confused. I interpret the following code to be load the register "#Step"...
Replies
11
Views
2,082
Hello nice to meet you, im new in here, I'm currently trying to convert code written in STL for a S7-400 to SCL for an S7-1500, because when i run...
Replies
5
Views
380
Hi! I am working on a project were we will be replacing an 300 CPU with a 1500 CPU and we are working on migrating / converting code. There is a...
Replies
9
Views
1,121
Hello everyone, friends. I asked a similar question before, and you helped, but I'm very weak in STL and I'm having trouble learning it. What I...
Replies
2
Views
747
i hope you could help me to convert the network Stl to lad it's apart from program of machine and i try to find solution for the reason of error...
Replies
10
Views
1,976
Back
Top Bottom