Build parameter type "any" in step 7

D'Vince

Member
Join Date
Jul 2013
Location
Sydney
Posts
1
Dear friends,
The attached picture contains the part of a sample program that confuses me. Input parameter RECV_BUF is an ANY TYPE pointer, and in its called block it has value "DB222 DBX 0.0 BYTE 50

1. As we all know, if area register(AR1) stores 8 bytes of information only, then how can we store 10 bytes of information in it?(LAR1 P##RECV_BUF)

2. If my understanding is true, byte 8 and byte 9 are dropped when PLC loads RECV_BUF to AR1, then why it still has this command: L W[AR1,P#8.0]? Byte 8 and byte 9 shouldn't exist at all.

3.B_OFFSET comes from a previous command #count*8. Suppose that byte 8 and byte 9 are dropped when loading the RECV_BUF, how can we add the byte address directly to byte 8 and byte 9?


According to my understanding, I come up with the following program:
L D[AR1,P#0.0]
T LD 0
L D[AR1,P#4.0]
T LD 4
L B_OFFSET
SLW 3
T LW 8
......
One more thing to mention, http://www.plctalk.net/qanda/showpost.php?p=169442&postcount=6 suggests that I need to change the memory area pointer(byte 6) to 87HEX before calling SFC20, because once I am in SFC20, the memory area I am reffering to is from the previous temp area, the called block. If this is true, then why we don't see anything in this sample program? Or is it just not applicable to this case?
I tried this modified program but it does not work.

Any suggestions? Thanks

Sample Program.jpg format of the parameter Type ANY.jpg
 
1. As we all know, if area register(AR1) stores 8 bytes of information only, then how can we store 10 bytes of information in it?(LAR1 P##RECV_BUF)

2. If my understanding is true, byte 8 and byte 9 are dropped when PLC loads RECV_BUF to AR1, then why it still has this command: L W[AR1,P#8.0]? Byte 8 and byte 9 shouldn't exist at all.

3.B_OFFSET comes from a previous command #count*8. Suppose that byte 8 and byte 9 are dropped when loading the RECV_BUF, how can we add the byte address directly to byte 8 and byte 9?

AR1 points to RECV_BUF
 

Similar Topics

Hi, I would like to assemble a simulator/practice booster pump system that uses PID to maintain steady water pressure under various outlet demands...
Replies
0
Views
70
We are considering dropping our UL membership because most of our customers do not care if we are a 508A shop. However, there may be times when a...
Replies
8
Views
392
I'm looking for some clarification if anyone here is familiar with UL698a panels. Panel is out of zone/class'd area. with thermocouples extending...
Replies
0
Views
117
Hey guys, last week I posted part 1 of a series of OPC UA articles in Node-RED. That article covered some important concepts of OPC UA and how...
Replies
8
Views
3,918
Hey everyone I have an 1756-CNBR/E CONTROLNET goes faulty sometimes and now it's still faulty until I restart the main racks It shows this message...
Replies
0
Views
872
Back
Top Bottom