AM335X-PAC Series User Manual version 2.0.1 Page: 125
Copyright © 2019 ICP DAS Co., Ltd. All Rights Reserved. E-mail: [email protected]
7.4. Power-on Value Settings
This section will discuss the Power-on Value functions that are adopted in the Linux PAC. When
the Power-on Value function is active, the DO or AO output will be restored to the preconfigured
value if the power supply has an on/off switch. The following is an operational example using an
I-87024W module inserted in an LP-8x21 controller.
Communicate with the I-87K Series module using the setexdo.c and getsendreceive.c programs.
Sample code can be found in the
C:\cygwin\LinPAC_am335x_SDK\examples\common
or
root@LinuxPC-ICPDAS:/icpdas/linpac_am335x_sdk/i8k/examples/common
folder. The following is
the procedure for configuring the Power-on Value:
Step 1: Configure the channel value for the I/O module
Set the Analog Output value to
2
V
for
channel
0
on the I-87024W module and use a multimeter
to measure the output voltage of channel 0, as illustrated in Figure 7.4-1.
# ./setexao 1 1
2 0
// Command syntax: setexao <slot> 1 <value> <channel>
Step 2: Set the Power-on Value for the specified output channel
Set the Analog Output value for channel 0 to the Power-on Value on the I-87024W module, as
illustrated in Figure 7.4-1.
# getsendreceive 1 1 1 '
$
00
40
' 115200
//
DCON command: ‘$AA
4N
’
. Refer to the Notes below for additional information.
Figure 7.4-1.
Power-on Value settings