uPLC

Introduction

The internal u-PLC is used to connect the external world (inputs/outputs) with the world of the parameters of the integrated drive NLi linear motor. The PLC can be used to copy digital input to a binary parameter, to copy a binary parameter to a digital output and to execute mathematical and Boolean operations. The PLC program must be inserted as a list of instructions by using the keyboard or by the serial line using a PC and an interface program. A PLC program written to meet the needs of a large number of applications corresponds to the default parameters. In most cases it is not necessary to program the PLC itself. The main features of the uPLC are:

64 program steps

6msec of fixed scanning time

2 timers

15 different instructions

stack depth equal to 1

mathematical operations 16 / 32 bits

uPLC feature is available using Firmware version >= 5E41

Please note that when the uPLC is running the 3 digital ouputs are under control of the PLC program !
So, the PLC program can associate every events to these 3 digital outputs instead of the standard options.

PLC instructions

Symbol	Instruction	Parameter	Comment
sim_1.jpg	LD	Pa,y	loads the y bit of the Pa parameter on the stack
sim_2.jpg	LDn	Pa,y	loads the negated y bit of the Pa parameter on the stack
sim3.jpg	OUT	Pa,y	sets the y bit of the Pa parameter to the value loaded on the stack
sim4.jpg	OUTn	Pa,y	places the y bit of the Pa parameter to the value of stack negating it
sim5.jpg	SET	Pa,y	if the stack = 1, the y bit of the Pa parameter is set to 1
sim6.jpg	RES	Pa,y	if the stack = 1, the y bit of the Pa parameter is set to 0
sim9.jpg	AND	Pa,y	if the bit loaded on the stack contains the result of the logical AND operation between itself and the y bit of the Pa parameter
sim10.jpg	ANDn	Pa,y	the bit of the stack contains the result of the logical AND operation between itself and the y bit of the negated Pa parameter
sim9.jpg	OR	Pa,y	the bit loaded on the stack contains the result of the logical OR operation between itself and the y bit of the Pa parameter
sim10.jpg	ORn	Pa,y	the bit on the stack contains the result of the logical OR operation between itself and the y bit of the negated Pa parameter
sim11.jpg	ADD	Pa,Pb,Pc	if the bit on the stack = 1, the addition operation is executed on the parameters in which: Pc = Pa + Pb
sim12.jpg	SUB	Pa,Pb,Pc	if the bit on the stack = 1, the subtraction operation is executed on the parameters in which: Pc = Pa – Pb
sim13.jpg	MUL	Pa,Pb,Pc	if the bit on the stack = 1, the multiplication operation is executed on the parameters in which: Pc = Pa ⋅ Pb
sim14.jpg	DIV	Pa,Pb,Pc	if the bit on the stack = 1, the division operation is executed on the parameters in which: Pc = Pa / Pb. If Pb is equal to 0 the division operation is not executed
move_symbol.jpg	MOV	Pa, Pb	if the bit on the stack = 1, Pa register is copy to Pb register
cmp_symbol.jpg	CMP	Pa, Pb	if the bit on the stack = 1, Compare Pa register with Pb register. If Pa is equal to Pb Register 8671 bit 3 is set to 1, if Pa < Pb bit 2 is set to 1, if Pa > Pb bit 4 is set to 1.
sim15.jpg	END	end of program