Execution Of The Example Project Programs; Example Program For Serving The Command Interface; Example Program For Reading And Writing Analog Values - Siemens SIMOTION Function Manual

Extension to the command interface for as-interface master modules
Hide thumbs Also See for SIMOTION:
Table of Contents

Advertisement

Example of an application

6.2 Execution of the example project programs

6.2
Execution of the example project programs
6.2.1

Example program for serving the command interface

You can use the ExampleAsiCommand example program to transfer AS-Interface commands
to the AS-Interface master with the _ASI_cmdInterface FB. You use the following variables to
control the program execution:
asiCommands
executeAsiCommand
The data read by the AS-Interface master are contained in the receiveData variable.
The status of the command processing is indicated in the following variables:
done
error
errorID
The following AS-Interface commands have been programmed:
AS-Interface command
READ_VERSION (default)
CHANGE_ASI_SLAVE_ADDRESS
READ_EXTENDED_CONFIGURATION
GET_LAS
RESET_ASI
WRITE_ANA_PARAMETER
6.2.2

Example program for reading and writing analog values

The ExampleAsiAnalog example program illustrates not only the preparation, but also the
reading and writing of analog values to and from analog AS-Interface slaves. Analog AS-
Interface slaves (each with 2 channels) with AS-Interface address 4 (analog output) and AS-
Interface address 5 (analog input) are used here.
You use the following variables to control the program execution:
wrAnaData
rdAnaData
dataAnaOut1
dataAnaOut2
36
: Selection of the AS-Interface command (default: READ_VERSION)
: Start the transfer
: Command processing completed without error
: Command processing completed with error
: Error specification / error codes
Meaning
Fetch the version identification
Change an AS-Interface slave address
Import the configuration of the AS-Interface slaves connected to the AS-Bus
Read extended lists and flags
Reset/initialize AS-Interface master
Transfer parameters to the analog AS-Interface slave with AS-Interface ad‐
dress 4 or 5
: Write analog values
: Read analog values
: Analog value for channel 1 to be written
: Analog value for channel 2 to be written
Extension to the command interface for AS-Interface master modules
Function Manual, 01/2015

Advertisement

Table of Contents
loading

Table of Contents