

By this function, unstable analog values can be converted into stable digital values.
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.)
Digital filter set value
The digital output value follows up the analog input value.
They are converted into stable digital output values.
The table below shows the relationship between the set value of BFM #6 to #9 and the operation.
BFM #0: Specifies input mode. Specify the input mode of CH1 to CH4 by writing a numeric 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),
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).
H !!!!
CH1 CH2 CH3 CH4
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).
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.
b15, b14, b13, b12, b11, b10, b9, b8, b7, b6, b5, b4, b3, b2, b1, b0
CH4 CH3 CH2 CH1 Invalid
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.

Even while an upper/lower limit value error is detected, the data (BFM #10 to BFM #13) of each channel continues to be updated. Bit assignment of BFM #26
BFM #71 to BFM #74: Lower limit, error set value BFM #81 to BFM #88: Upper limit, error set value When using the upper/lower limit value detection function (BFM #22 b1), write the lower limit value of each channel to BFM #71 to BFM #74 and the upper limit value of each channel to BFM #81 to BFM #84. When using the data addition function (BFM #22 b0), enter the value added by the addition data to BFM #61 to BFM #64. Setting range The setting range will vary depending on the setting of the input mode (BFM #0). The table below shows the setting range for each input mode. Enter the set value as a digital value.
Bit assignment of BFM #99
BFM #101 to BFM #104: Minimum value BFM #111 to BFM #114: Maximum value When using the minimum/maximum value hold function (BFM #22 b3), 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. When using the data addition function (BFM #22 b0), the minimum/ maximum measured value will be added to the addition data (BFM #61 to BFM #64). Initial value Minimum/maximum value hold function is not used:K0 Minimum/maximum value hold function is used: Digital value when the power is turned ON
BFM #27: A/D data sudden change detection status The sudden change detection function (BFM#22 b2) writes detected errors to the corresponding bits in BFM#27. The sudden change detection status for negative or positive changes is located in the first 8bits of BFM#27 in bit-pairs. 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 corresponding bit in BFM #27 turns ON. At this time, when the new value is larger than the previous value, a bit for the + direction turns ON. when the new value is smaller than the previous value, a bit for the - direction turns ON. When a bit turns ON, it remains ON until it is reset by BFM #99 or the power is turned OFF. Even while a sudden change error is detected, the data (BFM #10 to BFM #13) of each channel continues to be updated. Bit assignment of BFM #27
BFM #109: Minimum value reset BFM #119: Maximum value reset When using the minimum/maximum value hold function (BFM #22 b3), BFM #109 clears the minimum value stored in BFM #101 to BFM #104, and BFM #119 clears the maximum value stored in BFM #111 to BFM #114. The channel No. that will be reset is assigned to each bit of BFM #109 and BFM #119. When a bit is set ON, minimum/maximum value of the assigned channel is cleared. (Setting two or more bits ON simultaneously is possible.) Bit assignment
b15 Addition data setting error Addition data is incorrectly set.
Set it within range from -16,000 to 16,000.
BFM #30: Model code BFM #30 stores a fixed value of "K2070". BFM #32: Operating time BFM #32 stores the continuous operating time for the FX2NC-4AD. Measurement starts when the power is turned ON, and the measured value is reset when the power is turned OFF. The measurement range is from 0 to 64,800 (s). After that, 64,800 is kept. BFM #41 to BFM #44: Offset data BFM #51 to BFM #54: Gain data Offset data:Analog input value when the digital value is "0" Gain data :Analog input value when the digital value is as shown below (The
BFM #91 to BFM #94: Sudden change detection set value When using the sudden change detection function (BFM #22 b2), enter the set value to judge the sudden change. 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). Setting range The setting range will vary depending on the setting of the input mode (BFM #0). The table below shows the setting range for each input mode. Write the set value in a digital value.
BFM #198: Data history sampling time Set the data history sampling time. Setting range: 0 to 30,000 ms Sampling cycle
When the set value is "0" :1 ms x Number of effective channels When the set value is "1" or more:Set value (ms) x Number of effective
BFM #28: Scale over status The result of the analog input value for each individual channel that has exceeded the A/D conversion range will be written to BFM#28. Range in which A/D conversion is available:
digital value varies depending on the setting of the input mode.) Standard digital value for offset and gain in each input mode (A number in the input mode column indicates a value set in BFM #0.)
channels BFM #199: Resets or stops data history The data history reset function is assigned to the lower 4 bits of BFM #199. The data history stop function is assigned to the upper 4 bits of BFM #199. Data history reset function This function clears the sampled data history for each channel. The channel No. to be reset is assigned to each of the lower 4 bits of BFM #199. When a bit is set to ON, the data history (all contents from the 1st value to the 400th value) of the assigned channel is cleared. (The setting of two or more bits to ON simultaneously is possible.) When the clear operation is completed, each bit returns automatically to the OFF state. Assignment of lower 4 bits
A bit will remain ON unless it is reset from switching the Power OFF or overwriting the ON bit with an OFF bit via a TO instruction. Even while a scale over error is detected, the data (BFM #10 to BFM #13) of each channel continues to be updated. Bit assignment of BFM #28
Data history stop function This function will temporarily stop the data history for the individual channels. The channel No. to be temporarily stopped is assigned to each of the upper 4 bits of BFM #199. When a bit is set to ON, sampling of the data history of the assigned channel is temporarily stopped. (Setting two or more bits to ON at a time.) When a bit is set to OFF, sampling of the data history of the assigned channel restarts. Assignment of upper 4 bits
BFM #29: Error status Error information is assigned to each bit of BFM #29. Bit assignment of BFM #29
The actual effective input range is "-10 to 10 V" or "-20 to 20 mA".
BFM #99: Clears upper/lower limit value error and sudden change detection error The commands to clear the lower and upper limit value error and the sudden change detection error are assigned to the lower three bits of BFM #99. The flag of the corresponding error status (BFM #26, BFM #27) is reset for all channels simultaneously when a bit is set to ON. After the reset is finished, each bit of BFM #99 returns automatically to the OFF state. The setting of two or more clear commands to ON at the same time is possible.
BFM #61 to BFM #64: Addition data When using the data addition function (BFM #22 b0), 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 becomes the measured value added by the addition data (BFM #61 to BFM #64). When using the data addition 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). Setting range: -16,000 to 16,000
Setting range

BFM #200 to BFM #1799: Data history The A/D conversion value of each channel is sampled, and written to the BFMs shown below. The table below shows the assignment between the channel No. and the BFM No. Data is stored in ascending order of the BFM No. Up to 400 data history items are written for each channel. When the number of history items exceeds 400, the data is overwritten starting from the smallest BFM No. The data history function is valid only for channels whose number of averaging times (BFM #2 to #5) is set to "1" and digital filter setting (BFM #6 to #9) is set to "0". Assignment of channel No. and BFM No.
This section introduces an example program to read analog data from the FX2NC-4AD and connecting to digital data in the PLC. Condition
FNC 78 FROM
Reads the CH1 data history (for 10 times) to D10 to D19.
System configuration:
Refreshes the watch dog timer.*1
The FX2NC-4AD is connected as a special function block nearest to the FX2NC Series PLC main unit (unit No. 0). Input mode:
Reads the CH2 data history (for 10 times) to D20 to D29. Refreshes the watch dog timer.*1 Reads the CH3 data history (for 10 times) to D30 to D39.
K0 K600 D20 K10
CH1 and CH2: Mode 0 (voltage input, -10 to 10 V → -32000 to 32000) CH3 and CH4: Mode 3 (current input, 4 to 20 mA → 0 to 16000) Number of averaging times: 1 (initial value) in each channel I/O characteristics:
FNC 78 FROM
Standard I/O characteristics (initial value) in each channel Convenient function: Upper/lower limit value detection function is used. Data history function:
(mA) 0 4 20
(mA) 0 4 20
Refreshes the watch dog timer.*1
Used while sampling time is set to 0ms (initial value). CH1 to CH4: Sampling time = 1ms × 4 (Number of effective channels) = 4ms I/O assignment:
Reads the CH4 data history (for 10 times) to D40 to D49.
X001 : Clears the upper/lower limit value error. X002 : Clears the scale over error. Y000 to Y017: Output the upper/lower limit value error status of each
Refreshes the watch dog timer.*1
The input mode setting will be kept by the EEPROM, therefore, continual channel settings is not needed after powering down. 1)
Specifies the input mode of CH1 to CH4.
*1 When multiple data history items are read, the scan time of the PLC becomes longer. In the FX2NC Series PLC, when the scan time exceeds 200 ms, the CPU error indicator lamp lights and the PLC stops. When reading many data history items, divide data history items to be read using two or more FROM instructions, then insert the WDT (watch dog timer refresh) instruction between FROM instructions.
K0 K0 H3300 K1
For factory default, the FX2NC-4AD has standard I/O characteristics in accordance with each input mode (BFM #0). In the voltage and current input mode, adjust the standard I/O characteristics for each channel. (Do not change the input characteristics when 2, 5, 8 is set in BEM #0.)
Stand by for five seconds.
Enables the upper/ lower limit value detection function. Reads the channel data from CH1 to CH4. (CH1 → D0, CH2 → D1, CH4 → D3) Reads the upper/lower limit value error status. (M0 to M15)
P
K0 K22 H0002 K1
7.1 Standard I/O characteristics
FNC 78 FROM
K0 K10 D0 K4
The input mode of the standard I/O characteristics is abbreviated as shown below:
K0 K26 K4M0 K1
: Input mode set in BFM #0 : Analog input range
: Input mode : Digital output range
Reads the scale over status.(M20 to M35)
Reads the error status. (BFM #29 → D6)
Clears the upper/lower limit value error.
X002 Clear of scale over error
32000 Approx. 32640
4,000 Approx. 4,080
Approx.
Approx.
Clears the scale over error.
Adjust the I/O characteristics using the buffer memories in the FX2NC-4AD. Firstly, enter the input mode to BFM #0, then enter the offset data to BFM #41 to BFM #44, subsequently enter the gain data to BFM #51 to BFM #54. Update the offset data and the gain data for each channel using BFM #21. Example program (Adjustment of CH1, CH2 and CH4)
Y0 M0 Lower limit value error of CH1
(V)
Approx.
Approx.
Y1 M1 Upper limit value error of CH1
-32000 Approx. -32640
-4,000 Approx. -4,080
Outputs the upper/ lower limit value error status of each channel.
K0 K0 H1600 K1
Specifies the input mode of CH1 to CH4.
Y7 M7 Upper limit value error of CH4
M0
M0
TO K50 *1
Y20 M20 Scale over error of CH1 (lower limit value)
FNC 79 TO P
Offset value of CH1 and CH2. Gain value of CH1 and CH2.
10,000 Approx. 10,200
Approx.
Y21 M21 Scale over error of CH1 (upper limit value)
K0 K51 K1250 K2
Outputs the scale over error status of each channel.
Offset value of CH4.
Approx.
FNC 79 TO P
Y27 M27 Scale over error of CH8 (upper limit value)
-10,000 Approx. -10,200
Gain value of CH4.
(mA) 0 4 20
K0 K21 H000F K1
Offset value and gain value of all channels at a time.
*1 It takes approximately 5 seconds to change the input mode (BFM #0) (to change each set value). Assure that a time interval of 5 seconds or more is held after a change of the input mode until execution of write of each setting (TO instruction). • The I/O characteristics can be written (BFM #21) to either channel, or two or more channels simultaneously.
When exported from Japan, this manual does not require application to the Ministry of Economy, Trade and Industry for service transaction permission.
Specifications are subject to change without notice
Owners and our team usually reply within a day — and your question helps the next person too.
Be the first to ask — other owners or our team will answer.