background image

5

EXAMPLE PROGRAM

5.1 Basic program

In the following example channels CH1 and CH2 are used as voltage inputs. The FX-4AD block is connected
at the position of special function block No.0. Averaging is set at 4 and data registers D0 and D1 of the PC
receive the averaged digital data.

K0

K30

D4

K1

M8002

Initial
pulse

K2010

D4

M0

K0

K0

H3300

K1

K0

K1

K4

K2

K0

K29

K4M10

K1

K0

K5

D0

K2

M1

M18

M10

The analog input channels (CH1, CH2) are setup by
writing H3300 to BFM #0 of the FX-4AD.

The ID code for the special function block at position
"0" is read from BFM #30 of that block and stored at
D4 in the base unit. This is compared to check the
block is an FX-4AD, if OK M1 is turned ON. These
two program steps are not strictly needed to perform
an analog read. They are however a useful check
and are recommended as good practise.

The number of averaged samples for CH1 and CH2
is set to 4 by writing 4 to BFM #1 and #2 respectively.
Do not execute the pulse.

If there are no errors in the operation of the FX-4AD,
then the averaged data BFM's are read.
In the case of this example BFM #5 and #6 are read
into the FX base unit and stored at D0 and D1. These
devices contain the averaged data for CH1 and CH2
respectively.

The operational status of the FX-4AD is read from
BFM #29 and output as bit devices at the FX base
unit.

READY

NO
error

CMP

TO  

P

FROM

FROM

  TO

FROM

Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Summary of Contents for Melsec FX-4AD

Page 1: ... underutilized and idle equipment along with credit for buybacks and trade ins Custom engineering so your equipment works exactly as you specify Critical and expedited services Leasing Rentals Demos In stock Ready to ship TAR certified secure asset solutions Expert team I Trust guarantee I 100 satisfaction All trademarks brand names and brands appearing herein are the property of their respective ...

Page 2: ...e FX base unit is by buffer memory exchange There are 32 buffer memories each of 16 bits in the FX 4AD The FX 4AD occupies 8 points of I O on the FX FX2C expansion bus The 8 points can be allocated from either inputs or outputs The FX 4AD draws 30mA from the 5V rail of the FX base unit or powered extension unit This manual contains text diagrams and explanations which will guide the reader in the ...

Page 3: ... electrical noise connect the FG frame ground terminal with the grounded terminal on the FX 4AD 5 Connect the ground terminal on the FX 4AD unit with the grounded terminal on the base unit Use class 3 grounding on the base unit if available 73 2 87 63 2 48 95 3 74 140 5 51 125 4 92 Mounting holes 5 5mm 0 27in dia Extension cable and connector 10 0 39 M3 5 0 14 terminal screws 35mm 1 38in DIN rail ...

Page 4: ...inal Up to four input points can be used at one time Analog input range DC 10V to 10V input resistance 200K Ω DC 20mA to 20mA input resistance 250 Ω Warning this unit may be damaged by input voltage in excess of 15V Warning this unit may be damaged by input currents in excess of 32mA Digital output 12 bit conversion stored in 16 bit 2 s complement form Maximum value 2047 Minimum value 2048 Resolut...

Page 5: ...nverter isolation of power from FX base unit No isolation between analog channels Number of occupied I O points 8 points taken from the FX expansion bus can be either inputs or outputs Digital Output 10V 10 235V Voltage Input 2047 2000 10 24V 10V 2000 2048 NOTE Preset ranges are selected by an appropriate setting in buffer memory of the analog block Current Voltage input selection must match the c...

Page 6: ...rom the PC using the TO command For buffer memories BFMs without the mark data can be read to the PC using the FROM command Before reading from the analog special function block ensure these settings have been sent to the analog special function block Otherwise the previous values held in the analog block will be used The buffer memory also gives a facility to adjust offset and gain by software as...

Page 7: ...o non volatile memory gain and offset registers of the specified input channels Input channels to be adjusted are specified by the appropriate G O gain offset bits of BFM 22 Example If bits G1 and O1 are set to 1 input channel 1 will be adjusted when BFM 22 is written to by a TO instruction Channels can be adjusted individually or together with the same gain and offset values Gain and offset value...

Page 8: ...EPROM Therefore a delay timer should be used before writing to the EEPROM a second time NOTE b4 to b7 b9 and b13 to b15 are undefined Bit ON OFF b 0 Error When any of b1 to b4 is ON If any of b2 to b4 is ON A D conversion of all the channels is stopped No error b 1 Offset Gain error Offset Gain data in EEPROM is corrupted or adjustment error Offset Gain data normal b 2 Power source abnormality DC ...

Page 9: ...ue of 0 d Negative offset e Zero offset default 0V or 4mA Positive offset f Analog Digital Offset value f e d 0 1000 Digital a b c Gain value Analog Offset Gain Offset and gain can be set independently or together Reasonable offset ranges are 5 to 5V or 20mA to 20mA and gain values 1V to 15V or 4mA to 32mA Gain and offset can be adjusted by software in the FX base unit see program example 2 or by ...

Page 10: ...ed to check the block is an FX 4AD if OK M1 is turned ON These two program steps are not strictly needed to perform an analog read They are however a useful check and are recommended as good practise The number of averaged samples for CH1 and CH2 is set to 4 by writing 4 to BFM 1 and 2 respectively Do not execute the pulse If there are no errors in the operation of the FX 4AD then the averaged dat...

Page 11: ... unit Example Adjusting gain offset via software settings X010 SET M0 Adjustment start M0 TO P K0 K0 H0000 K1 TO P K0 K1 K1 K21 H0000 BFM 0 initialize input channels Enter the instructions on the left and RUN the PC with the MODE switch of the FX 4AD set to READY K1 BFM 21 BFM 21 gain offset adjust prohibit must be set to permit with b1 b0 0 1 TO K0 K0 K22 K0 BFM 22 offset gain adjust Reset adjust...

Page 12: ...sion block or special function blocks connected Put the FX base unit into RUN 6 2 Error checking If the FX 4AD special function block does not seem to operate normally check the following items Check the status of the POWER LED Lit The extension cable is properly connected Otherwise Check the connection of the extension cable Check the external wiring Check the status of 24V LED top right cover of...

Page 13: ...ill Mitsubishi Electric be liable or responsible for any consequential damage that may arise as a result of the installation or use of this equipment All examples and diagrams shown in this manual are intended only as an aid to understanding the text not to guarantee operation Mitsubishi Electric will accept no responsibility for actual use of the product based on these illustrative examples JY992...

Page 14: ...quipment Have surplus equipment taking up shelf space We ll give it a new home Learn more Visit us at artisantg com for more info on price quotes drivers technical specifications manuals and documentation Artisan Scientific Corporation dba Artisan Technology Group is not an affiliate representative or authorized distributor for any manufacturer listed herein We re here to make your life easier How...

Reviews: