Commit Graph

81 Commits

Author SHA1 Message Date
Paul Barron
69b0036ff0 Remove spaces to conform to standard
No code change
2020-06-26 10:46:52 +02:00
Paul Barron
6b96fe55be Update to latest commit of tc_mca_std_lib 2020-06-26 10:29:36 +02:00
Paul Barron
3b2cdd91b2 Add hardware, plc and links using Simon's C# tool 2020-06-10 12:25:16 +02:00
Paul Barron
29b9b5e959 Comment out bOutputs 2020-04-24 10:54:17 +02:00
Paul Barron
6dc8d31bbd MBP-131: Update advanced homing
Update pointer to tc_mca_std_lib

Fix reference to MC2 library: changed to 3.3.28.0 instead of 3.3.31.0

There may be some changes to the TcUnit tests but these were not
intended to be part of the commit. As I am halfway through the merge I
will commit what is there and then fix later on if required. These
should be part of another ticket.
2020-04-24 10:16:36 +02:00
Federico Rojas
48dafb43a4 Change GVL_APP.nAxisNum to GVL_APP.nAXIS_NUM because it is a constant 2020-04-03 15:14:25 +02:00
Federico Rojas
a77bf83d00 Delete an extra ENTER - cosmetic 2020-03-25 13:06:34 +01:00
Federico Rojas
5399e85127 Update refrences from GVL variable aAxes to astAxes 2020-03-23 15:13:51 +01:00
Federico Rojas
a8e4f88884 Delete sapces after //, add e to variables in E_RestorePosition 2020-03-23 14:46:56 +01:00
Federico Rojas
3181c4b69f Delete space after // from restor position actions 2020-03-23 14:35:31 +01:00
Federico Rojas
743ad6c6d8 Change the array variables of Main and all thier refernces to follow coding standards 2020-03-23 14:15:21 +01:00
Federico Rojas
594d4cd208 Fix white space damage 2020-03-19 17:22:35 +01:00
Federico Rojas
c4c2fdc0f3 Changed FB_Axis and refernces to follow code standards 2020-03-18 17:05:52 +01:00
Federico Rojas
47199a6a16 Change all DUT's variable names and references after merge with MBP-138 2020-03-18 15:34:23 +01:00
Federico Rojas
014cc8d807 Chenge variable and references of axesPersistent to aAxesPersistent 2020-03-17 16:18:38 +01:00
Federico Rojas
c99efebb07 Change GVL to follow our coding standards and update all the references in the FB's 2020-03-17 14:52:19 +01:00
Federico Rojas
56929e3be1 Fix all references from the chages DUT's in the FB's and POU's 2020-03-17 14:34:44 +01:00
Federico Rojas
68498ae44f Delete local variable i in MAIN and substitute it with GVL.iAxis 2020-03-17 13:33:21 +01:00
Federico Rojas
9561494a7d Revert change from nAXIS_NUM to nAxisNum, it is not a constant 2020-03-17 11:27:21 +01:00
Federico Rojas
6c9885ee54 Change to coding standards all variables in MAIN and their references 2020-03-11 13:30:47 +01:00
Federico Rojas
456f791f56 change nAxisNum constant to nAXIS_NUM in GVL.APP and their references 2020-03-11 13:07:28 +01:00
Federico Rojas
c504ae6ea3 change axisNum to nAxisNum in GVL.APP and their references 2020-03-11 13:01:52 +01:00
aaronlong
b984376f15 resolved merge conflicts 2020-03-04 10:59:33 +00:00
Federico Rojas
a5fa028735 Delete all error handling from MAIN
Delete the action ERROR()
Delete all the variable section for Error Handling in MAIN
2020-03-02 16:07:10 +01:00
aaronlong
741d03da8d Test suite and examples for tc_mca_std_lib solution 2020-02-19 14:54:14 +00:00
Paul Barron
51464ddd87 Fix whitespace damage 2020-02-12 12:12:10 +01:00
Paul Barron
8433721ea4 Add check in MAIN.RESTOR_POSITIONS
Add check when resetting bRestoreOnStartup flag to only reset
if the UPS is OK. Otherwise during a power loss it is set and then reset before
getting to the end of the PLC cycle.
This was a result of moving some code that was previously in MAIN to an ACT
and the RETURN command does not work the same. I believe it only returns
from the current act and not the whole code. Originally it was supposed to
prevent the rest of the code from executing in the event of a power failure but
this is no longer the case.
2020-02-12 11:56:26 +01:00
Torsten Bögershausen
06fff58f08 MAIN.TcPOU: Save with TC version 3.1.4024.0 2020-02-10 10:58:35 +01:00
Torsten Bögershausen
b522fe177e fix whitespace damage 2020-02-10 10:44:25 +01:00
Simon-Cooper
1079229ffb ALLOW LOCAL SIMULATIONS TO BYBASS UPS CHECK
Add CHECK_UPS action to house monitoring of the UPS global status
Modify RESTORE_POSITIONS state machine to remove numerical enumeration
usage
Add device identity functionblock to check whether local simulation or
CX
Add POSITION RECOVERY action to check device type and determine whether
to run
position restore and ups checking
Add solution/_Config/ folder to gitignore to remove NC and IO
2020-02-07 10:17:46 +00:00
Paul Barron
04c7827a7a Merge 'tc_generic_struct/integration' into mbp-77/191217-RemoveMode2
Conflicts:
	solution/solution.tsproj
	solution/tc_project_app/GVLs/GVL_APP.TcGVL
	solution/tc_project_app/POUs/MAIN.TcPOU
	solution/tc_project_app/tc_project_app.plcproj
2019-12-18 10:48:04 +01:00
Paul Barron
b61bf93b52 Remove hardware and rebuild
Change axisNum to 2
2019-12-17 14:54:20 +01:00
Paul Barron
1c9d8f3b6b Remove mode 2 from position restore
It was decided in a code review that mode 2 wasn't doing exactly as we wanted
and that it probably wasn't required, at least for now.
Changes to logic so that the position restore is only done after a power cycle and
not a download, reset cold or reset origin.
2019-12-17 14:46:55 +01:00
Paul Barron
e36d4bcab3 Change comment 2019-12-17 10:37:24 +01:00
Paul Barron
5743a13513 Remove mode 2 from iRestoreCode
Issues found regarding overiding of .config params in the axis struct.
Also doubts about whether it would actually be used.
2019-12-17 10:27:25 +01:00
Paul Barron
f1063b56d7 Change names of MAIN.STARTUP and MAIN.SHUTDOWN
Change to MAIN.RESTORE_POSITIONS and MAIN.STORE_PERSISTENT
Bug fix: add check in MAIN.RESTORE_POSITIONS to check whether
an axis was moving at shutdown.
Variable name changes to acommodate moving the persistent variables
from MAIN to a DUT in the generic structure.
2019-12-13 13:41:25 +01:00
Paul Barron
f2d73d013f Fix whitespace damage
No code changes
2019-12-11 15:24:00 +01:00
Paul Barron
a9d5e51ac0 Added saving of position values throughout the normal PLC cycle
Added a check in MAIN.SHUTDOWN that makes sure the restore  has been
done first before starting to save values again.
Probably should change the name from MAIN.SHUTDOWN to MAIN.SAVEVALUES or something.
2019-12-11 15:17:59 +01:00
Paul Barron
10ef1a594d Remove MAIN.SHUTDOWN from ordinary PLC cycle
This created a problem in that MAIN.STARTUP wasn't working correctly
because it takes a couple of cycles to complete and MAIN.SHUTDOWN
was overriding the values stored after a power loss. Thus the restore won't work
for a user cold reset. It can be catered for by adding it back into the ordinary PLC
cycle but only executing if bPositionRestoreDone is set.
2019-12-11 15:02:11 +01:00
Paul Barron
df44dd3b82 Bug fix: add additional check in MAIN.SHUTDOWN
gvl.axes[i].Axis.Status.Moving doesn't seem to work if the axis isn't enabled.
Therefore added a check to see whether gvl.axes[i].Axis.NcToPlc.ActVelo <> 0.
If it's non-zero then don't restore the encoder value on restart.
MAIN.SHUTDOWN also added to the normal operation cycle, this is to allow restart
after a "Reset Cold" command in Visual Studio, otherwise the only time position is
restored is an actual lose of power. It might be also useful when a user restarts
the PLC program manually.
Also modified a few comments in MAIN.STARTUP.
2019-12-11 14:28:54 +01:00
Paul Barron
83f1b66c9b Fix white space damage 2019-12-11 13:57:26 +01:00
Paul Barron
480f4098bb Moved the cycle through of the read parameter fbs inside if statement
Motivation: after the position restore code has executed successfully
there is no point running any of the code again and wasting PLC cycles.
Thus the first step in the MAIN.STARTUP is a check whether the code has
been completed or not. If it is has completed successfully ignore everything else.
2019-12-11 13:54:19 +01:00
Paul Barron
534a318269 Remove timer tmrRetry from MAIN.STARTUP
No longer required in the restore position state machine code.
If the read parameter function block isn't successful it will go back
a set in the case statement and try again.
The read parameter function block, fbReadEncRefSys, reads the type of axis
either inc or abs.
2019-12-11 13:35:50 +01:00
Paul Barron
090fbd03eb Lots of changes in MAIN.STARTUP
Changes to the way the code checks whether the enc type is valid.
Added a parameter to the axis struct for setting a homing value other than 0.
2019-12-10 16:48:34 +01:00
Paul Barron
ac37748fbe Add comments to MAIN.STARTUP
Slight tidy of code but no structural changes.
2019-12-10 13:27:05 +01:00
Paul Barron
dbd145ed68 Add DUT RestorePosition in tc_mca_std_lib
Also adjusted code in MAIN.STARTUP to adapt to the new type variable
instead of the int previously.
2019-12-10 12:49:37 +01:00
Paul Barron
f7906d265a Readability change, make case statements easier to read
No code changes
2019-12-10 11:39:00 +01:00
Paul Barron
c8775e5ae5 Create bOutput 2,3,6,7 for switches in MAIN.TcPOU
modified:   solution/solution.tsproj
	modified:   solution/tc_project_app/POUs/MAIN.TcPOU
2019-12-09 13:29:28 +01:00
Paul Barron
d36efd414d Create bOutput5 for axis 2 switches 2019-12-09 13:25:06 +01:00
Paul Barron
a9dea34c41 Capitalise variable names of eStartUp
No code changes
2019-12-09 12:25:01 +01:00