H!!!!
CH1
CH2
CH3
CH4

6.Buffer Memory (BFM)

Data transfer between the FX2NC-4AD and the PLC main unit is performed via buffer memories (hereafter referred to as "BFM") of the FX2NC-4AD. Each BFM consists of 1 word, 16 bits. BFM No. 0 to 1799 have assigned functionality, communication with these BFMs should be performed using TO/FROM instructions supplied by the PLC main unit.

When the power is switched ON from OFF, the initial value is written to each BFM. Create a program for the PLC so that the desired contents are written to the BFMs every time the power of the PLC is turned ON.

(The contents stored in BFM #0, #19, #22, #41 to #44 and #51 to #54 are held in the built-in EEPROM, and kept against power failure.)

6.1 Buffer Memories (BFM) lists

BFM

Description

Initial value

No.

 

 

 

#0

Specifies input mode of CH1 to CH4.

H0000

 

 

 

 

#1

Reserved

 

 

 

 

#2

Number of averaging times for CH1

K1

Setting range: 1 to 4,095 times

 

 

 

 

 

#3

Number of averaging times for CH2

K1

Setting range: 1 to 4,095 times

 

 

 

 

 

#4

Number of averaging times for CH3

K1

Setting range: 1 to 4,095 times

 

 

 

 

 

#5

Number of averaging times for CH4

K1

Setting range: 1 to 4,095 times

 

 

 

 

 

 

#6

CH1: Digital filter setting

Set range: 0 to 1,600

K0

 

 

 

 

#7

CH2: Digital filter setting

Set range: 0 to 1,600

K0

 

 

 

 

#8

CH3: Digital filter setting

Set range: 0 to 1,600

K0

 

 

 

 

#9

CH4: Digital filter setting

Set range: 0 to 1,600

K0

 

 

 

#10

CH1 data (immediate data or average data)

 

 

 

#11

CH2 data (immediate data or average data)

 

 

 

#12

CH3 data (immediate data or average data)

 

 

 

#13

CH4 data (immediate data or average data)

 

 

 

 

Reserved

 

 

 

 

 

 

Disables setting change of I/O characteristics

 

#19

(BFM #0, BFM #1, BFM #21) and convenient

K1

functions (BFM #22).

 

 

 

 

 

Disables change: K2, Enables change: K1

 

 

 

 

 

 

Initializes functions.

 

 

#20

(Initializes functions at K1, then returns

K0

BFM

 

Description

Initial value

No.

 

 

 

 

Reserved

 

 

 

 

 

#61

CH1 addition data

Setting range: -16,000 to 16,000

K0

(valid while BFM #22 b0 is ON)

 

 

 

 

 

 

#62

CH2 addition data

Setting range: -16,000 to 16,000

K0

(valid while BFM #22 b0 is ON)

 

 

 

 

 

 

#63

CH3 addition data

Setting range: -16,000 to 16,000

K0

(valid while BFM #22 b0 is ON)

 

 

 

 

 

 

#64

CH4 addition data

Setting range: -16,000 to 16,000

K0

(valid while BFM #22 b0 is ON)

 

 

 

 

 

 

Reserved

 

 

 

 

 

 

CH1 lower limit error set value (valid while BFM #22

Minimum digital

#71

value inside input

b1 is ON)

 

 

 

range

 

 

 

 

 

 

 

 

CH2 lower limit error set value (valid while BFM #22

Minimum digital

#72

value inside input

b1 is ON)

 

 

 

range

 

 

 

 

 

 

 

 

CH3 lower limit error set value (valid while BFM #22

Minimum digital

#73

value inside input

b1 is ON)

 

 

 

range

 

 

 

 

 

 

 

 

CH4 lower limit error set value (valid while BFM #22

Minimum digital

#74

value inside input

b1 is ON)

 

 

 

range

 

 

 

 

 

 

 

Reserved

 

 

 

 

 

 

CH1 upper limit error set value (valid while BFM #22

Maximum digital

#81

value inside input

b1 is ON)

 

 

 

range

 

 

 

 

 

 

 

 

CH2 upper limit error set value (valid while BFM #22

Maximum digital

#82

value inside input

b1 is ON)

 

 

 

range

 

 

 

 

 

 

 

 

CH3 upper limit error set value (valid while BFM #22

Maximum digital

#83

value inside input

b1 is ON)

 

 

 

range

 

 

 

 

 

 

 

 

CH4 upper limit error set value (valid while BFM #22

Maximum digital

#84

value inside input

b1 is ON)

 

 

 

range

 

 

 

 

 

 

 

Reserved

 

 

 

 

 

 

CH1 sudden change detection set value

 

#91

Setting range: 1 to 50% of full scale (valid while BFM

5% of full scale

 

 

 

 

BFM

Description

Initial value

No.

 

 

 

 

Data history sampling time

 

 

 

[Effective only for channels whose number of

K0

#198

averaging times (BFM #2 to #5) is 1 and digital filter

 

setting (BFM #6 to #9) is 0]

 

 

 

Setting range: 0 to 30,000 ms

 

 

 

 

 

 

 

Resets or stops data history.

 

 

#199

[Effective only for channels whose number of

K0

averaging times (BFM #2 to #5) is 1 and digital filter

 

setting (BFM #6 to #9) is 0]

 

 

 

 

 

 

#200

CH1 data history (1st value)

Data history sampling

K0

 

 

is effective only for

 

channels whose

number of averaging

 

CH4 data history (400th

times (BFM #2 to #5)

 

#1799

is 1 and digital filter

K0

 

value)

setting (BFM #6 to #9)

 

 

 

is 0.

 

 

 

 

 

6.2 Details of buffer memories

BFM #0: Specifies input mode.

Specify the input mode of CH1 to CH4 by writing a numeric BFM#0 value to BFM #0.

The input mode specification declares, each BFM expressed as a 4-digit hexadecimal code, and each channel No. is assigned to each digit. Specify a numeric value 0 to F in

each digit for each channel.

!=0: Voltage input mode (-10 to 10V -32000 to 32000), resolution 0.32mV

!=1: Voltage input mode (-10 to 10V -4000 to 4000), resolution 2.50mV

!=2: Voltage input mode (-10 to 10V -10000 to 10000), resolution 1mV

!=3: Current input mode (4 to 20mA 0 to 16000), resolution 1.25 A

!=4: Current input mode (4 to 20 mA 0 to 4000), resolution 5.00 A

!=5: Current input mode (4mA to 20mA 4000 to 20000), resolution 1.25 A

!=6: Current input mode (-20 to 20 mA -16000 to 16000), resolution 1.25 A

!=7: Current input mode (-20 to 20 mA -4000 to 4000), resolution 5.00 A

!=8: Current input mode (-20 to 20 mA -20000 to 20000), resolution 1.25 A !=9 to E:Unusable

!=F: Corresponding CH is not used.

• The input characteristics are changed automatically according to the setting of

BFM #0. (The input characteristics can be changed to independent values

except when !=2, 5, 8 is set in BFM #0 that disables all changes to the offset or

gain.)

• It takes approximately 5 seconds to change the input mode (to change each

set value).

By this function, unstable analog values can be converted into stable digital values.

Analog

Analog input value

value

Digital output value

 

Digital filter set value

 

The digital output value follows up the

 

analog input value.

 

They are converted into stable digital output values.

Time

The table below shows the relationship between the set value of BFM #6 to #9 and the operation.

 

 

Set value < 0

Digital filter function is invalid. Set value error occurs

(BFM #29 b11 turns ON.).

 

 

 

Set value = 0

Digital filter function is invalid.

 

 

1 Set value 1,600

Digital filter function is valid.

 

 

1,600 < Set value

Digital filter function is invalid. Set value error occurs

(BFM #29 b11 turns ON.).

 

 

 

 

 

BFM #10 to BFM #13: Channel data

The A/D conversion data for each channel is written to BFM #10 to #13.

BFM #19: Disables setting change

BFM #19 enables or disables the setting change of the I/O characteristics (BFM #0, #41 to #44, #51 to #54), the convenient functions (BFM #22).

K1: Enables change (factory default).

K2: Disables change.

BFM #20: Initializes functions

BFM #20 initializes all data stored in BFM #0 to BFM #1799, and sets the FX2NC-4AD to factory default.

By initialization, the input characteristics are reset to the values set at factory default (voltage input, offset value K0, gain value K5000).

K0: Normal

K1: Executes initialization. (Writes K1, subsequently returns to K0 when initialization is completed.)

BFM #21: Writes I/O characteristics

Each channel No. is assigned to the lower 4 bits of BFM #21.

When a bit is set to ON, the offset data (BFM #41 to BFM #44) and the gain data (BFM #51 to BFM #54) of the assigned channel No. are written to the built-in memory (EEPROM).

Give the write command to two or more channels at a time. (When entering "HF", all channels are written to.)

When the write is completed, BFM #21 subsequently returns to K0.

BFM21

b15, b14, b13, b12, b11, b10, b9, b8, b7, b6, b5, b4 , b3 , b2, b1, b0

automatically to K0 after initialization is

completed.)

#22 b2 is ON)

Time interval of 5 seconds or more after changing the input mode until the

write of each setting (TO instruction) is performed.

Invalid

CH4 CH3 CH2 CH1

 

Writes I/O characteristics. (Returns

 

#21

automatically to K0 after write of offset/gain

K0

 

value is finished.)

 

 

 

 

 

Sets convenient functions (data addition, upper/

 

#22

lower limit value detection, sudden change

K0

 

detection and minimum/maximum value hold).

 

 

 

 

Reserved

 

 

#26

Upper/lower limit value error status (valid while

K0

BFM #22 b1 is ON)

 

 

 

 

 

#27

A/D data sudden change detection status (valid

K0

while BFM #22 b2 is ON)

 

 

 

 

 

#28

Scale over status

K0

 

 

 

#29

Error status

K0

 

 

 

#30

Model code (K2070)

K2070

 

 

 

#31

Reserved

 

 

 

 

Operating time 0 to 64,800 (s)

 

 

Subsequently, 64,800 is kept.

 

#32

Measurement starts when the power is turned

K0

 

on, and the measured value is reset when the

 

 

power is turned off.

 

 

 

 

Reserved

 

 

#41

CH1 offset data (mV or A)

K0

 

 

 

#42

CH2 offset data (mV or A)

K0

 

 

 

#43

CH3 offset data (mV or A)

K0

 

 

 

#44

CH4 offset data (mV or A)

K0

 

 

 

Reserved

 

 

#51

CH1 gain data (mV or A)

K5000

 

 

 

#52

CH2 gain data (mV or A)

K5000

 

 

 

#53

CH3 gain data (mV or A)

K5000

 

 

 

#54

CH4 gain data (mV or A)

K5000

 

 

 

 

CH2 sudden change detection set value

 

#92

Setting range: 1 to 50% of full scale (valid while BFM

5% of full scale

 

#22 b2 is ON)

 

 

 

 

 

CH3 sudden change detection set value

 

#93

Setting range: 1 to 50% of full scale (valid while BFM

5% of full scale

 

#22 b2 is ON)

 

 

 

 

 

CH4 sudden change detection set value

 

#94

Setting range: 1 to 50% of full scale (valid while BFM

5% of full scale

 

#22 b2 is ON)

 

 

 

 

Reserved

 

 

#99

Clear of upper and lower limit value error and sudden

K0

change detection error

 

 

 

 

 

#100

Reserved

 

 

 

#101

CH1 minimum value (valid while BFM #22 b3 is ON)

 

 

 

 

#102

CH2 minimum value (valid while BFM #22 b3 is ON)

 

 

 

 

#103

CH3 minimum value (valid while BFM #22 b3 is ON)

 

 

 

 

#104

CH4 minimum value (valid while BFM #22 b3 is ON)

 

 

 

 

Reserved

 

 

#109

Minimum value reset

K0

 

 

 

#110

Reserved

 

 

 

#111

CH1 maximum value (valid while BFM #22 b3 is ON)

 

 

 

 

#112

CH2 maximum value (valid while BFM #22 b3 is ON)

 

 

 

 

#113

CH3 maximum value (valid while BFM #22 b3 is ON)

 

 

 

 

#114

CH4 maximum value (valid while BFM #22 b3 is ON)

 

 

 

 

Reserved

 

 

#119

Maximum value reset

K0

 

 

 

Reserved

 

 

Setting "HFFFF" to allocate all channels as unusable is not allowed.

BFM #2 to BFM #5: Number of averaging times

(Make sure to set the number of averaging times to "1" when using the digital filer.)

The allowable set range of the number of averaging times is 1 to 4,095.

If the number of averaging times is set to "1", the immediate data (current value) is stored in BFM #10 to #13. Otherwise, BFM #10 to BFM #13 will be averaged depending on the value set in BFM #2 to BFM #5.

If the number of averaging times is set to "0" or less, "0" is written. If the number of averaging times is set to "4,096" or more, "4096" is written. In either case, number of averaging times setting error (BFM #29 b10) occurs. The initial set value is "1".

Average data update

When the number of averaging times (BFM #2 to BFM #5) is set to "400" or less, the average (BFM #10 to BFM #13) is updated every time the A/D conversion processing is performed.

The update time is as follows:

Average data update time = (A/D conversion time) x Number of channels

When the number of averaging times (BFM #2 to BFM #5) is set to "401" or more, the average (BFM #10 to BFM #13) is updated every time the A/D conversion is performed by as many as the set number of averaging times. The update time is as follows:

Average data update time = (A/D conversion time) x Number of channels x Number of averaging times

In either case above, until the number of A/D conversion times reaches the set number of averaging times for the first time, the average at each time point is stored in BFM #10 to BFM #13.

BFM #6 to BFM #9: Digital filter setting

(Effective only when the number of averaging times is set to "1")

Setting BFM #6 to BFM #9 to "1" invokes, the digital filter which can be provided for each channel. If the fluctuation of the analog input value is less than the set value of BFM #6 to #9, the analog input value is converted into a stabilized digital output value. If the analog input value exceeds the set value, the proceeding digital conversion value will follow and replicate there values. The data is updated every "5ms x Number of channels", and stabilized by the last 20 data.

BFM #22: Sets convenient functions

The functions described below are assigned to b0 to b3 of BFM #22. When a bit is set to ON, the assigned function becomes valid.

When a bit is set to OFF, the assigned function becomes invalid. b0: Data addition function

The data (BFM #10 to BFM #13), minimum/maximum value (BFM #101 to BFM #104, BFM #111 to BFM #114) and data history (BFM #200 to BFM #1799) of each channel is the measured value added by the addition data (BFM #61 to BFM #64).

When using this function, enter the value added by the addition data (BFM #61 to BFM #64) to the lower limit value error set value (BFM #71 to BFM #74) and the upper limit value error set value (BFM #81 to BFM #84).

The addition data (BFM #61 to BFM #64) is not added to the scale over data (BFM #28).

b1: Upper/lower limit value detection function

When the A/D conversion data of each channel is outside the range of the lower limit value error set value (BFM #71 to BFM #74) to the upper limit value error set value (BFM #81 to BFM #84), the result is written to the upper/lower limit value error status (BFM #26).

b2: Sudden change detection function

When the data (BFM #10 to BFM #13) of each channel is updated, if the difference between the previous value and the new value is larger than the sudden change detection set value (BFM #91 to BFM #94), the result is written to the sudden change detection status (BFM #27).

b3: Minimum/maximum value hold function

The minimum value of the data (BFM #10 to BFM #13) of each channel is written to BFM #101 to BFM #104, and the maximum value is written to BFM #111 to BFM #114.

BFM #26: Upper/lower limit error status

The upper /lower limit value detection function (BFM#22 b1), writes detected errors to the corresponding bits in BFM#26 (see table). Upper and lower limit error status for the four channels is located in bit-pairs in the first 8bits of BFM#26.

When the data (BFM #10 to BFM #13) of any channel is outside the range from the lower limit error value (BFM #71 to BFM #74) to the upper limit error value (BFM #81 to BFM #84), the corresponding bit turns ON.

When a bit turns ON, it remains ON until it is reset by BFM #99 or the power is turned OFF.