Name | Description |
---|---|
![]() | Generates cars that are sent on to the production line |
![]() | Ends the line |
![]() | Vertical table operating in southbound direction |
![]() | Table which turns the track direction southbound |
![]() | Horizontal table operating in eastbound direction |
![]() | Table which turns the track direction eastbound |
Type | Name | Description |
---|---|---|
TableComNext | tableComNext | |
input BooleanInput | next_ready | |
output BooleanOutput | next_idle | |
output BooleanOutput | next_transport |
model StartTable "Generates cars that are sent on to the production line"Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Connectors.TableComNext tableComNext; Modelica.Blocks.Interfaces.BooleanInput next_ready; Modelica.Blocks.Interfaces.BooleanOutput next_idle; Modelica.Blocks.Interfaces.BooleanOutput next_transport; equationconnect(next_ready, tableComNext.Ready); connect(next_idle, tableComNext.Idle); connect(next_transport, tableComNext.Transport); end StartTable;
Type | Name | Description |
---|---|---|
TableComPrev | tableComPrev | |
output BooleanOutput | prev_ready | |
input BooleanInput | prev_idle | |
input BooleanInput | prev_transport |
model EndTable "Ends the line"Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Connectors.TableComPrev tableComPrev; Modelica.Blocks.Interfaces.BooleanOutput prev_ready; Modelica.Blocks.Interfaces.BooleanInput prev_idle; Modelica.Blocks.Interfaces.BooleanInput prev_transport; Modelica.Blocks.Logical.Not Not; equationconnect(prev_ready, tableComPrev.Ready); connect(prev_idle, tableComPrev.Idle); connect(Not.y, tableComPrev.Transport); connect(Not.u, prev_transport); end EndTable;
Type | Name | Default | Description |
---|---|---|---|
String | processor | "" | The processor that will execute the task |
String | container | "" | The task in which the controller will run |
Integer | priority | 1 | Priority of the task |
Real | sampleTime | 0.01 | Sample time of the task |
Real | phase | 0 | Phase of the task |
Real | transportLength | 2*100 | Length of the table in pixels |
Real | transportTime | 4 | Desired time to travel through table length |
Real | carLength | 100 | Length of the car |
Type | Name | Description |
---|---|---|
RobotComTable | robotComTable | |
TableComNext | tableComNext | |
TableComPrev | tableComPrev |
model TableVertical "Vertical table operating in southbound direction" extends Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Interfaces.Table ( Prev_Ready(y=tableComPrev.Ready), CarInPosition(y=carInPosition), Robot_WorkDone(y=robotComTable.WorkDone), Next_Idle(y=tableComNext.Idle), Next_Transport(y=tableComNext.Transport));Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Connectors.RobotComTable robotComTable; Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Connectors.TableComNext tableComNext; Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Connectors.TableComPrev tableComPrev; Modelica.Blocks.Sources.BooleanExpression Prev_Transport(y=InTransport.active); Modelica.Blocks.Sources.BooleanExpression OutTransport_active(y=OutTransport.active); Modelica.Blocks.Logical.Or or1; Modelica_StateGraph2.Blocks.MathBoolean.ShowValue indicatorLamp; Modelica.Blocks.Sources.BooleanExpression Prev_Idle(y=Empty.active); Modelica.Blocks.Sources.BooleanExpression Robot_StartWork(y=Occupied.active); Modelica.Blocks.Sources.BooleanExpression Next_Ready(y=Waiting.active); equation carInPosition = pos >= -0.5 and pos < 0.5; if InTransport.active or OutTransport.active then der(pos) = transportLength/transportTime; else der(pos) = 0; end if; if Empty.active then newPoints=[zeros(4),zeros(4)]; else newPoints = {{25,-50},{-25,-50},{-25,50},{25,50}} - pos*[zeros(4),ones(4)]; end if; when Empty.active then reinit(pos,-transportLength); end when;connect(Prev_Idle.y, tableComPrev.Idle); connect(Prev_Transport.y, tableComPrev.Transport); connect(or1.u1, OutTransport_active.y); connect(or1.u2, Prev_Transport.y); connect(Robot_StartWork.y, robotComTable.StartWork); connect(Next_Ready.y, tableComNext.Ready); connect(indicatorLamp.activePort, or1.y); end TableVertical;
Type | Name | Default | Description |
---|---|---|---|
String | processor | "" | The processor that will execute the task |
String | container | "" | The task in which the controller will run |
Integer | priority | 1 | Priority of the task |
Real | sampleTime | 0.01 | Sample time of the task |
Real | phase | 0 | Phase of the task |
Real | transportLength | 2*100 | Length of the track in pixels |
Real | transportTime | 4 | Desired time to travel through table length |
Real | carLength | 286 | Length of the car |
Type | Name | Description |
---|---|---|
TableComNext | tableComNext | |
TableComPrev | tableComPrev |
model TurnTableRight "Table which turns the track direction southbound" extends Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Interfaces.TurnTable;Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Connectors.TableComPrev tableComPrev; Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Connectors.TableComNext tableComNext; Modelica.Blocks.Sources.BooleanExpression Prev_Idle(y=Empty.active); Modelica.Blocks.Sources.BooleanExpression Next_Ready(y=Waiting.active); Modelica.Blocks.Sources.BooleanExpression Prev_Transport(y=InTransport.active); Modelica_StateGraph2.Blocks.MathBoolean.ShowValue indicatorLamp "Motor"; Modelica.Blocks.Sources.BooleanExpression OutTransport_Active(y=OutTransport.active); Modelica.Blocks.Logical.Or or1; equation carInPosition = pos >= -0.5 and pos < 0.5; if InTransport.active or OutTransport.active then der(pos) = transportLength/transportTime; else der(pos) = 0; end if; if Empty.active then rectangle1 = {{-46,100},{46,-100}}; rectangle2 = {{-100,46},{100,-46}}; newPoints = [zeros(4),zeros(4)]; elseif Occupied.active or OutTransport.active then rectangle1 = {{-100,46},{100,-46}}; rectangle2 = {{-46,100},{46,-100}}; newPoints = {{25,-50},{-25,-50},{-25,50},{25,50}} - pos*[zeros(4), ones(4)]; else newPoints = {{-50,25},{-50,-25},{50,-25},{50,25}} + pos*[ones(4), zeros(4)]; rectangle1 = {{-46,100},{46,-100}}; rectangle2 = {{-100,46},{100,-46}}; end if; when Empty.active then reinit(pos, -transportLength); end when;connect(Next_Ready.y, tableComNext.Ready); connect(Prev_Idle.y, tableComPrev.Idle); connect(Prev_Transport.y, tableComPrev.Transport); connect(or1.u1, Prev_Transport.y); connect(OutTransport_Active.y, or1.u2); connect(indicatorLamp.activePort, or1.y); end TurnTableRight;
Type | Name | Default | Description |
---|---|---|---|
String | processor | "" | The processor that will execute the task |
String | container | "" | The task in which the controller will run |
Integer | priority | 1 | Priority of the task |
Real | sampleTime | 0.01 | Sample time of the task |
Real | phase | 0 | Phase of the task |
Real | transportLength | 2*100 | Length of the table in pixels |
Real | transportTime | 4 | Desired time to travel through table length |
Real | carLength | 100 | Length of the car |
Type | Name | Description |
---|---|---|
TableComPrev | tableComPrev | |
RobotComTable | robotComTable | |
TableComNext | tableComNext |
model TableHorizontal "Horizontal table operating in eastbound direction" extends Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Interfaces.Table ( Occupied(use_activePort=false), Prev_Ready(y=tableComPrev.Ready), CarInPosition(y=carInPosition), Next_Transport(y=tableComNext.Transport), Robot_WorkDone(y=robotComTable.WorkDone), Next_Idle(y=tableComNext.Idle));Modelica.Blocks.Sources.BooleanExpression OutTransport_active(y=OutTransport.active); Modelica.Blocks.Sources.BooleanExpression Prev_Transport(y=InTransport.active); Modelica.Blocks.Sources.BooleanExpression Prev_Idle(y=Empty.active); Modelica.Blocks.Sources.BooleanExpression Robot_StartWork(y=Occupied.active); Modelica.Blocks.Sources.BooleanExpression Next_Ready(y=Waiting.active); Modelica.Blocks.Logical.Or or1; Modelica_StateGraph2.Blocks.MathBoolean.ShowValue indicatorLamp; Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Connectors.TableComPrev tableComPrev; Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Connectors.RobotComTable robotComTable; Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Connectors.TableComNext tableComNext; equation carInPosition = pos >= -0.5 and pos < 0.5; if InTransport.active or OutTransport.active then der(pos) = transportLength/transportTime; else der(pos) = 0; end if; if Empty.active then newPoints = [zeros(4),zeros(4)]; else newPoints = {{-50,25},{-50,-25},{50,-25},{50,25}} + pos*[ones(4), zeros(4)]; end if; when Empty.active then reinit(pos, -transportLength); end when;connect(Next_Ready.y, tableComNext.Ready); connect(Robot_StartWork.y, robotComTable.StartWork); connect(Prev_Idle.y, tableComPrev.Idle); connect(Prev_Transport.y, tableComPrev.Transport); connect(or1.u1, OutTransport_active.y); connect(Prev_Transport.y, or1.u2); connect(indicatorLamp.activePort, or1.y); end TableHorizontal;
Type | Name | Default | Description |
---|---|---|---|
String | processor | "" | The processor that will execute the task |
String | container | "" | The task in which the controller will run |
Integer | priority | 1 | Priority of the task |
Real | sampleTime | 0.01 | Sample time of the task |
Real | phase | 0 | Phase of the task |
Real | transportLength | 2*100 | Length of the track in pixels |
Real | transportTime | 4 | Desired time to travel through table length |
Real | carLength | 286 | Length of the car |
Type | Name | Description |
---|---|---|
TableComNext | tableComNext | |
TableComPrev | tableComPrev |
model TurnTableLeft "Table which turns the track direction eastbound" extends Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Interfaces.TurnTable;Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Connectors.TableComPrev tableComPrev; Modelica_StateGraph2.Examples.Applications.ProductionLine.Internal.Connectors.TableComNext tableComNext; Modelica.Blocks.Sources.BooleanExpression Prev_Idle(y=Empty.active); Modelica.Blocks.Sources.BooleanExpression Next_Ready(y=Waiting.active); Modelica.Blocks.Sources.BooleanExpression Prev_Transport(y=InTransport.active); Modelica.Blocks.Logical.Or or1; Modelica.Blocks.Sources.BooleanExpression OutTransport_Active(y=OutTransport.active); Modelica_StateGraph2.Blocks.MathBoolean.ShowValue showValue; equation carInPosition = pos >= -0.5 and pos < 0.5; if InTransport.active or OutTransport.active then der(pos) = transportLength/transportTime; else der(pos) = 0; end if; if Empty.active then rectangle1 = {{-100,46},{100,-46}}; rectangle2 = {{-46,100},{46,-100}}; newPoints = [zeros(4),zeros(4)]; elseif Occupied.active or OutTransport.active then rectangle1 = {{-46,100},{46,-100}}; rectangle2 = {{-100,46},{100,-46}}; newPoints = {{-50,25},{-50,-25},{50,-25},{50,25}} + pos*[ones(4), zeros(4)]; else rectangle1 = {{-100,46},{100,-46}}; rectangle2 = {{-46,100},{46,-100}}; newPoints = {{25,-50},{-25,-50},{-25,50},{25,50}} - pos*[zeros(4), ones(4)]; end if; when Empty.active then reinit(pos, -transportLength); end when;connect(OutTransport_Active.y, or1.u1); connect(Prev_Transport.y, or1.u2); connect(Next_Ready.y, tableComNext.Ready); connect(showValue.activePort, or1.y); connect(Prev_Idle.y, tableComPrev.Idle); connect(Prev_Transport.y, tableComPrev.Transport); end TurnTableLeft;