HCFA Corporation Limited
10
m1:Special unit or block number (K0 to K7, numbered from the MPU)
m2:Buffer memory head address (K0 to K31)
D*:Head device number of destination data. T, C, D, KnM, KnY, KnS, V, and Z can be
used to designate the head device. Each device number can be qualified using an index.
n:Number of transfer points (K1 to K32) (K1 to K16 for 32-bit command)
m1,m2,n:Same as above
S*:Head device number of source data. T, C, D, KnX, KnM, KnY, KnS, V, Z, K, and H can
be used to designate the head device. Each device number can be qualified using an
index.
When X010 and X011 are off, transfer will not be executed, therefore the destination data
value will not be changed.
6.2 AD Basic program
In the following example, CH1 and CH2 are used as voltage input. The TX2N-4AD4DA
AD block is connected at the position of special function block NO.1. The number of
averaged samples is set at 4 and data registers D0 and D1 of the main unit receive the
averaged digital data.
The ID code for the special function block at
position "1" is read from BFM #30 of that block and
stored at D4 in the main unit. This is compared
with K2010 to check that the block is AD block, if
OK M1 is turned ON.
The analog input channels (CH1, CH2) are setup
by writing H3300 to the BFM #0 of the AD block.
The number of average samples for CH1 and CH2
is set to 4 by writing 4 to BFM #1 and #2
respectively.
The operational status of 4AD is read from BFM
#29. If there are no errors in the operation of the
AD, then the averaged data BFM's are read.
In the case of this example BFM #5 and #6 are
read into the main unit and stored in D0 and D1.
These devices contain the averaged data for CH1
and CH2 respectively.
The push-button switch of PLC input terminal can adjust the gain/offset of 4AD in PLC
programming. The following is an example of changing the offset value on input channel
CH1 to 0V and the gain value to 2.5V. The 4AD block is in the position of block No.1.