-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from loupeteam/develop
Develop -> main v0.1.8
- Loading branch information
Showing
6 changed files
with
328 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
(******************************************************************** | ||
* COPYRIGHT -- Automation Resources Group | ||
******************************************************************** | ||
* Package: MachineControl | ||
* File: MachineControl.var | ||
* Author: David Blackburn | ||
* Created: November 10, 2011 | ||
******************************************************************** | ||
* Variables of package MachineControl | ||
********************************************************************) | ||
VAR | ||
gMachine : Piper_typ := (0); | ||
END_VAR | ||
VAR RETAIN | ||
BootTime : TIME; | ||
END_VAR | ||
VAR | ||
gSimulation : BOOL; | ||
gActiveMode : MODE_MACHINE_ENUM := MODE_MACHINE_AUTO; | ||
gRequestedMode : MODE_MACHINE_ENUM := MODE_MACHINE_AUTO; | ||
END_VAR | ||
(******************************************************************** | ||
* COPYRIGHT -- Automation Resources Group | ||
******************************************************************** | ||
* Package: MachineControl | ||
* File: MachineControl.var | ||
* Author: David Blackburn | ||
* Created: November 10, 2011 | ||
******************************************************************** | ||
* Variables of package MachineControl | ||
********************************************************************) | ||
VAR | ||
gMachine : Piper_typ := (0); | ||
END_VAR | ||
VAR RETAIN | ||
BootTime : TIME; | ||
END_VAR | ||
VAR | ||
gActiveMode : MODE_MACHINE_ENUM := MODE_MACHINE_AUTO; | ||
gRequestedMode : MODE_MACHINE_ENUM := MODE_MACHINE_AUTO; | ||
END_VAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<?AutomationStudio FileVersion="4.9"?> | ||
<Library Version="0.01.7" SubType="ANSIC" Description="A new source library" xmlns="http://br-automation.co.at/AS/Library"> | ||
<Files> | ||
<File>VersionHistory.txt</File> | ||
<File Description="Exported data types">Piper.typ</File> | ||
<File Description="Exported constants">Piper.var</File> | ||
<File Description="Exported functions and function blocks">Piper.fun</File> | ||
<File>PiperGlobal.h</File> | ||
<File Description="Master Cyclic function">Piper_fn_Cyclic.c</File> | ||
<File Description="This function looks at the response state and decides what Step or State to enter next">Piper_handleResponseState.c</File> | ||
<File Description="Sets commands to the subsystems">Piper_setCommand.c</File> | ||
<File Description="Reads the status of Pipes">Piper_checkResponses.c</File> | ||
<File Description="Implements PackML state machine for Piper">Piper_PackML.c</File> | ||
<File Description="Implements the interface to a pipe">Piper_Module_Fub.c</File> | ||
<File Description="Returns a string for the given PackML state">PackMLStateString.c</File> | ||
<File Description="Logs a state change.">PiperLogStateChange.c</File> | ||
</Files> | ||
<Dependencies> | ||
<Dependency ObjectName="Operator" /> | ||
<Dependency ObjectName="LogThat" FromVersion="0.03.0" /> | ||
<Dependency ObjectName="sys_lib" /> | ||
<Dependency ObjectName="AsBrStr" /> | ||
</Dependencies> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<?AutomationStudio FileVersion="4.9"?> | ||
<Library Version="0.01.8" SubType="ANSIC" Description="A new source library" xmlns="http://br-automation.co.at/AS/Library"> | ||
<Files> | ||
<File>VersionHistory.txt</File> | ||
<File Description="Exported data types">Piper.typ</File> | ||
<File Description="Exported constants">Piper.var</File> | ||
<File Description="Exported functions and function blocks">Piper.fun</File> | ||
<File>PiperGlobal.h</File> | ||
<File Description="Master Cyclic function">Piper_fn_Cyclic.c</File> | ||
<File Description="This function looks at the response state and decides what Step or State to enter next">Piper_handleResponseState.c</File> | ||
<File Description="Sets commands to the subsystems">Piper_setCommand.c</File> | ||
<File Description="Reads the status of Pipes">Piper_checkResponses.c</File> | ||
<File Description="Implements PackML state machine for Piper">Piper_PackML.c</File> | ||
<File Description="Implements the interface to a pipe">Piper_Module_Fub.c</File> | ||
<File Description="Returns a string for the given PackML state">PackMLStateString.c</File> | ||
<File Description="Logs a state change.">PiperLogStateChange.c</File> | ||
</Files> | ||
<Dependencies> | ||
<Dependency ObjectName="Operator" /> | ||
<Dependency ObjectName="LogThat" FromVersion="0.05.0" ToVersion="0.05.9" /> | ||
<Dependency ObjectName="sys_lib" /> | ||
<Dependency ObjectName="AsBrStr" /> | ||
<Dependency ObjectName="StringExt" FromVersion="0.14.0" ToVersion="0.14.9" /> | ||
</Dependencies> | ||
</Library> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
/******************************************************************** | ||
* COPYRIGHT -- | ||
******************************************************************** | ||
* Library: Piper | ||
* File: PiperLogStateChange.c | ||
* Author: Josh | ||
* Created: October 08, 2013 | ||
******************************************************************** | ||
* Implementation of library Piper | ||
********************************************************************/ | ||
|
||
#include <bur/plctypes.h> | ||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
|
||
#include "Piper.h" | ||
|
||
#ifdef __cplusplus | ||
}; | ||
#endif | ||
|
||
/* Logs a state change. */ | ||
plcbit PiperStateChange(struct Piper_typ* Piper, enum MACH_ST_enum State) | ||
{ | ||
StrExtArgs_typ LogData; | ||
|
||
STRING Oldstate[80]; | ||
STRING Newstate[80]; | ||
|
||
//Get the strings to log | ||
PackMLStateString(Piper->OUT.State,Oldstate); | ||
PackMLStateString(State,Newstate); | ||
|
||
LogData.s[0] = (UDINT)Oldstate; | ||
LogData.s[1] = (UDINT)Newstate; | ||
|
||
//Log state change | ||
logInfo(Piper->IN.CFG.LoggerName,0,"%s -> %s",(UDINT)&LogData); | ||
|
||
//Change state | ||
Piper->OUT.State = State; | ||
Piper->OUT.SubState = 0; | ||
|
||
return 0; | ||
} | ||
/******************************************************************** | ||
* COPYRIGHT -- | ||
******************************************************************** | ||
* Library: Piper | ||
* File: PiperLogStateChange.c | ||
* Author: Josh | ||
* Created: October 08, 2013 | ||
******************************************************************** | ||
* Implementation of library Piper | ||
********************************************************************/ | ||
|
||
#include <bur/plctypes.h> | ||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
|
||
#include "Piper.h" | ||
|
||
#ifdef __cplusplus | ||
}; | ||
#endif | ||
|
||
/* Logs a state change. */ | ||
plcbit PiperStateChange(struct Piper_typ* Piper, enum MACH_ST_enum State) | ||
{ | ||
StrExtArgs_typ LogData; | ||
|
||
STRING Oldstate[80]; | ||
STRING Newstate[80]; | ||
|
||
//Get the strings to log | ||
PackMLStateString(Piper->OUT.State,Oldstate); | ||
PackMLStateString(State,Newstate); | ||
|
||
LogData.s[0] = (UDINT)Oldstate; | ||
LogData.s[1] = (UDINT)Newstate; | ||
|
||
//Log state change | ||
logInfo(Piper->IN.CFG.LoggerName,0,"%s -> %s",(UDINT)&LogData); | ||
|
||
//Change state | ||
Piper->OUT.State = State; | ||
Piper->OUT.SubState = 0; | ||
|
||
return 0; | ||
} |
Oops, something went wrong.