Commit Graph

246 Commits

Author SHA1 Message Date
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
aaronlong
80e4ea356e Submodule update: tc_mca_std_lib 2019-12-10 14:44:21 +00:00
Torsten Bögershausen
b0338408d3 Merged in MBP-127-commit-files-with-lf-in-repo-crlf (pull request #17)
MBP-127 commit files with lf in repo crlf
2019-12-10 14:28:26 +00: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
d88816156a Change to variable in axis struct for restore of incremental enc values on lose of power
Change iPositionRestore to ePosition restore.
Change from int to enum.
2019-12-10 11:37:34 +01:00
Paul Barron
c49d1d0faf Increase homing and jog speeds
For axis 1 and 2
2019-12-10 10:37:08 +01:00
Paul Barron
c6cac2ce7c Set monitoring parameters
E.g. position lag, target position etc.
Done for axis 1 and 2.
2019-12-10 10:26:57 +01:00
Paul Barron
f59a9dfccf Invert motor polarity for axis 1 2019-12-09 15:02:05 +01:00
Paul Barron
ad48a4c161 Invert encoder counting direction on axis 2 2019-12-09 14:57:14 +01:00
Paul Barron
dd4cfbe34b Set dynamic parameters for Axis 1 and 2 2019-12-09 14:49:00 +01:00
Paul Barron
57aa137e4e Change encoder scaling factor denominator to 2000
Done for axis 1 and 2
2019-12-09 14:43:50 +01:00
Paul Barron
173400e7f0 Change Reference Velocity to 600
Changed for axis 1 and 2
2019-12-09 14:41:16 +01:00
Paul Barron
35eb7a5261 Change encoder scaling factor to num=60 and den=1000
Done for axis 1 and 2
2019-12-09 14:30:44 +01:00
Paul Barron
b7ae38ad86 Change link of encoder for axis 1 and 2 to hardware terminals 2019-12-09 14:16:51 +01:00
Paul Barron
f36a636a4e Link hardware inputs to bLimitFwd, bLimitBwd, bLimitHome
Done for both axis 1 and 2.
2019-12-09 14:05:32 +01:00
Paul Barron
8b2779fe61 Link boutput 2,3,6,7 to the hardware 2019-12-09 13:32:10 +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
5fe5abbbf3 Link bOutput1 and bOutput5 to hardware 2019-12-09 13:27:22 +01:00
Paul Barron
d36efd414d Create bOutput5 for axis 2 switches 2019-12-09 13:25:06 +01:00
Paul Barron
82c00f9999 Link PLC axes 1 & 2 to motion axes 1 & 2 2019-12-09 13:19:38 +01:00
Paul Barron
97f4607b7c Scan the bus 2019-12-09 13:17:30 +01:00
Paul Barron
a9dea34c41 Capitalise variable names of eStartUp
No code changes
2019-12-09 12:25:01 +01:00
Paul Barron
892258bd84 Merge 'tc_generic_struct/integration' into mbp-77/191204-SaveValuesOnPowerOff
Conflicts:
	solution/solution.tsproj
2019-12-09 12:07:27 +01:00
Paul Barron
f98fa633a5 Fix whitespace damage in MAIN.TcPOU 2019-12-09 12:04:08 +01:00
Paul Barron
0772b525ab Update MAIN.TcPOU for TwinCAT version
Open MAIN.TcPOU in TwinCAT, add one line, delete it, save it.
TwinCAT updates the TwinCAT version number to 3.1.4024.0.
No code changes.
2019-12-09 11:59:42 +01:00
Paul Barron
bbfe0ab3e9 Commit after updating TwinCAT
No code changes
	modified:   solution.sln
	modified:   solution/solution.tsproj
	modified:   solution/tc_project_app/tc_project_app.plcproj
2019-12-09 11:54:52 +01:00
Paul Barron
619331cc28 After white space fix? 2019-12-09 11:11:08 +01:00
Torsten Bögershausen
c6c63bfa4c Merge 'origin/integration' into MBP-127-commit-files-with-lf-in-repo-crlf
Conflicts:

	solution/solution.tsproj

	twincat_version_manager.py
2019-12-09 06:25:29 +01:00
Torsten Bögershausen
bb3d895439 Merged in MBP-128-twincat-4024-0-is-shipped-with-4023-119 (pull request #18)
MBP-128 twincat 4024.0 is shipped with 4023.119

Approved-by: Aaron James Long <aaron.long@stfc.ac.uk>
2019-12-06 11:01:22 +00:00
Torsten Bögershausen
bfe373e932 .gitattributes: CRLF for all files that need them
Improvements of the CRLF handling:
When a file is checked out on a drive shared with Linux or MacOS,
those OS have different default line endings.
Windows uses CRLF, and Linux/Mac use LF.

To be able to checkout files under Linux/Mac and to get the same
result, mark all known file types with eol=CRLF
2019-12-06 10:52:48 +01:00
Torsten Bögershausen
b60f33ed5a solution.tsproj: Update to version 4.1.4023.119 2019-12-06 09:52:04 +01:00
Torsten Bögershausen
62086f488d twincat_version_manager.py: Different versions for *.Tc and *.tsproj
"The 4024 release apparently shipped with the 4023.119
 internal build for engineering"

It seems as if the *.Tc* files ue a different version numbering than
the *.tsproj files.

Adapt twincat_version_manager.py to handle different versions
for different file types (technically file names) and
check that the *.tsproj file have version "3.1.4023.119"
2019-12-06 09:44:27 +01:00
Torsten Bögershausen
4ca1f6e110 Normalize all line endings to LF in the repo
Change the CRLF strategie:
All (nearly all) files have LF in the repo, and CRLF in the working tree.
When we started, all files had been commited "as is".
Now it is more and more disturbing that Git shows "^M" in git diff
when a line was added or chenged.
To avoid this, store all files in the repo with LF.

To normalzie existing repos for a crate, run:

Step 1)
(unless you have done that already)
git remote add tc_generic_structure https://bitbucket.org/europeanspallationsource/tc_generic_structure.git

Step 2)
git fetch tc_generic_structure

Step 3)
(master below may be integration)
git merge tc_generic_structure/master  -X renormalize
2019-12-04 16:30:58 +01:00
Torsten Bögershausen
3331756998 Remove and ignore UpgradeLog.htm
UpgradeLog.htm should not be under Git, so remove it and ignore
it forever.
2019-12-04 16:18:30 +01:00
Torsten Bögershausen
1e8ecb1f6b Remove and ignore solution/TrialLicense.tclrs
Trial-licenses should not be part of any Git - they
experire and soon and cause a lot of merge-conflicts.

Remove solution/TrialLicense.tclrs and
ignore it in .gitignore (keep .gitignore sorted)
2019-12-04 16:11:52 +01:00
Paul Barron
56e8fb1c9b Change iStartup case to eStartup
Change int to enum for better readability
2019-12-04 15:09:05 +01:00
Paul Barron
fe65683e7c White space fix 2019-12-04 14:50:58 +01:00
Paul Barron
5d0116f27c Add comment plus variable name consistency fix 2019-12-04 14:44:49 +01:00
Paul Barron
1fd4d9bad6 Fix white-space danage 2019-12-04 14:09:59 +01:00
Paul Barron
3374ed36ae Merge 'tc_generic_struct/integration' into mbp-77/191204-SaveValuesOnPowerOff
Conflicts:
	solution/tc_project_app/POUs/MAIN.TcPOU
	solution/tc_project_app/tc_mca_std_lib
2019-12-04 13:42:31 +01:00
Torsten Bögershausen
31ff22d7a4 Merged in MBP-114-dont-use-tab-in-source-code (pull request #16)
MBP-114 dont use tab in source code
2019-12-04 11:42:52 +00:00
Torsten Bögershausen
4b2302d0d4 Fix whitespace damage in solution/tc_project_app/tc_mca_std_lib 2019-11-29 11:51:27 +01:00
Torsten Bögershausen
403b1c9296 bitbucket-pipelines.yml: Print status of git submodule 2019-11-29 11:44:53 +01:00
Torsten Bögershausen
69f8fc4696 solution/tc_epicscommodule updated to 3.1.4024.0 2019-11-29 11:34:27 +01:00
Torsten Bögershausen
bef8078e99 Fix whitespace damage
Fix the whitespaces using check_fix_white_space.py
modified:   solution/tc_project_app/GVLs/GVL_APP.TcGVL
modified:   solution/tc_project_app/POUs/MAIN.TcPOU
2019-11-29 09:47:11 +01:00
Torsten Bögershausen
9facfb89c1 Update tc_epicscommodule to a white+space clean version 2019-11-29 09:43:45 +01:00