EasyManua.ls Logo

Nidec Unidrive M300 - Page 160

Nidec Unidrive M300
216 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
160 SI-Ethernet User Guide
Issue: 3
The user program in the SI-Applications Plus module may be written as follows (some changes
may be necessary to account for bus cycle times and parameter update rates):
Initial{
// Initialise variables
NewValue% = 0
#86.03 = 0 // Set digital output0 off
#86.04 = 0 // Set digital output1 off
#20.011 = 0 // Set input parameter 1 to 0
#20.012 = 0 // Set input parameter 2 to 0
#20.021 = 0 // Set output parameter 1 to 0
REINIT // Initialise configuration
} //Initial
Background{
top:
IF #18.32 = 1 THEN
// Output trigger set
// Check first sum value against NewValue
IF #20.021 = NewValue% THEN
// OK increment values by 1
NewValue% = NewValue% + 1
IF NewValue% > 32767 THEN NewValue = -32768
#20.011 = NewValue%
#20.012 = NewValue%
// Set input trigger – Read input parameters and transmit to master
#18.031 = 1
// Delay for PLC to get inputs - depends on cycle time and
parameter access time
DO WHILE #18.031 = 1
// Dummy command
NewValue% = NewValue%
LOOP
// Reset output trigger
#18.032 = 0
// Delay for outputs to be written - depends on parameter access time
DO WHILE #18.032 = 0
// Dummy command
NewValue% = NewValue%
LOOP

Table of Contents

Related product manuals