Mitsubishi Electronics 13JW55 Network Card User Manual


 
7 - 16
7.5.5 Exercise with the demonstration machine
(1) Sequence program
The sequence program executes a sampling processing on analog voltages
input through CH1 of Q64AD, and then converts the analog values to digital
values.
Set the start XY of Q64AD to 80 as explained before.
Project name Q64AD
Program name MAIN
X3
0
K4Y50D10BCD
Displays digital conversion value
of CH1 on LED
X8E
9
A/D conversion completed flag
END
K0D10>=
X80
A/D module READY
X80: Module READY signal
X8E: A/D conversion completed flag
At power-on or reset of a programmable controller CPU, this flag turns on if
A/D conversion is ready to be executed. A/D conversion is executed once this
flag turned on.
(2) Operation of the demonstration machine
Stop the CPU and click
on the toolbar.
The Online Data Operation dialog box is displayed. Click the
Parameter + Program
button, then click the Execute button to write data
to the CPU. After that, activate the CPU and check the following items.
(a) Turn on X3, and change input voltages for an A/D converter module with
the volume on the demonstration machine.
Analog values that have been input to the channel 1 (CH1) of Q64AD are
stored to the buffer memory (in digital value). With the auto refresh settings,
the QCPU reads the stored digital values and stores them in its data
register D10.
(b) Whenever an analog value is "-1" or smaller, 0 is set.
(c) The digital values are displayed on the digital display (Y50 to Y5F).