JDCROCKETT724
Member
OP
A couple questions/comments. Your code has been very helpful, and I have been going through it very carefully so that I understand what is happening.
In OB1 you use FC20 and network 2 to extract the 300 out of IB300 and then use this variable as the StatusInputsAddress of FB4. Could you also simply place a constant of 300 on the FB4 instead of StatusInputsAddress, and eliminate the need for network 1 and 2?
In FB4 I understand how you use FC20 to extract useful information such as the count of the udt. In network 2 I get a little confused on some parts.
LAR1 P##pSrc Does this load AR1 with Pointer data psrc?
L W#16#1002
T W [AR1,P#0.0]
L #InputStatus.iCount
T W [AR1,P#2.0]
L 0
T W [AR1,P#4.0]
L #StatusInputsAddress I see why you have to shift left here
SLD 3
L P#I 0.0 But I don't understand loading P#I 0.0
+D
T D [AR1,P#6.0]
And then how does AR1 get transferred as P##pSrc?
Thanks for all your help so far!
In OB1 you use FC20 and network 2 to extract the 300 out of IB300 and then use this variable as the StatusInputsAddress of FB4. Could you also simply place a constant of 300 on the FB4 instead of StatusInputsAddress, and eliminate the need for network 1 and 2?
In FB4 I understand how you use FC20 to extract useful information such as the count of the udt. In network 2 I get a little confused on some parts.
LAR1 P##pSrc Does this load AR1 with Pointer data psrc?
L W#16#1002
T W [AR1,P#0.0]
L #InputStatus.iCount
T W [AR1,P#2.0]
L 0
T W [AR1,P#4.0]
L #StatusInputsAddress I see why you have to shift left here
SLD 3
L P#I 0.0 But I don't understand loading P#I 0.0
+D
T D [AR1,P#6.0]
And then how does AR1 get transferred as P##pSrc?
Thanks for all your help so far!