12
3D Printer with B&R Automation

3D Printer with B&R Automation. Mapp Modular app programming: dividing program into modules so that they can be easily shared for diff applications and

Embed Size (px)

Citation preview

Page 1: 3D Printer with B&R Automation. Mapp Modular app programming: dividing program into modules so that they can be easily shared for diff applications and

3D Printer with B&R Automation

Page 2: 3D Printer with B&R Automation. Mapp Modular app programming: dividing program into modules so that they can be easily shared for diff applications and

Mapp

Modular app programming:

dividing program into modules so that they can be easily shared for diff applications and be loaded in

smaller little memory.

Technology Solutions

Inherit most objects

(functional blocks and data types) from Mapp eg:

3AxCNC

3D printer objects

Customized solutions for us. Like heater control

Page 3: 3D Printer with B&R Automation. Mapp Modular app programming: dividing program into modules so that they can be easily shared for diff applications and

Parts of the programHolds configurations for translating formats understood by

working file. Eg: converting G codes

Programs for handling recipes, data while run time ( activity log), alarms,

file management & User login

Links axis to main CNC program. Run only once

Implements all controls. Run cyclically – for real time changes

Used for controlling drives. They are reset once activity is completed

Page 4: 3D Printer with B&R Automation. Mapp Modular app programming: dividing program into modules so that they can be easily shared for diff applications and

Closed Loop Control

Can use the following libraries :MTBasics - Basic mechatronic blocks for standard closed loop controller tasks, e.g. PID controllers MTFilter - Mechatronic function blocks for filtering signals, e.g. suppressing noise and resonant frequencies MTProfile - Mechatronic function blocks for setpoint generation, e.g. motion profiles

Page 5: 3D Printer with B&R Automation. Mapp Modular app programming: dividing program into modules so that they can be easily shared for diff applications and

Function block for tuning PID parameters using oscillation

autotuning from the MTBasics library

PID controller FB from the MTBasics library

Page 6: 3D Printer with B&R Automation. Mapp Modular app programming: dividing program into modules so that they can be easily shared for diff applications and

MTBasicsPID PID controller. Enable VAR_INPUT Enables/Disables the function block. Parameter VAR_INPUT PID parameters. SetValue VAR_INPUT Set value (reference variable). ActValue VAR_INPUT Actual value (controlled variable). Out VAR_OUTPUT Controller output. Value range: MinOut <= Out <= MaxOut. ControlError VAR_OUTPUT Control error. ProportionalPart VAR_OUTPUT Proportional component. IntegrationPart VAR_OUTPUT Integral component. DerivativePart VAR_OUTPUT Derivative component.

Page 7: 3D Printer with B&R Automation. Mapp Modular app programming: dividing program into modules so that they can be easily shared for diff applications and

MTBasicsOscillationTuning Oscillation tuning for PID. Enable VAR_INPUT Enables/Disables the function block. SetValue VAR_INPUT Reference variable (setpoint).

MinOut VAR_INPUTLower manipulated variable limit. Valid value range: MinOut < MaxOut.

MaxOut VAR_INPUTUpper manipulated variable limit. Valid value range: MaxOut > MinOut.

Invert VAR_INPUT Inverts the direction of the controller. ActValue VAR_INPUT Actual measured value.

Out VAR_OUTPUTOutput value (manipulated variable). Value range: MinOut <= Out <= MaxOut.

TuningActive VAR_OUTPUT Tuning is active. TuningDone VAR_OUTPUT Tuning completed. Gain VAR_OUTPUT Calculated proportional gain.

IntegrationTime VAR_OUTPUTCalculated integral action time of the integration component. Unit: [s].

DerivativeTime VAR_OUTPUTCalculated derivative action time constant of the derivative component. Unit: [s].

FilterTime VAR_OUTPUT Calculated filter time constant of the D component. Unit: [s].

Quality VAR_OUTPUTQuality of the oscillation tuning. Unit: [%]. Value range: 0 (low) ... 100 (high).

Page 8: 3D Printer with B&R Automation. Mapp Modular app programming: dividing program into modules so that they can be easily shared for diff applications and

Heater control in 3d printer

• Doesn’t have a combined functional block like the default solution• Variables are Fb themselves. • The ladder diag doesn’t exit. Its made in ST lang.

Page 9: 3D Printer with B&R Automation. Mapp Modular app programming: dividing program into modules so that they can be easily shared for diff applications and

Setting up CNC for 3D printer with B&R • Has solution for CNC .• Function blocks exist for implementing CNC codes• Steps:• Choose drive in physical view and define CNC config using wizard• Define CNC axis obj ( .cns )and initial parameter define(init).• Map object (initial parameters to variable, channels etc)• Arrange drive settings for sampling rate etc.• Assign Cyclic task rates

Page 10: 3D Printer with B&R Automation. Mapp Modular app programming: dividing program into modules so that they can be easily shared for diff applications and

MPCNC3Axis FB: 3 axes CNC control

• Functional block in 3AxCncCyclic

(Cmd:=(Enable:=TRUE,Override:=100.0),Parameters:=(ProgramName:='Squares',Block:='G01 X0 Y0 Z0

F1000',Jog:=(Coord:=mpCNC_3AXIS_TCP_X,Velocity:=10.0,Acceleration:=500.0,Deceleration:=500.0)),ProgrammList:=['Squares','Helix','Two_Colo'

,'stand.gcode',2('')]) MpLink VAR_INPUT Incoming communication handle, used for MpCom connection and hierarchical mapp Power VAR_INPUT Power CNC axes Home VAR_INPUT Home CNC axes MoveProgram VAR_INPUT Start CNC program Interrupt VAR_INPUT Interupt CNC program Continue VAR_INPUT Continue CNC program Stop VAR_INPUT Stop CNC program Restart VAR_INPUT Stop CNC program JogPositive VAR_INPUT Jog selected axis in positive direction in defined coordinate system JogNegative VAR_INPUT Jog selected axis in negative direction in defined coordinate system MoveBlock VAR_INPUT Move CNC to a point in defined coordinates system

Parameters VAR_INPUTFunction block parameters. Parameters are only applied with a rising edge on the Update input.

SingleStep VAR_INPUT Control program in single step X VAR_OUTPUT Actual position of X coordinate in Machine Coordinate System Y VAR_OUTPUT Actual position of Y coordinate in Machine Coordinate System Z VAR_OUTPUT Actual position of Z coordinate in Machine Coordinate System PathVelocity VAR_OUTPUT Actual path velocity IsHomed VAR_OUTPUT CNC referenced InMotion VAR_OUTPUT At least one CNC axis is moving MoveDone VAR_OUTPUT Movement is finished, only for MoveProgram Stopped VAR_OUTPUT Movement is stopped

Values for these IO pins in Fb are given using data type from standard Mapp functions and inheriting them via OOP hierarchy (eg: from 3AxisDelta component -local variables)

Page 11: 3D Printer with B&R Automation. Mapp Modular app programming: dividing program into modules so that they can be easily shared for diff applications and

Variables in 3AxCnc Delta Robot (Program-object)Cnc3AxControl DeltaControlType CncAxisX MpAxisBasic CncAxisY MpAxisBasic CncAxisZ MpAxisBasic CncAxisE1 MpAxisBasic Q1ParaY MpAxisBasicParTypeQ1ParaZ MpAxisBasicParTypeQ1ParaE1 MpAxisBasicParTypeQ1ParaE2 MpAxisBasicParTypeQ1ParaX MpAxisBasicParTypeMFunction_104 MC_BR_MFunction ExtruderTemp on with temp set point and head #MFunction_140 MC_BR_MFunction BedTemp on with temp set pointMFunction_126 MC_BR_MFunction Fan on with speed set point MFunction_127 MC_BR_MFunction Fan offMFunction_133 MC_BR_MFunction Stabilize head temp to ready valueMFunction_134 MC_BR_MFunction Stabilize bed temp to ready valueMFunction_135 MC_BR_MFunction Select HeadMFunction_162 MC_BR_MFunction Home XY axes

Functional blocks (Mapp components for basic axis handling )

Axis runtime parameters

Functions written in ST text that implements a function at the

positive edge pos and resets value afterwards. M code?

Page 12: 3D Printer with B&R Automation. Mapp Modular app programming: dividing program into modules so that they can be easily shared for diff applications and

CncAxisX FB : MpAxisBasic for all Axis & Extr

MpLink Incoming communication handle (mapp standard interface) Enable Enables/Disables the function block (mapp standard interface) Parameters Function block parameters (mapp standard interface)

PowerPower axis. It is a level sensitive input, only in case of error it's necessary to create a new positive edge for power again the axis after the error has been resetted

Home Home axis. Positive edge of input start the homing procedure MoveVelocity Start an endless movement controlled by velocity MoveAbsolute Start an absolute movement MoveAdditive Start a relative movement Stop Stop axis JogPositive Start an endless movement in positive direction controlled by velocity limited to end position JogNegative Start an endless movement in negative direction controlled by velocity limited to end position TorqueLimit Activate the torque limitation ReleaseBrake Unlock the brake manually when the axis is not powered Active Function block is active (mapp standard interface) Position Position of the axis Velocity Velocity of the axis CommandBusy Function block is busy processing a command CommandAborted The command was aborted by another one PowerOn Axis powered IsHomed Axis homed InVelocity Axis is running at the set velocity InPosition Axis reached the defined position MoveActive Axis is executing a motion command Stopped Axis stopped TorqueLimited The torque limitation as configured is ready BrakeReleased The brake inside the motor is manually released