O(
L DB70.DBW 2 //Load VIEWING_TOOL_CODE
L 0 //Load 0
<I //Compare VIEWING_TOOL_CODE to be less than 0
)
O(
TAK //Swap ACCUM1 and ACCUM2
L 15 //Load 15
>I //Compare VIEWING_TOOL_CODE to be great than 15
)
JC VTSE //Jump conditionally to VTSE label
L DB70.DBW 2 //Load VIEWING_TOOL_CODE
VTS0: ITD //Convert from INT to DINT
L P#30.0 //Load a pointer of P#30.0
*D //Convert VIEWING_TOOL_CODE to pointer format
L P#30.0 //Load a pointer of P#30.0 (30 byte offset)
+D //Add P#30.0 to VIEWING_TOOL_CODE pointer
T #TC_DBB_NO //Transfer to TC_DBB_NO
L DB70.DBW 2 //Load VIEWING_TOOL_CODE
OPN "Tooling selection DB" //Open TOOLING SELECTION DB
T DBW [#TC_DBB_NO] //Transfer to TOOL_CODE
JU WTS //Jump unconditionally to WTS label
VTSE: L L#0 //Load L#0
JU VTS0 //Jump unconditionally to VTS0 label
why is this code using a pointer to point to P#30.0 and then mulitplying *D and then pointing again and then adding the +D I understand the less than 0 and less than 15 beginning part. If the value is less than 0 or greater than 15 then the code inserts a 0, but I don't get the pointer thing.
I looked up something on siemens website, but i'm still confused.
http://www.automation.siemens.com/WW/forum/guests/PostShow.aspx?PageIndex=1&PostID=48658&Language=en
I appreciate it thank you.
L DB70.DBW 2 //Load VIEWING_TOOL_CODE
L 0 //Load 0
<I //Compare VIEWING_TOOL_CODE to be less than 0
)
O(
TAK //Swap ACCUM1 and ACCUM2
L 15 //Load 15
>I //Compare VIEWING_TOOL_CODE to be great than 15
)
JC VTSE //Jump conditionally to VTSE label
L DB70.DBW 2 //Load VIEWING_TOOL_CODE
VTS0: ITD //Convert from INT to DINT
L P#30.0 //Load a pointer of P#30.0
*D //Convert VIEWING_TOOL_CODE to pointer format
L P#30.0 //Load a pointer of P#30.0 (30 byte offset)
+D //Add P#30.0 to VIEWING_TOOL_CODE pointer
T #TC_DBB_NO //Transfer to TC_DBB_NO
L DB70.DBW 2 //Load VIEWING_TOOL_CODE
OPN "Tooling selection DB" //Open TOOLING SELECTION DB
T DBW [#TC_DBB_NO] //Transfer to TOOL_CODE
JU WTS //Jump unconditionally to WTS label
VTSE: L L#0 //Load L#0
JU VTS0 //Jump unconditionally to VTS0 label
why is this code using a pointer to point to P#30.0 and then mulitplying *D and then pointing again and then adding the +D I understand the less than 0 and less than 15 beginning part. If the value is less than 0 or greater than 15 then the code inserts a 0, but I don't get the pointer thing.
I looked up something on siemens website, but i'm still confused.
http://www.automation.siemens.com/WW/forum/guests/PostShow.aspx?PageIndex=1&PostID=48658&Language=en
I appreciate it thank you.