From 975824224992c1be648e8a0eb601db21a4253be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Sandstro=CC=88m?= Date: Sat, 28 Sep 2024 13:51:15 +0200 Subject: [PATCH] Fix spelling in manual --- hugo/content/manual/PLC_cfg/_index.md | 4 +- hugo/content/manual/PLC_cfg/best_practice.md | 12 ++-- hugo/content/manual/PLC_cfg/function_libs.md | 10 ++-- hugo/content/manual/PLC_cfg/syntax.md | 16 +++--- .../manual/general_cfg/best_practice.md | 2 +- .../manual/general_cfg/data_storage.md | 8 +-- .../content/manual/general_cfg/iocsh_utils.md | 4 +- .../manual/general_cfg/startup/_index.md | 4 +- .../manual/knowledgebase/ethercatCLI.md | 2 +- .../manual/knowledgebase/hardware/EL5042.md | 18 +++--- .../manual/knowledgebase/hardware/EL70x1.md | 8 +-- .../manual/knowledgebase/hardware/EL9xxx.md | 6 +- .../manual/knowledgebase/hardware/host.md | 20 +++---- hugo/content/manual/knowledgebase/motion.md | 34 +++++------ hugo/content/manual/motion_cfg/_index.md | 2 +- hugo/content/manual/motion_cfg/axisPLC.md | 2 +- hugo/content/manual/motion_cfg/axisYaml.md | 16 +++--- .../manual/motion_cfg/best_practice/_index.md | 8 +-- .../manual/motion_cfg/best_practice/servo.md | 10 ++-- .../best_practice/stepper_biss_c.md | 16 +++--- hugo/content/manual/motion_cfg/direction.md | 4 +- hugo/content/manual/motion_cfg/homing.md | 56 +++++++++---------- hugo/content/manual/motion_cfg/scaling.md | 24 ++++---- 23 files changed, 143 insertions(+), 143 deletions(-) diff --git a/hugo/content/manual/PLC_cfg/_index.md b/hugo/content/manual/PLC_cfg/_index.md index 8134d163b..4b4498e5e 100644 --- a/hugo/content/manual/PLC_cfg/_index.md +++ b/hugo/content/manual/PLC_cfg/_index.md @@ -42,7 +42,7 @@ All keys are mandatory. - `id`: PLC id, unique **uint** - `enable`: PLC enabled at start -- `rateMilliseconds`: execution rate in ms. To execute every cycle, independant of cycle rate, use `-1`. +- `rateMilliseconds`: execution rate in ms. To execute every cycle, independent of cycle rate, use `-1`. - `code`: dictionary of code lines. {{% notice note %}} @@ -73,7 +73,7 @@ All keys are mandatory. - `id`: PLC id, unique **uint** - `enable`: PLC enabled at start -- `rateMilliseconds`: execution rate in ms. To execute every cycle, independant of cycle rate, use `-1`. +- `rateMilliseconds`: execution rate in ms. To execute every cycle, independent of cycle rate, use `-1`. - `file`: PLC text file to load. {{% notice warning %}} diff --git a/hugo/content/manual/PLC_cfg/best_practice.md b/hugo/content/manual/PLC_cfg/best_practice.md index 7167aab3a..328e0c932 100644 --- a/hugo/content/manual/PLC_cfg/best_practice.md +++ b/hugo/content/manual/PLC_cfg/best_practice.md @@ -5,13 +5,13 @@ chapter = false +++ ## best practice -Here you can find some best practice configurations for common usecases. +Here you can find some best practice configurations for common use cases. * Macros * MSI include, substitute * Printouts * Description -The complete examples with starup files can be found [here](https://github.com/paulscherrerinstitute/ecmccfg/tree/master/examples/PSI/best_practice) +The complete examples with startup files can be found [here](https://github.com/paulscherrerinstitute/ecmccfg/tree/master/examples/PSI/best_practice) ### macros Use of macros makes the code more generic. When loading a PLC file with "loadPLCFile.cmd", custom macros can be defined in "PLC\_MACROS": @@ -27,7 +27,7 @@ In addition to the custom macros, a few macros, that are often needed, are prede 4. M : ec #### SELF_ID and SELF example -A common usecase is that some initiation is needed, could be triggering of a custom homing sequence: +A common use case is that some initiation is needed, could be triggering of a custom homing sequence: ```C if(${SELF}.firstscan) { @@ -72,8 +72,8 @@ ${SCRIPTEXEC} ${ecmccfg_DIR}loadPLCFile.cmd, "FILE=./cfg/main.plc, INC=.:./cf The "INC" parameter can contain several directories separated with a ":", making it possible to include PLC files from several locations/modules. #### example: Toggle a few outputs -As a demo usecase let's consider that a few outputs needs to be toggled. -NOTE: There are simpler ways to write this specifc code but it's used to demo how code can be divided. +As a demo use case let's consider that a few outputs needs to be toggled. +NOTE: There are simpler ways to write this specific code but it's used to demo how code can be divided. Lets first define some code that toggles a bit (toggle\_output.plc\_inc): ```shell @@ -104,7 +104,7 @@ The resulting code will toggle two different outputs, the state of the last outp NOTE: Macros cannot be used in the filename when including a file. Instead the dir should be defined in the INC param when loading the PLC, see above. ### printouts -Adding a DBG macro can be usefull to be able to turn on/off printouts. Typically during commsioning it can be usefull to have many printouts but later when system goes into production, it could be a good idea to turn (some) printouts off. +Adding a DBG macro can be use full to be able to turn on/off printouts. Typically during commissioning it can be use full to have many printouts but later when system goes into production, it could be a good idea to turn (some) printouts off. Example of a printout that can be turned on/off (default off) ```C diff --git a/hugo/content/manual/PLC_cfg/function_libs.md b/hugo/content/manual/PLC_cfg/function_libs.md index b5530f6c2..abf4c9e0e 100644 --- a/hugo/content/manual/PLC_cfg/function_libs.md +++ b/hugo/content/manual/PLC_cfg/function_libs.md @@ -22,7 +22,7 @@ Example: ${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadPLCLib.cmd, "FILE=./plc/test.plc_lib, PLC_MACROS='OFFSET=3'" ``` -The functions must be defined accordning to this template (max 5 parameters): +The functions must be defined according to this template (max 5 parameters): ```C function (,...,) { ; @@ -38,9 +38,9 @@ function () { * Several functions can be defined in the same file. * For syntax of the "code body", check [plc syntax](../syntax) and the exprtk website. -* The parameters aswell as the return value must be scalars, however, local vectors can be defined and used in calculations (initiations of vector can be done with MACROS, constants or parameters). +* The parameters as well as the return value must be scalars, however, local vectors can be defined and used in calculations (initiations of vector can be done with MACROS, constants or parameters). * "#" as a first char in a line is considered a comment (the line will be removed before compile). -* The lib file will be parsed through MSI allowing macro expansion, "include" and "subsitute" commands. For more info check [best practice](../best_practice) and msi documentation/help. +* The lib file will be parsed through MSI allowing macro expansion, "include" and "substitute" commands. For more info check [best practice](../best_practice) and msi documentation/help. ### can be used in functions 1. The parameters @@ -105,8 +105,8 @@ function testm2m() { ``` ### debugging -Unfortunately debugging of function libs is not as easy as normal PLC:s since exprtk returns less infomation at compile failure. +Unfortunately debugging of function libs is not as easy as normal PLC:s since exprtk returns less information at compile failure. {{% notice tip %}} -In order to troubleshoot, load the code as a normal PLC instead. This way you will get more diagnostics. Also remember, ecmc varaibles cannot be accessed in plc libs. +In order to troubleshoot, load the code as a normal PLC instead. This way you will get more diagnostics. Also remember, ecmc variables cannot be accessed in plc libs. {{% /notice %}} diff --git a/hugo/content/manual/PLC_cfg/syntax.md b/hugo/content/manual/PLC_cfg/syntax.md index 528510def..19977bc5d 100644 --- a/hugo/content/manual/PLC_cfg/syntax.md +++ b/hugo/content/manual/PLC_cfg/syntax.md @@ -14,8 +14,8 @@ For detailed syntax help please visit the [exprtk website](https://github.com/Ar ### functions PLC do _not_ immediately write to the bus! -The PLC will excecute synchronous to the cycle, or at an integer fraction of it. -The prcessed data will be send to the bus with the next cycle. +The PLC will execute synchronous to the cycle, or at an integer fraction of it. +The processed data will be send to the bus with the next cycle. PLCs do _not_ delay the bus! ### statement terminator @@ -25,7 +25,7 @@ Statements are terminated by a semicolon `;` All variables are initiated to `0` ### comments -The hash charactoer `#` is reserved for comments. +The hash character `#` is reserved for comments. Everything after this char will be removed before compile. {{% notice warning %}} `println('########');` will be seen by the compiler as `println('` ! @@ -66,7 +66,7 @@ Custom plc functions can be written in c in plugins. # 1. Assignment: # ec0.s1.VALUE:=100; # -# 2. if-else (note the equl sign): +# 2. if-else (note the equal sign): # if(ec0.s1.VALUE=100) { # # code # } @@ -215,14 +215,14 @@ Custom plc functions can be written in c in plugins. ```shell # 1. plc.enable plc enable (rw) # (end exe with "plc.enable:=0#" -# Could be usefull for startup +# Could be use full for startup # sequences) # 2. plc.error plc error (rw) # Will be forwarded to user as # controller error. # 3. plc.scantime plc sample time in seconds (ro) # 4. plc.firstscan true during first plc scan only (ro) -# usefull for initiations of variables +# use full for initiations of variables # 5. ax.plc.enable Same as plc.enable but for # axis sync plc. # 6. ax.plc.error Same as plc.error but for @@ -319,9 +319,9 @@ Custom plc functions can be written in c in plugins. # ); # Copies data from source memmap to dest memmap. The memmap ids are defined by the # order they are created (starting at 0). The smallest memmap size will define the -# amout of data copied. Returns 0 for success or an error code. +# amount of data copied. Returns 0 for success or an error code. # -# Note: The mmId can be retrived by the bellow ecmc command (and feed into plc via macro): +# Note: The mmId can be retrieved by the bellow ecmc command (and feed into plc via macro): # ecmcConfig "EcGetMemMapId(ec0.s11.mm.analogInputArray01)" # epicsEnvSet(MM_CH_1_IN,${ECMC_CONFIG_RETURN_VAL}) # diff --git a/hugo/content/manual/general_cfg/best_practice.md b/hugo/content/manual/general_cfg/best_practice.md index f8c146157..413a4468b 100644 --- a/hugo/content/manual/general_cfg/best_practice.md +++ b/hugo/content/manual/general_cfg/best_practice.md @@ -5,7 +5,7 @@ chapter = false +++ ## EtherCAT rate (EC_RATE) -The default EtherCAT frame rate in ecmc is set to 1kHz. For most applications this is however not needed and can therefore be reduced. A reduced EtherCAT rate reduces the load on the controller. In general, a good value for the frame rate is in the range 100Hz to 1kHz. For motion systems, a frame rate of 100Hz..500Hz is normally enough. Rates ouside the 100Hz..1kHz range is normally not a good idea, and some slaves might not support it. However, in special cases both lower and higher rates might be possible and required. +The default EtherCAT frame rate in ecmc is set to 1kHz. For most applications this is however not needed and can therefore be reduced. A reduced EtherCAT rate reduces the load on the controller. In general, a good value for the frame rate is in the range 100Hz to 1kHz. For motion systems, a frame rate of 100Hz..500Hz is normally enough. Rates outside the 100Hz..1kHz range is normally not a good idea, and some slaves might not support it. However, in special cases both lower and higher rates might be possible and required. Example: Set rate to 500Hz ``` diff --git a/hugo/content/manual/general_cfg/data_storage.md b/hugo/content/manual/general_cfg/data_storage.md index 2a12be429..b750c410a 100644 --- a/hugo/content/manual/general_cfg/data_storage.md +++ b/hugo/content/manual/general_cfg/data_storage.md @@ -7,8 +7,8 @@ chapter = false ## data storage examples This dir contains two examples: [here](https://github.com/paulscherrerinstitute/ecmccfg/tree/master/examples/test/dataStorage). -1. Continiously add value to data storage. Push to epics by hw trigger. -2. Continiously add value to data storage. Push to epics by epics pv trigger. +1. Continuously add value to data storage. Push to epics by hw trigger. +2. Continuously add value to data storage. Push to epics by epics pv trigger. Data buffered data can be accessed by the "IOC_TEST:ds0-Data-Act" waveform pv (NELM 10000) Custom scale and offset can be applied to the stored values by MACROS (to the plc) in the startup file. @@ -17,7 +17,7 @@ Custom scale and offset can be applied to the stored values by MACROS (to the pl In this example the data stored in dataStorage 0 is pushed to epics at a falling edge of the axis 1 high limit. -Example 1 is started with the following stratup file: "add_data_to_buffer_trigg_push_hw.script" +Example 1 is started with the following startup file: "add_data_to_buffer_trigg_push_hw.script" ``` iocsh.bash add_data_to_buffer_trigg_push_hw.script @@ -55,7 +55,7 @@ static.highlimOld:=ax1.mon.highlim; In this example the data stored in dataStorage 0 is pushed to epics at a rising edge of the "IOC_TEST:Set-PushDataTrigger-RB" pv. -Example 2 is started with the following stratup file: "add_data_to_buffer_trigg_push_hw.script" +Example 2 is started with the following startup file: "add_data_to_buffer_trigg_push_hw.script" ``` iocsh.bash add_data_to_buffer_trigg_push_epics.script ``` diff --git a/hugo/content/manual/general_cfg/iocsh_utils.md b/hugo/content/manual/general_cfg/iocsh_utils.md index 5097251a0..94fb4c5e3 100644 --- a/hugo/content/manual/general_cfg/iocsh_utils.md +++ b/hugo/content/manual/general_cfg/iocsh_utils.md @@ -48,7 +48,7 @@ ecmcEpicsEnvSetCalc("test2", "061+1+2+3+4+5*10.1", "This is the number: 0x%06x") epicsEnvShow("test2") test2=This is the number: 0x00007a -#### Calculate scalings (floating point) +#### Calculate scaling (floating point) epicsEnvSet("IORange",32768) # ecmcEpicsEnvSetCalc("scaling", "$(test1)/$(IORange)*10", "%lf") ecmcEpicsEnvSetCalc("scaling", "061/32768*10", "%lf") @@ -87,7 +87,7 @@ result=0 ``` ### Iocsh function "ecmcEpicsEnvSetCalcTernary()" "ecmcEpicsEnvSetCalcTernary()" is used o evaluate expressions and set EPCIS environment variables to different strings. - depending on if the expression evaluates to "true" or "false". Can be usefull for: + depending on if the expression evaluates to "true" or "false". Can be useful for: * Choose different files to load like plc-files, axis configurations, db-files or.. * making conditional ecmc settings * ... diff --git a/hugo/content/manual/general_cfg/startup/_index.md b/hugo/content/manual/general_cfg/startup/_index.md index 0bf8222ca..e238faa16 100644 --- a/hugo/content/manual/general_cfg/startup/_index.md +++ b/hugo/content/manual/general_cfg/startup/_index.md @@ -12,7 +12,7 @@ startup.cmd takes the following arguments: ECMC_VER = 9.5.4 EthercatMC_VER = 3.0.2 (obsolete) INIT = initAll - MASTER_ID = 0 <-- put negatuve number to disable master, aka non ec-mode + MASTER_ID = 0 <-- put negative number to disable master, aka non ec-mode SCRIPTEXEC = iocshLoad NAMING = mXsXXX (default), ClassicNaming, ESSnaming EC_RATE = 1000 @@ -39,7 +39,7 @@ startup.cmd takes the following arguments: ECMC_SUPPORT_MOTION = Variable to be used to block use of motion (""/empty=support motion or "#-"=disable motion) ECMC_TMP_DIR = directory for temporary files, defaults to "/tmp/${IOC}/EcMaster_${ECMC_EC_MASTER_ID}}/" ECMC_EC_TOOL_PATH = path to ethercat tool - ECMC_SAMPLE_RATE_MS = current record update rate in milli seconds + ECMC_SAMPLE_RATE_MS = current record update rate in milliseconds ECMC_SAMPLE_RATE_MS_ORIGINAL = ECMC_SAMPLE_RATE_MS (used for restore to default if ECMC_SAMPLE_RATE_MS is changed) ``` diff --git a/hugo/content/manual/knowledgebase/ethercatCLI.md b/hugo/content/manual/knowledgebase/ethercatCLI.md index 56178b64b..fb6976b67 100644 --- a/hugo/content/manual/knowledgebase/ethercatCLI.md +++ b/hugo/content/manual/knowledgebase/ethercatCLI.md @@ -69,7 +69,7 @@ Ethernet devices: If the link is `DOWN`, try bringing the network device up manually. This, can be done with `ip link set up` -If the device name is unkown, check with `ip link show` and search for the MAC the EtherCAT master is bound to. +If the device name is unknown, check with `ip link show` and search for the MAC the EtherCAT master is bound to. ### `ethercat slaves` As the command suggest, this will provide a list of the EtherCAT slaves. diff --git a/hugo/content/manual/knowledgebase/hardware/EL5042.md b/hugo/content/manual/knowledgebase/hardware/EL5042.md index cc5fbeb15..c21b0c503 100644 --- a/hugo/content/manual/knowledgebase/hardware/EL5042.md +++ b/hugo/content/manual/knowledgebase/hardware/EL5042.md @@ -15,7 +15,7 @@ chapter = false ### error/warning Could be caused by: -* Wrong settings (bit counts, ..), see futher below on this page (and also motion/best practice). +* Wrong settings (bit counts, ..), see further below on this page (and also motion/best practice). * Bad electrical connection * Wrong power supply * Defect encoder or EL5042 @@ -25,7 +25,7 @@ Always start troubleshooting by checking the error, warning and ready bits and r #### Bad electrical connection -The serial communication is hanled by two RS422 channels, one for the clock and one for data. These channels can be measured with a scope: +The serial communication is handled by two RS422 channels, one for the clock and one for data. These channels can be measured with a scope: * The clock should output periodic "bursts" with clock pulses with a short break in between. The bursts should appear in the same rate as the ethercat frame rate (EC_RATE, default 1kHz). And the frequency of the clock pulses should correspond with the setting in your startup script (normally 250kHz..10Mhz depending on configuration) * The data channel should return bits in sync with the clock pulses. @@ -76,22 +76,22 @@ Long cable lengths can affect both power supply levels and the serial data chann **Power supply:** -Longer cables will normally also result in a higher voltage drops. Especaillay for 5V encoders this can be an issue. Make sure that the voltage are within the specified range by measuring the voltage level close to the encoder. +Longer cables will normally also result in a higher voltage drops. Especially for 5V encoders this can be an issue. Make sure that the voltage are within the specified range by measuring the voltage level close to the encoder. If the voltage is to low (mainly for 5V encoders): 1. Can cabling length be reduced 2. Can cable impedance be reduced (higher area) -3. Add a separate (5V) power supply with possabilities to adjust the voltage level to a slightly higher voltage. Make sure the voltage is not too high at the encoder end. +3. Add a separate (5V) power supply with possibilities to adjust the voltage level to a slightly higher voltage. Make sure the voltage is not too high at the encoder end. **Serial communication:** -The serial communication is also affected by the cable legth. For long cable lengths a reduction of the clock rate can be needed. The clock rate can be reduced by setting the CLK_FRQ_KHZ macro in the call to applyComponent.cmd (set clock freq. to 500kHz): +The serial communication is also affected by the cable length. For long cable lengths a reduction of the clock rate can be needed. The clock rate can be reduced by setting the CLK_FRQ_KHZ macro in the call to applyComponent.cmd (set clock freq. to 500kHz): ```bash ${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-26bit-BISS-C,CH_ID=1,MACROS='CLK_FRQ_KHZ=500'" ``` -For EL5042 the following rates are availble: +For EL5042 the following rates are available: * 10 MHz * 5 MHz * 3.33 MHz @@ -144,7 +144,7 @@ Note: The tool ecmccfg/utils/PDO_read can also be used for reading the diagnosti **When using the LSB offset, the same amount of ones ("1") will be shifted in as MSB. Therefore the LSB offset should normally not be used.** {{% /notice %}} -When using the LSB offset setting, the same amout of bits needs to be subtracted from the ST_BITS or MT_BITS +When using the LSB offset setting, the same amount of bits needs to be subtracted from the ST_BITS or MT_BITS Example: 26bit RLS, no LSB offset ``` @@ -153,7 +153,7 @@ ${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-RLS-LA11-26bit-BIS Example: 26bit RLS with 3 bits offset (ST_BITS=23, OFF_BITS=0) ``` -#If the offset is needed then the sum of the bit's still need to match the bitcount of the encoder. Example: Offset 3 LSB bits, set ST_BITS=23 (26-3) +#If the offset is needed then the sum of the bit's still need to match the bit-count of the encoder. Example: Offset 3 LSB bits, set ST_BITS=23 (26-3) ${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-Generic-BISS-C,CH_ID=1,MACROS=MT_BITS=0,ST_BITS=23,CLK_FRQ_KHZ=1000,OFF_BITS=3" ``` @@ -180,7 +180,7 @@ Example: Posital kit SSI encoder, KCD-S1X3B-1617-IE4F-GRQ # Startup bits 8 (zeros) # This then results in: # MT_BITS=16 + 8 = 24 (multi turn bits + startup bits) -# ST_BITS=17 + 2 = 19 (single trun bits + status bits) +# ST_BITS=17 + 2 = 19 (single turn bits + status bits) ${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Encoder-Generic-SSI,CH_ID=1,MACROS=MT_BITS=24,ST_BITS=19" ``` diff --git a/hugo/content/manual/knowledgebase/hardware/EL70x1.md b/hugo/content/manual/knowledgebase/hardware/EL70x1.md index 2b977dea5..a89093572 100644 --- a/hugo/content/manual/knowledgebase/hardware/EL70x1.md +++ b/hugo/content/manual/knowledgebase/hardware/EL70x1.md @@ -17,7 +17,7 @@ If the drive is in error or warning state, further information about the reason In order to use the ethercat command, you must first login to the server where the ecmc IOC is running. {{% /notice %}} -The diagnostic data can be read from register [Index A010 STM Diag data Ch.1](https://infosys.beckhoff.com/english.php?content=../content/1033/el70x1/2286662027.html&id=126846504617985959) with the folowing syntax: +The diagnostic data can be read from register [Index A010 STM Diag data Ch.1](https://infosys.beckhoff.com/english.php?content=../content/1033/el70x1/2286662027.html&id=126846504617985959) with the following syntax: The ecmccfg/utils/read_el70xx_diag.sh tool can be used to read all the diagnostic registers: ```bash @@ -57,7 +57,7 @@ Note: The tool ecmccfg/utils/PDO_read can also be used for reading the diagnosti #### under voltage -Use a multimeter to verify that the voltage level corresponds to voltage levels described in the electrical drawings. If the voltage is correct, then the under voltage alarm could be related to worng setting of nominal drive voltage setting (48V but the drive is powered with 24V). +Use a multimeter to verify that the voltage level corresponds to voltage levels described in the electrical drawings. If the voltage is correct, then the under voltage alarm could be related to wrong setting of nominal drive voltage setting (48V but the drive is powered with 24V). The nominal drive voltage setting can be changed by the U_NOM_MV macro when applying the component (ecmccomp). @@ -73,7 +73,7 @@ For the EL703x drives the nominal voltage must be set to 24V (ecmccomp handles t #### over voltage -Use a multimeter to verify that the voltage level corresponds to voltage levels described in the electrical drawings. If the voltage is correct, then the over voltage alarm could be related to worng setting of nominal drive voltage setting (24V but the drive is powered with 48V). +Use a multimeter to verify that the voltage level corresponds to voltage levels described in the electrical drawings. If the voltage is correct, then the over voltage alarm could be related to wrong setting of nominal drive voltage setting (24V but the drive is powered with 48V). The nominal drive voltage setting can be changed by the U_NOM_MV macro when applying the component (ecmccomp). @@ -99,7 +99,7 @@ However, for the EL70x1 drives there's no dedicated velocity loop (however some For more information on tuning the position loop see [tuning](../../tuning) #### Current loop -For most usecases, the default current controller parameters are already well tuned. Sometimes when operating at higher speeds the current loop needs to be tuned. +For most use cases, the default current controller parameters are already well tuned. Sometimes when operating at higher speeds the current loop needs to be tuned. The following parameters can be tuned for a EL70x1 stepper drive: * 8011:07 Ka factor diff --git a/hugo/content/manual/knowledgebase/hardware/EL9xxx.md b/hugo/content/manual/knowledgebase/hardware/EL9xxx.md index 222f24cea..a5d037408 100644 --- a/hugo/content/manual/knowledgebase/hardware/EL9xxx.md +++ b/hugo/content/manual/knowledgebase/hardware/EL9xxx.md @@ -12,7 +12,7 @@ chapter = false ### over current protection In the standard setup at PSI over current protection modules are used to feed 24V to both the EtherCAT communication bus (E-bus) and the power bus of the EtherCAT slaves. If the over current protection is not enabled then the EtherCAT slaves will not receive power. -First time, (and only first time), a system is in use, the overcurrent modules needs to be enabled in order to allow current to flow. Enabling is done by push buttons in the LED area of the module. The long horizontal LEDs are in fact buttons that can be used to activate or tripp the over current protection. +First time, (and only first time), a system is in use, the over-current modules needs to be enabled in order to allow current to flow. Enabling is done by push buttons in the LED area of the module. The long horizontal LEDs are in fact buttons that can be used to activate or tripp the over current protection. {{% notice warning %}} **Before pressing any button, check the electrical drawings and make sure it's safe to power on the system.** @@ -22,12 +22,12 @@ First time, (and only first time), a system is in use, the overcurrent modules n The EL9221-5000 has one channel and therefore only the top button is needed to be pressed. #### el9227-5500 -The EL9227-5500 is a 2 channel module and normally both channels needs to be enabled by pressing both the top and bottom long LED. if only one are pressed it could result in that the power to the communication is fine but the power to the i/o bus is lacking. This can result in starnge issues. Both EL9227-5500 and EL9221-5000 have dedicated panels whre status of the over current protection can be seen. +The EL9227-5500 is a 2 channel module and normally both channels needs to be enabled by pressing both the top and bottom long LED. if only one are pressed it could result in that the power to the communication is fine but the power to the i/o bus is lacking. This can result in strange issues. Both EL9227-5500 and EL9221-5000 have dedicated panels where status of the over current protection can be seen. ### passive terminals Some terminals are passive. Passive terminals are not EtherCAT slaves and do not communicate over EtherCAT (not equipped with EtherCAT slave controller). Passive terminals are normally used to simplify electrical connections (avoiding external terminals). For instance for distributing potential, 24V and 0V, an EL9184 can be used (8Ch 24V and 8Ch 0V). -The passive terminals will not show up as an EtherCAT slave when issueing the "ethercat slaves" command. However, they are normally visible in the electrical drawings. This could result in that the slave id in the electrical drawing is **NOT** corresponding to the EtherCAT slave index used when configuring ecmc. In worst case this could lead to that the wrong hardware/drive is configured. +The passive terminals will not show up as an EtherCAT slave when issuing the "ethercat slaves" command. However, they are normally visible in the electrical drawings. This could result in that the slave id in the electrical drawing is **NOT** corresponding to the EtherCAT slave index used when configuring ecmc. In worst case this could lead to that the wrong hardware/drive is configured. {{% notice warning %}} **When configuring ecmc, make sure the EtherCAT slave index is correct, do not blindly trust the electrical drawings since a passive terminal could introduce an shift in the slave indices.** diff --git a/hugo/content/manual/knowledgebase/hardware/host.md b/hugo/content/manual/knowledgebase/hardware/host.md index f39c418e8..1be519054 100644 --- a/hugo/content/manual/knowledgebase/hardware/host.md +++ b/hugo/content/manual/knowledgebase/hardware/host.md @@ -36,7 +36,7 @@ After editing the file, the host needs to be rebooted in order for the changes t #### high load on system ** Reduce sample rate** -Reducing the ethercat cycle time is often very effichient when it comes to reduce latency. Do not run the ecmc systems faster than needed. +Reducing the ethercat cycle time is often very efficient when it comes to reduce latency. Do not run the ecmc systems faster than needed. The default ecmc sample rate is 1Khz, which in many cases is not needed. The sample rate is defined when require ecmccfg (example set to 500Hz, instead of 1kHz): @@ -48,7 +48,7 @@ There are some restrictions on the sample rate. Normally, a rate in the range 10 {{% /notice %}} ** Affinity** -Setting the affinity of the ecmc realtiem thread can often improve the performace. First check how many cores the controller has. +Setting the affinity of the ecmc realtime thread can often improve the performance. First check how many cores the controller has. {{% notice warning %}} At PSI, core 0 is always isolated, do not move any threads to core 0. {{% /notice %}} @@ -61,9 +61,9 @@ ${SCRIPTEXEC} ${ecmccfg_DIR}setAppMode.cmd #- Set affinity of ecmc_rt (core 5) epicsThreadSetAffinity ecmc_rt 5 ``` -If more than one ecmc ioc is running on the server, then make sure the ecmc_rt threads run on differnt cores. +If more than one ecmc ioc is running on the server, then make sure the ecmc_rt threads run on different cores. -Also other threads might take a lot of resources, for instace the epics thread "cbLow": +Also other threads might take a lot of resources, for instance the epics thread "cbLow": ``` afterInit "epicsThreadSetAffinity cbLow 6" ``` @@ -72,32 +72,32 @@ cbLow is created at iocInit, therefore the "epicsThreadSetAffinity" must be exec {{% /notice %}} ### EtherCAT rate (EC_RATE) -The default EtherCAT frame rate in ecmc is set to 1kHz. For most applications this is however not needed and can therefore be reduced. A reduced EtherCAT rate reduces the load on the controller. In general, a good value for the frame rate is in the range 100Hz to 1kHz. For motion systems, a frame rate of 100Hz..500Hz is normally enough. Rates ouside the 100Hz..1kHz range is normally not a good idea, and some slaves might not support it. However, in special cases both lower and higher rates might be possible and required. +The default EtherCAT frame rate in ecmc is set to 1kHz. For most applications this is however not needed and can therefore be reduced. A reduced EtherCAT rate reduces the load on the controller. In general, a good value for the frame rate is in the range 100Hz to 1kHz. For motion systems, a frame rate of 100Hz..500Hz is normally enough. Rates outside the 100Hz..1kHz range is normally not a good idea, and some slaves might not support it. However, in special cases both lower and higher rates might be possible and required. Example: Set rate to 500Hz ``` require ecmccfg "EC_RATE=500" ... ``` -For more information see the chapter descriping startup.cmd. +For more information see the chapter describing startup.cmd. As a comparison, TwinCAT default EtherCAT rates are: * 100Hz for PLC * 500Hz for motion #### Lower rates -Issues that could occour in rates below 100Hz: +Issues that could occur in rates below 100Hz: * triggering of slave watchdogs -* issues with dc clock syncs (DC capabale slaves normally performs best with at a rate of atleast 500Hz) +* issues with dc clock syncs (DC capable slaves normally performs best with at a rate of at least 500Hz) * some slaves might not support it #### Higher rates -Issues that could occour in rates over 1Kz: +Issues that could occur in rates over 1Kz: * missed frames * issues with dc clock syncs * some slaves might not support it. -NOTE: Some slave might support a high rate but could have built in signal filters of several ms which then makes sampling at higher freqs unneccesarry/not needed. +NOTE: Some slave might support a high rate but could have built in signal filters of several ms which then makes sampling at higher freqs unnecessary/not needed. In order to successfully run an ecmc ethercat system at higher rates some tuning might be needed: * minimize slave count (and ensure that the slaves support it) diff --git a/hugo/content/manual/knowledgebase/motion.md b/hugo/content/manual/knowledgebase/motion.md index 3dae2bce3..d744bc0a7 100644 --- a/hugo/content/manual/knowledgebase/motion.md +++ b/hugo/content/manual/knowledgebase/motion.md @@ -14,7 +14,7 @@ chapter = false --- ## both_limits error -The "BOTH_LIMITS" error can be related to that limits switches are not powered with 24V. As standard at PSI, limts are feed from 24V outputs, normally an EL2819 terminal. Basically the ouptputs needs then to be set to 1 in order to power the switches. Check the schematics in order to find out which output that powers the switches for a certain axis and then use one the following approaches to set it to 1: +The "BOTH_LIMITS" error can be related to that limits switches are not powered with 24V. As standard at PSI, limits are feed from 24V outputs, normally an EL2819 terminal. Basically the outputs needs then to be set to 1 in order to power the switches. Check the schematics in order to find out which output that powers the switches for a certain axis and then use one the following approaches to set it to 1: Define the output in axis yaml file: ``` @@ -25,17 +25,17 @@ axis: ... ``` -By using the commad Cfg.WriteEcEntryEcPath(ec\.s\.binaryOutput\,\): +By using the command Cfg.WriteEcEntryEcPath(ec\.s\.binaryOutput\,\): ``` ecmcConfigOrDie "Cfg.WriteEcEntryEcPath(ec0.s5>.binaryOutput02,1)" ``` ## position lag error -A position lag error (following error) can be genereated in the following situations: +A position lag error (following error) can be generated in the following situations: 1. The motor torque is too low, making it hard for the motor to keep up with the setpoint. 2. The scaling factors are wrong resulting in that the feed forward part of the controller is not working well. 3. The velocity setpoint is too high resulting in motor stall (common for stepper motors). -4. The velocity setpoint is higher than what the drive can achive (saturated velocity setpoint). +4. The velocity setpoint is higher than what the drive can achieve (saturated velocity setpoint). ### 1. motor torque to low @@ -44,7 +44,7 @@ A position lag error (following error) can be genereated in the following situat 3. Check the current setting of the motor. If possible increase the current setting to get a higher torque. {{% notice warning %}} -Before increase current to the motor, make sure that both motor and drive can handle the higher current. Extra care needs to be taken for vaccum applications. +Before increase current to the motor, make sure that both motor and drive can handle the higher current. Extra care needs to be taken for vacuum applications. {{% /notice %}} ### 2. scaling factors are wrong @@ -52,24 +52,24 @@ Check the scaling documentation [here](https://paulscherrerinstitute.github.io/e One way to test if the scaling is correct is to set all controller parameters (except Kff) to 0 and then initiate a move. Basically the actual position of the axis should follow the setpoint closely with teh same slope. If the slope differs, then the scaling factors are wrong. ### 3. the velocity setpoint is too high resulting in stall -If a stepper motor stalls because of too high velocity there's a few thing that can be done in order to improve the ability to reach higehr velocities: -1. Add a damper: This is nromally very effichient but not always possible. -2. Tune controller parameters (both position loop in ecmc andn the controller loops in the drive), see hardware/tuning +If a stepper motor stalls because of too high velocity there's a few thing that can be done in order to improve the ability to reach higher velocities: +1. Add a damper: This is normally very efficient but not always possible. +2. Tune controller parameters (both position loop in ecmc and the controller loops in the drive), see hardware/tuning 3. If possible, test to increase or reduce current (make sure you do not burn the motor if increasing). {{% notice warning %}} -Before increase current to the motor, make sure that both motor and drive can handle the higher current. Extra care needs to be taken for vaccum applications. +Before increase current to the motor, make sure that both motor and drive can handle the higher current. Extra care needs to be taken for vacuum applications. {{% /notice %}} ### 4. velocity higher than allowed by driver -For EL704x stepper drives are default setup to maximum veleocity range of +-2000fullsteps/s. The 16bit velocity setpoint that are sent to the drive correspons to this range. Bascially trying to write a higehr value than that will saturate the velocity setpoint resulting in that the required speed is not achived, resulting in position lag error. The speed range for the EL704x can however be changed by setting SDO 8012:05: +For EL704x stepper drives are default setup to maximum velocity range of +-2000 full-steps/s. The 16bit velocity setpoint that are sent to the drive corresponds to this range. Basically trying to write a higher value than that will saturate the velocity setpoint resulting in that the required speed is not achieved, resulting in position lag error. The speed range for the EL704x can however be changed by setting SDO 8012:05: ``` -0 for 1000 full steps/second -1 for 2000 full steps/second (default) -2 for 4000 full steps/second -3 for 8000 full steps/second -4 for 16000 full steps/second -5 for 32000 full steps/second +0 for 1000 full-steps/second +1 for 2000 full-steps/second (default) +2 for 4000 full-steps/second +3 for 8000 full-steps/second +4 for 16000 full-steps/second +5 for 32000 full-steps/second ``` After changing this value you also need to change the drive scaling in the axis yaml file. @@ -80,7 +80,7 @@ Possible reasons: 1. For systems with safety, tripp off STO or power to the drive removed by contactor. Check status of safety system. 2. Over current protection of 48V tripped. 3. No 48V connected. -4. ecmc PLC disabaling axis, check PLC sources. +4. ecmc PLC disabling axis, check PLC sources. 5. Motion axis in error state. Some errors prevent the axis from being enabled. Check axis error state 6. Drive hardware enable input not set high (valid for EP7211-0034, EL70xx if special cfgs). 7. Axis object configured with external interlock (yaml->input.interlock). diff --git a/hugo/content/manual/motion_cfg/_index.md b/hugo/content/manual/motion_cfg/_index.md index 00475d4a2..41b3a4408 100644 --- a/hugo/content/manual/motion_cfg/_index.md +++ b/hugo/content/manual/motion_cfg/_index.md @@ -25,7 +25,7 @@ Additionally the schema of the yaml file is checked by Cerberus. This check will point out errors in the structure of the configuration as well as certain type errors. ### [plc yaml config](axisPLC) -Syncronization configurations +Synchronization configurations ### [scaling](scaling) Configuration of scaling diff --git a/hugo/content/manual/motion_cfg/axisPLC.md b/hugo/content/manual/motion_cfg/axisPLC.md index 29d7565a4..f698596ed 100644 --- a/hugo/content/manual/motion_cfg/axisPLC.md +++ b/hugo/content/manual/motion_cfg/axisPLC.md @@ -6,7 +6,7 @@ chapter = false ## Introduction Each axis can have a native PLC. -This PLC can be e.g. used for interlocking or synchronisation. +This PLC can be e.g. used for interlocking or synchronization. The axis PLC is part of the [yaml](axisyaml) config. The code can be provided [inline](#inline) or in a separate [file](#file). diff --git a/hugo/content/manual/motion_cfg/axisYaml.md b/hugo/content/manual/motion_cfg/axisYaml.md index 75b95a551..14cdfdfed 100644 --- a/hugo/content/manual/motion_cfg/axisYaml.md +++ b/hugo/content/manual/motion_cfg/axisYaml.md @@ -62,7 +62,7 @@ axis: id: 1 # type: joint # axis types: # 1 (equiv: physical, joint, j, motor, real) - # 2 (equiv: virtual, end_effector, endeffector, ee, e) + # 2 (equiv: virtual, end_effector, end-effector, ee, e) # mode: CSV # supported modes: CSV and CSP # parameters: powerAutoOnOff=2;powerOnDelay=6.0;powerOffDelay=1.0; ``` @@ -235,11 +235,11 @@ mandatory optional - `source`: source of position setpoint, 0=trajectory generator of axis ; 1=from PLC -- `type`: type of velocity profile: 0=trapezoidal ; 1=scurve +- `type`: type of velocity profile: 0=trapezoidal ; 1=s-curve - `axis` - - `deceleration`: deccelerartion setpoint for initialization (in EGU/sec2) + - `deceleration`: deceleration setpoint for initialization (in EGU/sec2) - `emergencyDeceleration`: deceleration setpoint for emergencies. Defaults to acceleration setpoint if not specified. - - `jerk`: jerk for scurved profiles (in EGU/sec3) + - `jerk`: jerk for s-curved profiles (in EGU/sec3) - `jog` * `velocity`: velocity setpoint the axis will be initialized to for jogging * `acceleration`: acceleration setpoint for initialization, for jogging @@ -304,7 +304,7 @@ optional ``` ## homing -This section is should be obsolete at PSI, as for all new installation using EtherCAT, absoulte encoders are mandatory. +This section is should be obsolete at PSI, as for all new installation using EtherCAT, absolute encoders are mandatory. In case a legacy system or temporary installation requires a incremental encoder, or even open loop operation, several procedures for referencing are available. optional @@ -426,14 +426,14 @@ axis: modeCmdHome: 10 # Drive mode value for when homing (written to axis.drvMode.modeSet when homing) features: blockCom: false # Block communication to axis - allowSrcChangeWhenEnabled: false # Allow traj/enc sorce change when axis is enabled + allowSrcChangeWhenEnabled: false # Allow traj/enc source change when axis is enabled allowedFunctions: homing: true # Allow homing constantVelocity: true # Allow constant velocity positioning: true # Allow positioning epics: - name: M1 # Axis anme + name: M1 # Axis name precision: 3 # Decimal count description: very important motor axis # Axis description unit: mm # Unit @@ -514,7 +514,7 @@ encoder: latchCount: 1 # latch number to ref on (1=ref on first latch) controller: - Kp: 15 # Kp proportinal gain + Kp: 15 # Kp proportional gain Ki: 0.02 # Ki integral gain Kd: 0 # Kd derivative gain Kff: 1 # Feed forward gain diff --git a/hugo/content/manual/motion_cfg/best_practice/_index.md b/hugo/content/manual/motion_cfg/best_practice/_index.md index 512b6a7db..b1e3a4112 100644 --- a/hugo/content/manual/motion_cfg/best_practice/_index.md +++ b/hugo/content/manual/motion_cfg/best_practice/_index.md @@ -5,13 +5,13 @@ chapter = false +++ ## best Practice -Here you can find some best practice configurations for common usecases. -The complete examples with starup files can be found [here](https://github.com/paulscherrerinstitute/ecmccfg/tree/master/examples/PSI/best_practice) +Here you can find some best practice configurations for common use cases. +The complete examples with startup files can be found [here](https://github.com/paulscherrerinstitute/ecmccfg/tree/master/examples/PSI/best_practice) ### [stepper and BISS-C](stepper_biss_c) An example configuration of a EL7041-0052 and a EL5042. -The complete example with starup file can be found [here](https://github.com/paulscherrerinstitute/ecmccfg/tree/master/examples/PSI/best_practice/motion/stepper_bissc) +The complete example with startup file can be found [here](https://github.com/paulscherrerinstitute/ecmccfg/tree/master/examples/PSI/best_practice/motion/stepper_bissc) ### [servo](servo) An example configuration of a Ex72xx servo drive with AM8xxx motor. -The complete example with starup file can be found [here](https://github.com/paulscherrerinstitute/ecmccfg/tree/master/examples/PSI/best_practice/motion/servo) +The complete example with startup file can be found [here](https://github.com/paulscherrerinstitute/ecmccfg/tree/master/examples/PSI/best_practice/motion/servo) diff --git a/hugo/content/manual/motion_cfg/best_practice/servo.md b/hugo/content/manual/motion_cfg/best_practice/servo.md index 5be849e85..4159a3f8b 100644 --- a/hugo/content/manual/motion_cfg/best_practice/servo.md +++ b/hugo/content/manual/motion_cfg/best_practice/servo.md @@ -9,7 +9,7 @@ chapter = false * Lab test stage (1mm/rev) * Motor : AM8111-0F20 -### scalings +### scaling Config for scaling in mm, mm/s, mm/s2 ### motor AM8111-XFX0 @@ -24,16 +24,16 @@ Only the encoder integrated encoder is configured in this example. The specifica ``` One Cable Technology for power and feedback: feedback transmission via motor cable, no feedback cable necessary, electronic nameplate, multi-turn, absolute position within 4096 revolutions, 18 bit resolution. ``` -However, when connecting to an Ex72xx drive the single turn count will be 20bits and 12bits multiturn, resulting in a total of 32bits absolute bits. +However, when connecting to an Ex72xx drive the single turn count will be 20bits and 12bits multi-turn, resulting in a total of 32bits absolute bits. * encoder.numerator: Travels 1 mm/rev * encoder.denominator: Resolution: 1048576 counts (20bits) per = 1mm * encoder.absBits: 32 bits (20bits+12bits) * encoder.type: Absolute (type 1) -* ecnoder.absOffset: Offset to 0 position of linear stage (-1000 in this example) +* encoder.absOffset: Offset to 0 position of linear stage (-1000 in this example) ``` -# The encoder on most motors are 20bit single turn and 12 bit multiturn (4096 turns) +# The encoder on most motors are 20bit single turn and 12 bit multi-turn (4096 turns) encoder: type: 1 position: ec0.s$(DRV_ID).positionActual01 @@ -44,7 +44,7 @@ encoder: absOffset: -1000 ``` -### drive scalings +### drive scaling Max scale for motors depend on the pole count: * 6 pole: Max scale is 8000revs/s (in this case 8000mm/s) * 8 pole: Max scale is 6000revs/s diff --git a/hugo/content/manual/motion_cfg/best_practice/stepper_biss_c.md b/hugo/content/manual/motion_cfg/best_practice/stepper_biss_c.md index 0c5db9095..800136264 100644 --- a/hugo/content/manual/motion_cfg/best_practice/stepper_biss_c.md +++ b/hugo/content/manual/motion_cfg/best_practice/stepper_biss_c.md @@ -15,7 +15,7 @@ chapter = false ## scalings Config for scaling in mm, mm/s, mm/s2 -### encoder scalings +### encoder scaling Two encoders are configured: 1. Closed loop: BISS-C. This is used as the default encoder for control 2. Open loop: EL7041 Step counter @@ -29,7 +29,7 @@ RLS BISS-C: * encoder.denominator: Resolution: 4096 counts per = 1mm * encoder.absBits: 26 bits * encoder.type: Absolute (type 1) -* ecnoder.absOffset: Offset to 0 position of linear stage (-1408.794 in this example) +* encoder.absOffset: Offset to 0 position of linear stage (-1408.794 in this example) ``` encoder: @@ -51,13 +51,13 @@ encoder: **Hardware configuration EL5042** {{% notice warning %}} -Do not use the LSB offset functionality of the EL5042 (0x80p8:17). The same amount of ones ("1") will be shifted in as MSB which then normally leads to a higher position value, which is confusing. For more information see the troubleshootuing/hardware section. +Do not use the LSB offset functionality of the EL5042 (0x80p8:17). The same amount of ones ("1") will be shifted in as MSB which then normally leads to a higher position value, which is confusing. For more information see the knowledge-base/hardware section. {{% /notice %}} #### open loop (encoder 2) -The EL7041 drive has a build in micro step counter (64 microsteps/fullstep): +The EL7041 drive has a build in micro step counter (64 micro-steps/full-step): * encoder.numerator: Travels 1 mm/rev -* encoder.denominator: Resolution: 200*64=12800 microsteps/rev = 12800 microsteps/mm +* encoder.denominator: Resolution: 200*64=12800 micro-steps/rev = 12800 micro-steps/mm * encoder.bits: The counter is 16bit (default) * encoder.type: Incremental (type 0) @@ -79,13 +79,13 @@ encoder: ### drive scalings The EL7041 is default setup to operate in a velocity range of +-2000 full steps/s which then corresponds to the 16bit drive.setpoint parameter (ec0.s$(DRV_SID).velocitySetpoint01): -* drive.numerator: Max velo = 2000 fullsteps/s == 10mm/s +* drive.numerator: Max velo = 2000 full-steps/s == 10mm/s * drive.denominator: velocity setpoint is 16bit == +-15bit = 32768 * drive.type: Stepper drive, set to 0 ``` drive: - numerator: 10 # Fastest speed in eng. units (2000 Fullsteps/s==10mm/s) + numerator: 10 # Fastest speed in eng. units (2000 Full-steps/s==10mm/s) denominator: 32768 # I/O range for ECMC_EC_ALIAS_DRV_VELO_SET (normally +-16bit) type: 0 # Stepper: 0. DS402: 1 (DS402 = servos and advanced stepper drives) setpoint: ec0.s$(DRV_SID).velocitySetpoint01 # Velocity setpoint if CSV. Position setpoint if CSP @@ -113,7 +113,7 @@ axis: ``` -At PSI, the limit switches are connected directlly to the 2 inputs of the EL70xx stepper drives and are accessible in the status word, bit 11 and 12: +At PSI, the limit switches are connected directly to the 2 inputs of the EL70xx stepper drives and are accessible in the status word, bit 11 and 12: ``` input: limit: diff --git a/hugo/content/manual/motion_cfg/direction.md b/hugo/content/manual/motion_cfg/direction.md index daf3636f6..e195276fe 100644 --- a/hugo/content/manual/motion_cfg/direction.md +++ b/hugo/content/manual/motion_cfg/direction.md @@ -26,11 +26,11 @@ Consult the respective slave manual for the correct SDO. ### encoder direction -In many cases inverstion of the encoder value is possible in the ethercat slave. +In many cases inversion of the encoder value is possible in the ethercat slave. By using INV_DIR macro to applyComponent.cmd, the direction can be changed. {{% notice info %}} -For EL5042, example below, the invertion leads to a very high number since the data size is 64bit. Therefore, it's advisable to switch sign in the axis configuration instead. +For EL5042, example below, the inversion leads to a very high number since the data size is 64bit. Therefore, it's advisable to switch sign in the axis configuration instead. {{% /notice %}} ```shell diff --git a/hugo/content/manual/motion_cfg/homing.md b/hugo/content/manual/motion_cfg/homing.md index 2214ecddb..0e7699b70 100644 --- a/hugo/content/manual/motion_cfg/homing.md +++ b/hugo/content/manual/motion_cfg/homing.md @@ -6,7 +6,7 @@ chapter = false ## homing -The follwoing sequences are available: +The following sequences are available: ``` ECMC_SEQ_HOME_NOT_VALID = 0, ECMC_SEQ_HOME_LOW_LIM = 1, @@ -33,67 +33,67 @@ Not a valid homing sequence, can be used if encoder is absolute. ### ECMC_SEQ_HOME_LOW_LIM = 1, 1. Axis moves backward until low limit switch and stops -2. Axis moves forward untill edge detected in limit switch signal. Position is latched. +2. Axis moves forward until edge detected in limit switch signal. Position is latched. 3. Axis stops 4. Homing is performed. ECMC_HOME_POS will be the new position at the position latched in step 2. ### ECMC_SEQ_HOME_HIGH_LIM = 2, 1. Axis moves forward until high limit switch and stops -2. Axis moves backward untill edge detected in limit switch signal. Position is latched. +2. Axis moves backward until edge detected in limit switch signal. Position is latched. 3. Axis stops 4. Homing is performed. ECMC_HOME_POS will be the new position at the position latched in step 2. ### ECMC_SEQ_HOME_LOW_LIM_HOME = 3, 1. Axis moves backward until low limit switch and stops -2. Axis moves forward untill edge detected in home switch signal. Position is latched. +2. Axis moves forward until edge detected in home switch signal. Position is latched. 3. Axis stops 4. Homing is performed. ECMC_HOME_POS will be the new position at the position latched in step 2. ### ECMC_SEQ_HOME_HIGH_LIM_HOME = 4, 1. Axis moves forward until high limit switch and stops -2. Axis moves backward untill edge detected in home switch signal. Position is latched. +2. Axis moves backward until edge detected in home switch signal. Position is latched. 3. Axis stops 4. Homing is performed. ECMC_HOME_POS will be the new position at the position latched in step 2. ### ECMC_SEQ_HOME_LOW_LIM_HOME_HOME = 5, 1. Axis moves backward until low limit switch and stops -2. Axis moves forward untill edge detected in home switch signal. Position is latched. -3. Axis continues untill second edge of home sensor. Motion is stopped. -4. Axis moves backward untill edge of home sensor. Position is latched. +2. Axis moves forward until edge detected in home switch signal. Position is latched. +3. Axis continues until second edge of home sensor. Motion is stopped. +4. Axis moves backward until edge of home sensor. Position is latched. 5. Homing is performed. ECMC_HOME_POS will be the new position at the center point of the two latched positions in step 2 and 4. ### ECMC_SEQ_HOME_HIGH_LIM_HOME_HOME = 6, 1. Axis moves forward until low limit switch and stops -2. Axis moves backward untill edge detected in home switch signal. Position is latched. -3. Axis continues untill second edge of home sensor. Motion is stopped. -4. Axis moves forward untill edge of home sensor. Position is latched. +2. Axis moves backward until edge detected in home switch signal. Position is latched. +3. Axis continues until second edge of home sensor. Motion is stopped. +4. Axis moves forward until edge of home sensor. Position is latched. 5. Homing is performed. ECMC_HOME_POS will be the new position at the center point of the two latched positions in step 2 and 4. ### ECMC_SEQ_HOME_BWD_HOME = 7, -1. Axis moves backward untill positive edge detected in limit switch signal. Position is latched. (polarity of home sensor can be changed) +1. Axis moves backward until positive edge detected in limit switch signal. Position is latched. (polarity of home sensor can be changed) 2. Axis stops 3. Homing is performed. ECMC_HOME_POS will be the new position at the position latched in step 1. ### ECMC_SEQ_HOME_FWD_HOME = 8, -1. Axis moves forward untill positive edge detected in limit switch signal. Position is latched. (polarity of home sensor can be changed) +1. Axis moves forward until positive edge detected in limit switch signal. Position is latched. (polarity of home sensor can be changed) 2. Axis stops 3. Homing is performed. ECMC_HOME_POS will be the new position at the position latched in step 1. ### ECMC_SEQ_HOME_BWD_HOME_HOME = 9, -1. Axis moves backward untill positive edge detected in limit switch signal. Position is latched. (polarity of home sensor can be changed) +1. Axis moves backward until positive edge detected in limit switch signal. Position is latched. (polarity of home sensor can be changed) 2. Axis contiues to move until a negative edge of the home sensor is detected. Axis stops. -3. Axis moves forward untill positive edge detected in limit switch signal. Position is latched. (polarity of home sensor can be changed) +3. Axis moves forward until positive edge detected in limit switch signal. Position is latched. (polarity of home sensor can be changed) 4. Homing is performed. ECMC_HOME_POS will be the new position at the center point of the two latched positions in step 2 and 4. ### ECMC_SEQ_HOME_FWD_HOME_HOME = 10, -1. Axis moves forward untill positive edge detected in limit switch signal. Position is latched. (polarity of home sensor can be changed) +1. Axis moves forward until positive edge detected in limit switch signal. Position is latched. (polarity of home sensor can be changed) 2. Axis contiues to move until a negative edge of the home sensor is detected. Axis stops. -3. Axis moves backward untill positive edge detected in limit switch signal. Position is latched. (polarity of home sensor can be changed) +3. Axis moves backward until positive edge detected in limit switch signal. Position is latched. (polarity of home sensor can be changed) 4. Homing is performed. ECMC_HOME_POS will be the new position at the center point of the two latched positions in step 2 and 4. ### ECMC_SEQ_HOME_LOW_LIM_INDEX = 11, 1. Axis moves backward until low limit switch and stops -2. Axis moves forward untill the predefined index signals (ECMC_HOME_LATCH_COUNT_OFFSET)from the encoder is encountered. Position is latched at the desired index position. +2. Axis moves forward until the predefined index signals (ECMC_HOME_LATCH_COUNT_OFFSET)from the encoder is encountered. Position is latched at the desired index position. 3. Axis stops 4. Homing is performed. ECMC_HOME_POS will be the new position at the position latched in step 2. @@ -107,7 +107,7 @@ epicsEnvSet("ECMC_HOME_LATCH_COUNT_OFFSET","2") # ### ECMC_SEQ_HOME_HIGH_LIM_INDEX = 12, 1. Axis moves forward until high limit switch and stops -2. Axis moves backward untill the predefined index signals (ECMC_HOME_LATCH_COUNT_OFFSET) from the encoder is encountered. Position is latched at the desired index position. +2. Axis moves backward until the predefined index signals (ECMC_HOME_LATCH_COUNT_OFFSET) from the encoder is encountered. Position is latched at the desired index position. 3. Axis stops 4. Homing is performed. ECMC_HOME_POS will be the new position at the position latched in step 2. @@ -139,9 +139,9 @@ caput IOC_TEST:Axis1.SET 0 ### ECMC_SEQ_HOME_LOW_LIM_SINGLE_TURN_ABS = 21, Indented use for resolvers (single turn absolute). Similar to seq 11 and 12. 1. Axis moves backward until low limit switch and stops -2. Axis moves forward untill limit switch change state +2. Axis moves forward until limit switch change state 3. Axis stops -4. Homing is performed. The multi turn bits will be homed to the value of ECMC_HOME_POS also consiering a offset of turns defined in ECMC_HOME_LATCH_COUNT_OFFSET. +4. Homing is performed. The multi-turn bits will be homed to the value of ECMC_HOME_POS also considering a offset of turns defined in ECMC_HOME_LATCH_COUNT_OFFSET. Some additional parameters are important for this homing sequence should work (example): ``` @@ -152,9 +152,9 @@ epicsEnvSet("ECMC_HOME_LATCH_COUNT_OFFSET","2") # Number o ### ECMC_SEQ_HOME_HIGH_LIM_SINGLE_TURN_ABS = 22, 1. Axis moves forward until high limit switch and stops -2. Axis moves backward untill limit switch change state +2. Axis moves backward until limit switch change state 3. Axis stops -4. Homing is performed. The multi turn bits will be homed to the value of ECMC_HOME_POS also consiering a offset of turns defined in ECMC_HOME_LATCH_COUNT_OFFSET. +4. Homing is performed. The multi turn bits will be homed to the value of ECMC_HOME_POS also considering a offset of turns defined in ECMC_HOME_LATCH_COUNT_OFFSET. Note: Only the multi turn bits are updated! @@ -170,18 +170,18 @@ Sequence 25 is the same as 15 but not blocked by motor record. The sequence will ### ECMC_SEQ_HOME_TRIGG_EXTERN = 26 Trigger external homing sequence in drive. -1. Optional: set drive mode to homing (and wait for mode readback) +1. Optional: set drive mode to homing (and wait for mode read-back) 3. Set trigg of homing (bit) -4. Wait for homing ready (bit). Reference the ecmc encoder object on rising edge of the homing reday bit -5. Optional: Change drive mode back to motion (and wait for mode readback) +4. Wait for homing ready (bit). Reference the ecmc encoder object on rising edge of the homing ready bit +5. Optional: Change drive mode back to motion (and wait for mode read-back) 6. Optional: Init post move if configured Currently used for smaract: [smaracat example](https://github.com/paulscherrerinstitute/ecmccfg/tree/master/examples/test/smaract) -In this exmaple also the drive modes is automatically handled by ecmc. +In this example also the drive modes is automatically handled by ecmc. ## setting polarity of home sensor -For some of the sequenceses it could be usefull to change the polarity of the home sensor. That can be done with the follwoing command: +For some of the sequences it could be useful to change the polarity of the home sensor. That can be done with the following command: ``` "Cfg.SetAxisMonHomeSwitchPolarity(int axisIndex, int polarity)"; # polarity==0 is NC (default) diff --git a/hugo/content/manual/motion_cfg/scaling.md b/hugo/content/manual/motion_cfg/scaling.md index fa1a3bc04..beb259daa 100644 --- a/hugo/content/manual/motion_cfg/scaling.md +++ b/hugo/content/manual/motion_cfg/scaling.md @@ -15,16 +15,16 @@ If the drive scaling is changes, make sure to adjust the PID parameters accordin ## drive scaling Drive scaling deals with the relation of the drive output (typically a 16- or 32-bit register) to axis velocity. -Scaling is similar, but slighlty different for [stepper drives](#stepper-motor-drives) and [servo drives](#servo-motor-drives) +Scaling is similar, but slightly different for [stepper drives](#stepper-motor-drives) and [servo drives](#servo-motor-drives) ### stepper motor drives The scaling for the Ex70xx slaves will be explained based on two very common examples. #### simple linear axis Assumptions: -* 200 fullsteps/rev motor +* 200 full-steps/rev motor * lead screw pitch: 5 mm/rev -* Register `0x8012:05` is set to `1` --> 2000 fullsteps max step rate (default for ECMC, check for other slaves!) +* Register `0x8012:05` is set to `1` --> 2000 full-steps max step rate (default for ECMC, check for other slaves!) * `velocitySetpoint` is in 16-bits. ```yaml @@ -36,15 +36,15 @@ drive: ##### explanation The `denominator` is `32768` because the `velocitySetpoint` is a 16-register for the Beckhoff stepper drives. Thus, half of the full range is reserved for positive (forward) motion, the remaining half for negative (backward) motion. -This means that at full output the motor would receive 2000 fullsteps per second. +This means that at full output the motor would receive 2000 full-steps per second. It is irrelevant whether the motor can actually spin this fast as this a purely theoretical value! Since we have established that the motor spins at 10 rev/s at full output, the conversion to engineering units is trivial and yields 50 mm/s, based on the lead screw pitch. #### rotational axis Assumptions: -* 400 fullsteps/rev motor +* 400 full-steps/rev motor * drive train ratio: 36 deg/rev -* Register `0x8012:05` is set to `1` --> 2000 fullsteps max step rate (default for ECMC, check for other slaves!) +* Register `0x8012:05` is set to `1` --> 2000 full-steps max step rate (default for ECMC, check for other slaves!) * `velocitySetpoint` is in 16-bits. ```yaml @@ -54,8 +54,8 @@ drive: ``` ##### explanation -At full output, the motor receives 2000 fullsteps/s, which results in 5 rev/s -due to the higher fullstep count of the motor. The drive train ratio is specified +At full output, the motor receives 2000 full-steps/s, which results in 5 rev/s +due to the higher full-step count of the motor. The drive train ratio is specified as 10 motor revolutions per 360 degree on the output or 36 deg/rev. Therefore, the resulting velocity of the motor in EGUs is 180 deg/s. Please note that this is _not_ the actual maximum velocity, but rather a theoretical scaling @@ -86,7 +86,7 @@ drive: This scaling ratio describes the relation of encoder counts and engineering units of the axis. Unlike the drive scaling, the encoder scaling is much simpler. -It represents merely the realtion between the observed counts on the encoder and the displacement of the load. +It represents merely the relation between the observed counts on the encoder and the displacement of the load. ### closed-loop @@ -112,15 +112,15 @@ In the example below such a case is presented, with an explanation. ```yaml encoder: numerator: 0.125 # 0.125 mm/rev lead screw - denominator: 12800 # 200 fullsteps/rev with 64 microsteps/fullstep + denominator: 12800 # 200 full-steps/rev with 64 micro-steps/full-step type: 0 # Type: 0=Incremental, 1=Absolute bits: 16 # Total bit count of encoder raw data ``` #### explanation -The internal step counter operates in microsteps. +The internal step counter operates in micro-steps. For most drives this value assumes 64, if uncertain consult the respective manual of the drive. -In case of a 200 fullsteps/rev motor, the `denominator` therefore will be set to `200*64=12800`. +In case of a 200 full-steps/rev motor, the `denominator` therefore will be set to `200*64=12800`. As for the `numerator`, this is simply the displacement observed for one full motor revolution. As the step counter is incremental, the `type: 0` has to be set. The step counter is of type `uint16`, thus the `bits: 16` setting, which is important to handle the over-/underflow.