Skip to content

Commit

Permalink
v0.9.7: New test hardware and more
Browse files Browse the repository at this point in the history
Controller SW:
Change the project to the new hardware setup,
Set close loop, change port numger to 5000
    Set closed loop by using the encoder.
    Change the default port number to 5000

Homing sequences: fix "bBusy" glitch
  When homing sequences where run, the bBusy bit went down and up.
  This happened when the motor stops at a limit switch and reverts
  to continue homing.
  Sometimes the poll() function in the motor driver got the "bBusy=0"
  and assumed that the homing sequence was done, which it wasn't.

Correct the limit switches
  High and low limit switches had been mixed up
======================================================================

EPICS-driver:
Axis: Translate error codes into text
  Start to translate error codes into readable text.
  Example : The code 4450 will be displayed as
    4450 Following error
  More error codes need to be added, whenever they occur

Axis: Add setPosition()
    Whenever setPosition is called, do a printout.
    We don't support setPosition yet, but we want the printout

Axis: Don't hide LS when homing; nCmdData=0
- Don't hide a hitten limit switch any more (needs a patched MR, which we have)
- Always send nCmdData=0
- Simplify the print when a LS is hit ore released.

Axis: Correct waitNumPollsBeforeReady
  When an axis is started (or stopped) against the MCU,
  we normaly wait until the program at the MCU has
  swallowed the start command.
  While debugging the 400 test case it turned out, that
  we sometimes wait too long:
  When the motor is stopped (and has been moving before),
  the stopped is not reported and the DMOV field in the
  motorRecord needs 2 slow polls (resulting in a delay
  > 2 seconds), which is more than what the TC expects.
  Whenever there is a transition in moving, set
  waitNumPollsBeforeReady to 0 and report it.

Change homing to use the low limit switch
  Since the home sensors are not reliable enough, use the low limit
  switch for the time being.

======================================================================
Tests:
Major rework of the test scripts, add 090

======================================================================
Make system:
doit.sh: Base 3.15.4 @ ESS does not have motor 6.81
  The new base at ESS is R3.15.4, and for that base we never build
  the motor module.
  Test for 6.10.6-ESS instead.

mv Makefile GNUmakefile according to EEE

Always require a version for asyn and motor, as we are not sure,
how backward-compatible future versions are.

Make startup/ files for CCDB/IOCfactory

Add tools/linux/reloadMCUbins.sh
  Add a tool to download the TwinCAT binary from Linux onto the
  target system. Beta version.

Ignore logs.0* from CSS
  • Loading branch information
tboegi committed Nov 7, 2016
1 parent 7a2d5d8 commit 98238d4
Show file tree
Hide file tree
Showing 79 changed files with 2,524 additions and 1,801 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
epics-for-Motion/
_Boot/
_CompileInfo/
_Libraries/
tools/linux/ADS/
tools/linux/getADSState/getADSState.bin
logs.0*
.epics.*
*.bak
*.~u
*.pyc
*.tpy
*.suo
*~
.#*
\#*#



12 changes: 12 additions & 0 deletions Documentation/Resolution.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Motor/MRES:
200 steps/Revolution
64 Microstep/Revolution

giving
12800 == 64 * 200


Encoder/ERES:
2000 steps/Revolution


15 changes: 15 additions & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
ReleaseNotes:
(This is a very rough overview, the real truth is in "git log")

v0.9.7
Important: Change the port number from 200 to 5000 for the testrack
and from 5024 to 5000 for the simulator.

Change the hardware setup, we have now a new motion test crate MCU "1013"
Use the encoder attached to the motor, meaning that we now run "closed loop"
Change the test suite, can be run against any PV pointing to a motor.
Adapt the scripts starting an IOC to fit to the "CCDB and IOC factory".
Change the homing to use the low limit switch
Fix a glitch in the bBusy when running homing sequence:
bBusy went inactive for a short while.
Depending on the poller() in EPICS, sometimes MR thougth that the
homing was done, but it wasn't.


v0.9.6
Create SolAxis-48-1.cfg, which configures more parameters in the MCU,
e.g. the homing velocities, to and from the home switch,
Expand Down
8 changes: 4 additions & 4 deletions TwinCAT/MCAG_Base_Project/EpicsComModule/EpicsComModule.tmc

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions TwinCAT/MCAG_Base_Project/EpicsComModule/POUs/FB_Server.TcPOU
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.0.25">
<POU Name="FB_Server" Id="{968e3b39-64e9-4551-8086-3bb49079ecda}">
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.0.36">
<POU Name="FB_Server" Id="{968e3b39-64e9-4551-8086-3bb49079ecda}" SpecialFunc="None">
<Declaration><![CDATA[///#########################################################
///FB that handles TCP/IP server and the client connections. The code is based on Beckhoff sample code. However changes and additions have been made to this code for the general purpose EPICS interface.
///
Expand All @@ -24,7 +24,7 @@
FUNCTION_BLOCK FB_Server
VAR
sVersion: STRING:='0.9.0';
sVersion: STRING:='0.9.1';
END_VAR
VAR_INPUT
sSrvNetID : T_AmsNetID := '';(* TwinCAT TCP/IP server network address *)
Expand Down Expand Up @@ -182,6 +182,5 @@ END_CASE
]]></ST>
</Implementation>
<ObjectProperties />
</POU>
</TcPlcObject>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.0.25">
<POU Name="FB_ServerApplication" Id="{61c4cd1a-935d-4e48-8b22-86efe89dfec1}">
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.0.36">
<POU Name="FB_ServerApplication" Id="{61c4cd1a-935d-4e48-8b22-86efe89dfec1}" SpecialFunc="None">
<Declaration><![CDATA[///#########################################################
///FB that handles one EPICS connection of TCP/IP.
/// The main functionallity of this function block is to parse commands from EPICS or other serial device.
Expand All @@ -24,7 +24,7 @@
///###########################################################
FUNCTION_BLOCK FB_ServerApplication
VAR
sVersion: STRING:='0.9.0';
sVersion: STRING:='0.9.1';
sFeatures: STRING:='stv1';
END_VAR
VAR_IN_OUT
Expand Down Expand Up @@ -598,6 +598,5 @@ bErrorOld:=bError;
]]></ST>
</Implementation>
<ObjectProperties />
</POU>
</TcPlcObject>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.0.25">
<POU Name="FB_ServerConnection" Id="{47a014ee-06d6-4964-9a9a-be1fa4d97050}">
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.0.36">
<POU Name="FB_ServerConnection" Id="{47a014ee-06d6-4964-9a9a-be1fa4d97050}" SpecialFunc="None">
<Declaration><![CDATA[///#########################################################
/// FB that handles one TCP/IP client connection. The code is based on Beckhoff sample code and only minor changes have been made for the EPICS interface.
///
Expand All @@ -25,7 +25,7 @@
///###########################################################
FUNCTION_BLOCK FB_ServerConnection
VAR
sVersion: STRING:='0.9.0';
sVersion: STRING:='0.9.1';
END_VAR
VAR_IN_OUT
fbTx : FB_FrameFifo;(* TX fifo *)
Expand Down Expand Up @@ -293,6 +293,5 @@ CASE eStep OF
END_CASE
]]></ST>
</Implementation>
<ObjectProperties />
</POU>
</TcPlcObject>
24 changes: 19 additions & 5 deletions TwinCAT/MCAG_Base_Project/EpicsComModule/POUs/MAIN.TcPOU
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.0.25">
<POU Name="MAIN" Id="{7b6efa2b-c8d0-4c9b-b40c-faa65e5b128e}">
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.0.36">
<POU Name="MAIN" Id="{7b6efa2b-c8d0-4c9b-b40c-faa65e5b128e}" SpecialFunc="None">
<Declaration><![CDATA[///#########################################################
///Main POU for TCP/IP based EPICS-interface. The TCP/IP server related code is based on Beckhoff sample code. Changes and additions have been made to this code for the general purpose EPICS interface.
///
Expand All @@ -25,15 +25,15 @@
PROGRAM MAIN
VAR
sVersion: STRING:='0.9.0';
sVersion: STRING:='0.9.1';
END_VAR
VAR
sSrvNetID : T_AmsNetID := '';(* TwinCAT TCP/IP server network address *)
bEnable : BOOL := TRUE;(* TRUE => Enable server data exchange, FALSE => Disable *)
bLog : BOOL := FALSE;(* TRUE => Enable message/error log, FALSE => Disable *)
fbServer : FB_Server := ( sLocalHost := '0.0.0.0' (*Own (server) IP address! '192.168.40.106'*),
nLocalPort := 200,(* Own (server) port number! *)
nLocalPort := 5000,(* Own (server) port number! *)
sPrefix := 'SERVER::' );
fbCloseAll : FB_SocketCloseAll;
Expand Down Expand Up @@ -106,6 +106,7 @@ Utilities();
</o>
<v n="LValue">false</v>
<v n="Boolean">false</v>
<v n="IsInstance">true</v>
<v n="Id">8L</v>
</o>
<o n="OutputItems" t="OutputItemList">
Expand All @@ -123,6 +124,7 @@ Utilities();
</o>
<v n="LValue">true</v>
<v n="Boolean">false</v>
<v n="IsInstance">false</v>
<v n="Id">10L</v>
</o>
<o>
Expand All @@ -137,6 +139,7 @@ Utilities();
</o>
<v n="LValue">true</v>
<v n="Boolean">false</v>
<v n="IsInstance">false</v>
<v n="Id">11L</v>
</o>
</l2>
Expand All @@ -160,6 +163,7 @@ Utilities();
</o>
<v n="LValue">false</v>
<v n="Boolean">false</v>
<v n="IsInstance">false</v>
<v n="Id">5L</v>
</o>
<v n="Id">4L</v>
Expand All @@ -177,6 +181,7 @@ Utilities();
</o>
<v n="LValue">false</v>
<v n="Boolean">false</v>
<v n="IsInstance">false</v>
<v n="Id">7L</v>
</o>
<v n="Id">6L</v>
Expand All @@ -194,6 +199,7 @@ Utilities();
</o>
<v n="LValue">false</v>
<v n="Boolean">false</v>
<v n="IsInstance">false</v>
<v n="Id">13L</v>
</o>
<v n="Id">12L</v>
Expand All @@ -211,6 +217,7 @@ Utilities();
</o>
<v n="LValue">false</v>
<v n="Boolean">false</v>
<v n="IsInstance">false</v>
<v n="Id">15L</v>
</o>
<v n="Id">14L</v>
Expand Down Expand Up @@ -245,6 +252,7 @@ Utilities();
<v n="CallType" t="Operator">FunctionBlock</v>
<v n="EN">false</v>
<v n="ENO">false</v>
<n n="STSnippet" />
<v n="Id">9L</v>
</o>
</l2>
Expand Down Expand Up @@ -275,6 +283,7 @@ Utilities();
</o>
<v n="LValue">false</v>
<v n="Boolean">false</v>
<v n="IsInstance">true</v>
<v n="Id">23L</v>
</o>
<o n="OutputItems" t="OutputItemList">
Expand All @@ -292,6 +301,7 @@ Utilities();
</o>
<v n="LValue">true</v>
<v n="Boolean">false</v>
<v n="IsInstance">false</v>
<v n="Id">25L</v>
</o>
<o>
Expand All @@ -306,6 +316,7 @@ Utilities();
</o>
<v n="LValue">true</v>
<v n="Boolean">false</v>
<v n="IsInstance">false</v>
<v n="Id">26L</v>
</o>
</l2>
Expand All @@ -329,6 +340,7 @@ Utilities();
</o>
<v n="LValue">false</v>
<v n="Boolean">false</v>
<v n="IsInstance">false</v>
<v n="Id">20L</v>
</o>
<v n="Id">19L</v>
Expand All @@ -346,6 +358,7 @@ Utilities();
</o>
<v n="LValue">false</v>
<v n="Boolean">false</v>
<v n="IsInstance">false</v>
<v n="Id">22L</v>
</o>
<v n="Id">21L</v>
Expand All @@ -363,6 +376,7 @@ Utilities();
</o>
<v n="LValue">false</v>
<v n="Boolean">false</v>
<v n="IsInstance">false</v>
<v n="Id">28L</v>
</o>
<v n="Id">27L</v>
Expand Down Expand Up @@ -395,6 +409,7 @@ Utilities();
<v n="CallType" t="Operator">FunctionBlock</v>
<v n="EN">false</v>
<v n="ENO">false</v>
<n n="STSnippet" />
<v n="Id">24L</v>
</o>
</l2>
Expand Down Expand Up @@ -429,6 +444,5 @@ Utilities();
</NWL>
</Implementation>
</Action>
<ObjectProperties />
</POU>
</TcPlcObject>
Loading

0 comments on commit 98238d4

Please sign in to comment.