Sample Program 1 "Gettingstarted - Siemens SIMATIC FM 351 Manual

Positioning module
Hide thumbs Also See for SIMATIC FM 351:
Table of Contents

Advertisement

12.7

Sample Program 1 "GettingStarted"

Aim:
With this sample, you start up your positioning module which has parameter
settings based on "Getting Started".
The sample extends the program shown in the "Linking in the User Program"
chapter of "Getting Started" by adding error evaluation.
Requirements:
You have set the parameters for your positioning module as described in "Getting
Started".
The address of your module is entered correctly in the channel DB in the
parameter MOD_ADDR and the channel number in the parameter CH_NO.
Startup:
In the startup OB (OB100) you call FC ABS_INIT that resets all the control and
return signals and the job management in the channel DB.
Cyclic Operation:
Open the variable table (VAT_CTRL_1), establish the connection to the configured
CPU and monitor the variables. Transfer the prepared control values. Activate
"CHAN_1".DRV_EN: The drive is now enabled ("CHAN_1".ST_ENBLD=1).
If the drive is not enabled, check your enable inputs.
!
Caution
With the next two steps, you start the drive.
You can stop the drive again in one of the following ways:
Set the control value for the direction to 0 again and activate it
Set the control value for the drive enable to 0 again and activate it
Change the CPU to the STOP mode
Set DIR_P=1 to travel in the plus direction in the selected mode "Jogging". If you set
DIR_P=0, the drive will be correctly deactivated.
FM 351 Positioning Module
C79000-G7076-C351-02
Samples
12-5

Advertisement

Table of Contents
loading

Table of Contents