Mitsubishi Electric MELSEC iQ-R User Manual page 107

High speed analog-digital converter module
Hide thumbs Also See for MELSEC iQ-R:
Table of Contents

Advertisement

■Precautions for creating the program
• Each time 5000 point logging data sets are stored in the A/D converter module, an interrupt program is executed and the
data are transferred to the file registers. The approximate instruction processing time of the interrupt program is obtained by
adding up the processing time of instructions accessing to the buffer memory areas in the interrupt program (equivalent to
a value of "five times of FROM instruction (1000 points)
*1
instruction (1 point)
") and the processing time of the IRET instruction. If the exact instruction processing time is required,
add up the processing time of all instructions used in the interrupt program. For details on the processing time of each
instruction used in the interrupt program, refer to MELSEC iQ-R Programming Manual (Instructions, Standard Functions/
Function Blocks).
• The approximate processing time of the interrupt program is obtained by adding both the interrupt overhead time and the
refresh processing time (when the refresh processing is set) at the interrupt execution to the instruction processing time of
the interrupt program. The interrupt overhead time and the refresh processing time at the interrupt execution vary
depending on the parameter settings of the CPU module. For details, refer to MELSEC iQ-R CPU Module User's Manual
(Application).
• To prevent logging data omission, create the program so that a series of processing of the interrupt program (from the start
to the completion) takes place within 20ms
occurs.
• The following table (at the bottom row) shows the formula to calculate the approximate number of channels available for
data transfer to the file registers with the interrupt program. Note that this applies to the case when a user do not create any
program. (The calculation is for when the interrupt overhead time is 20.6s and the refresh processing time at the interrupt
execution is 0s.)
Item
Instruction processing time (as a guide) of
the interrupt program
Processing time (as a guide) of the
interrupt program
Number of channels (as a guide) available
for data read
*1 This value indicates the maximum processing time of each instruction. ( MELSEC iQ-R Programming Manual (Instructions, Standard
Functions/Function Blocks))
*2 This value is for when the continuous logging is executed every 5s cycle. When using the continuous logging cycle different from 5s,
apply the value obtained from T(ms) below for the calculation of the number of channels.
T(ms) = (Continuous logging cycle (s)  5000 (points))  1000 - 5 (ms)
The calculation result of 58 channels, which is the number of channels available for data read, is a value for the case when
the program consists of only the interrupt program to transfer logging data. If a program or processing other than the interrupt
program to transfer logging data is added, the number of channels available for the continuous logging decreases. Please
consider an actual application and configure the system.
*1
+ eight times of FROM instruction (1 point)
*2
after an interrupt factor (storage of 5000 point continuous logging data sets)
Calculation formula
= (Processing time of the FROM instruction (1000 points))  (5 times) + (Processing time of the FROM instruction
(1 point))  (8 times) + (Processing time of the TO instruction (1 point))  (3 times)
+ (Processing time of the IRET instruction)  (1 time)
*1
*1
*1
 5 + 4.3s
 8 + 2.7s
= 55.6s
= 322.7s
= (Instruction processing time (as a guide) of the interrupt program) + (Interrupt overhead time)
+ (Refresh processing time at the interrupt execution)
= 322.7s + 20.6s + 0s
= 343.3s
*2
 (Processing time (as a guide) of the interrupt program)
= 20ms
= 20ms  343.3s
= Approx. 58 channels
*1
 3 + 2.2s
 1
1.15 Continuous Logging Function
1
*1
+ three times of TO
1 FUNCTIONS
105

Advertisement

Table of Contents
loading

Table of Contents