Examples Of Using The Ras Library; Table 6-8 Variables Used In The External General Purpose I/O Functions; Table 6-9 External General Purpose I/O Functions - Hitachi HF-W100E/IoT User Manual

Industrial controller for iot applications
Table of Contents

Advertisement

6. RAS FEATURES IN HF-W100E/IoT

6.2.3 Examples of using the RAS library

This subsection describes how to control the external general purpose I/O from applications
running on the CODESYS runtime environment.
 Adding the RAS library
Add the RAS library. For information about how to add the RAS library, the library
functions, see "6.2.2 Adding the RAS library".
 Implementation of a program using the RAS library
Implement a program. "(1) General purpose external I/O" shows an example of using the
RAS library.
(1) General purpose external I/O
The following is an example of using the RAS library for the external general purpose
I/O.
<Variables in use>
Table 6-8 shows a list of variables declared in VAR.

Table 6-8 Variables Used in the External General Purpose I/O Functions

Type
INT
USIINT
USIINT
USIINT
DWORD
DWORD
<Functions to use>
Table 6-9 shows which external general purpose I/O functions are used.
Function name
GendoControlN
GetGendiN
Name
uiState
Determines the execution state.
dwDO_port
Specifies the output state for the external general
purpose outputs.
dwDO_cmd
Specifies which external general purpose outputs to
control.
dwDI_port
Variable used for acquiring the input state of the
external general purpose inputs.
dwResult_out
Result of the external general purpose output
dwResult_in
Result of the external general purpose input

Table 6-9 External General Purpose I/O Functions

Used for controlling the output of the specified external general
purpose.
(For details about the function interface, see "6.2.1 RAS library
interface (1) Control function for the external general purpose
outputs (GendoControlN)".)
Used for getting the status of the input of the specified external
general purpose.
(For details about the function interface, see "6.2.1 RAS library
interface (2) Get function for the external general purpose inputs
(GetGendiN)".)
Use
Use
6-12

Advertisement

Table of Contents
loading

Table of Contents