RheinhardtP
Lifetime Supporting Member + Moderator
Hi Guys the following is software that i use for tracking of data, when i want to delete a record i make the value palletid 0.
The problem is that the code does not always clear the palletid. Can anybody see anything that might be causing havoc on my tracking managament system..
My buffer eventually fills up and i have to clear it manually.
Thanks in Advance
Network 1 - If not pos edge then goto end
A(
L #RecNo
L 1
>=I
)
A(
L #RecNo
L 200
<=I
)
A #Trigger
AN #HIS_Trigger
JCN END
Network 2 - Setup record lengths
L 120
T #tRecBytes
L 84
T #tProdBytes
Network 3 - Get tracking data into local copy
L #RecNo
+ -1 //Get rid of offset
L #tRecBytes //bytes per item
*I
SLD 3 //convert to pointer
LAR1 //Save in address register
T #RecStartAdd
LAR1 P##Source //--Set up ANY pointer for source
L W#16#1002 //Data type header (see definition for ANY data type)
T LW [AR1,P#0.0]
L #tRecBytes
T LW [AR1,P#2.0] //no of bytes
L 81
T LW [AR1,P#4.0] //DB No
L #RecStartAdd //Start add
L P#DBX 0.0
+D
T LD [AR1,P#6.0]
CALL "BLKMOV"
SRCBLK :=#Source
RET_VAL:=#Return_Val
DSTBLK :=#Record
Network 4 -- Delete Record if requested
L #Record.Data.PalletID
T #PalletID
A #Delete
JCN END
LAR1 #RecStartAdd
OPN "TrackingData"
L L#0
T DBD [AR1,P#2.0]
Network 5 -- End
END: NOP 0
A #Trigger
= #HIS_Trigger
Rheinhardt
The problem is that the code does not always clear the palletid. Can anybody see anything that might be causing havoc on my tracking managament system..
My buffer eventually fills up and i have to clear it manually.
Thanks in Advance
Network 1 - If not pos edge then goto end
A(
L #RecNo
L 1
>=I
)
A(
L #RecNo
L 200
<=I
)
A #Trigger
AN #HIS_Trigger
JCN END
Network 2 - Setup record lengths
L 120
T #tRecBytes
L 84
T #tProdBytes
Network 3 - Get tracking data into local copy
L #RecNo
+ -1 //Get rid of offset
L #tRecBytes //bytes per item
*I
SLD 3 //convert to pointer
LAR1 //Save in address register
T #RecStartAdd
LAR1 P##Source //--Set up ANY pointer for source
L W#16#1002 //Data type header (see definition for ANY data type)
T LW [AR1,P#0.0]
L #tRecBytes
T LW [AR1,P#2.0] //no of bytes
L 81
T LW [AR1,P#4.0] //DB No
L #RecStartAdd //Start add
L P#DBX 0.0
+D
T LD [AR1,P#6.0]
CALL "BLKMOV"
SRCBLK :=#Source
RET_VAL:=#Return_Val
DSTBLK :=#Record
Network 4 -- Delete Record if requested
L #Record.Data.PalletID
T #PalletID
A #Delete
JCN END
LAR1 #RecStartAdd
OPN "TrackingData"
L L#0
T DBD [AR1,P#2.0]
Network 5 -- End
END: NOP 0
A #Trigger
= #HIS_Trigger
Rheinhardt