Skip to content

Commit

Permalink
Merge branch 'master' of github.com:paulscherrerinstitute/ecmccfg
Browse files Browse the repository at this point in the history
  • Loading branch information
anderssandstrom committed Apr 2, 2024
2 parents 5475380 + 6e77711 commit 59e560e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/test/ax_groups/cfg/axis_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ axis:
# positioning: true # Allow positioning

epics:
name: Axis1 # Axis anme
name: Axis2 # Axis anme
precision: 3 # Decimal count
description: very important motor axis # Axis description
unit: mm # Unit
Expand Down
7 changes: 6 additions & 1 deletion examples/test/ax_groups/el7041-0052.script
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,17 @@ ${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadYamlAxis.cmd, "FILE=./cfg/axis_2.yaml,LIMIT

ecmcConfigOrDie "Cfg.AddAxisGroup(test)"
ecmcConfigOrDie "Cfg.AddAxisToGroupByName(1,test)"
ecmcConfigOrDie "Cfg.AddAxisToGroupByName(2,test)"
#ecmcConfigOrDie "Cfg.AddAxisToGroupByName(2,test)"

ecmcConfig "GetAxisGroupIndexByName(test)"
epicsEnvShow(ECMC_CONFIG_RETURN_VAL)
epicsEnvSet(GRP_ID,${ECMC_CONFIG_RETURN_VAL=0})


ecmcConfigOrDie "Cfg.AddAxisGroup(test2)"
ecmcConfigOrDie "Cfg.AddAxisToGroupByName(1,test2)"
ecmcConfigOrDie "Cfg.AddAxisToGroupByName(2,test2)"

##############################################################################
## PLC 1
#
Expand Down
14 changes: 7 additions & 7 deletions examples/test/ax_groups/plc/test.plc
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@

static.counter:=static.counter + 1;

if(static.counter>10) {
static.toggle:=not(static.toggle);
mc_grp_set_enable(${GRP_ID=1},static.toggle);
mc_grp_set_traj_src(${GRP_ID=1},static.toggle);
mc_grp_set_enc_src(${GRP_ID=1},static.toggle);
mc_grp_set_error(${GRP_ID=1},static.toggle);
}
#if(static.counter>10) {
# static.toggle:=not(static.toggle);
# mc_grp_set_enable(${GRP_ID=1},static.toggle);
# mc_grp_set_traj_src(${GRP_ID=1},static.toggle);
# mc_grp_set_enc_src(${GRP_ID=1},static.toggle);
# mc_grp_set_error(${GRP_ID=1},static.toggle);
#}

println('get_enable: ', mc_grp_get_enable(${GRP_ID=1}));
println('get_any_enable: ', mc_grp_get_any_enable(${GRP_ID=1}));
Expand Down

0 comments on commit 59e560e

Please sign in to comment.