Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xxx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Practical_Beamline_Controls_Training
Session_2
xxx
Commits
8a0470c7
Commit
8a0470c7
authored
2 years ago
by
kpetersn
Browse files
Options
Downloads
Patches
Plain Diff
Modified iocsh/vmc.cmd
parent
b521fa24
No related branches found
Branches containing commit
Tags
5.7.3
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iocBoot/iocxxx/iocsh/vmc.cmd
+8
-8
8 additions, 8 deletions
iocBoot/iocxxx/iocsh/vmc.cmd
with
8 additions
and
8 deletions
iocBoot/iocxxx/iocsh/vmc.cmd
+
8
−
8
View file @
8a0470c7
###
Virtual
Motor
Controller
support
epicsEnvSet
(
"VMC_PORT"
,
"3
1
33
7
"
)
epicsEnvSet
(
"VMC_PORT"
,
"3
33
33"
)
drvAsynIPPortConfigure
(
"VMC_ETH"
,
"127.0.0.1:$(VMC_PORT)"
,
0
,
0
,
0
)
...
...
@@ -16,11 +16,11 @@ asynOctetSetInputEos("VMC_ETH",0,"\r\n")
asynOctetSetOutputEos
(
"VMC_ETH"
,
0
,
"\r"
)
#
These
motor
records
can
get
their
prefix
from
the
environment
variable
dbLoadRecords
(
"$(MOTOR)/db/asyn_motor.db"
,
"P=$(PREFIX),M=m1,DTYP=asynMotor,PORT=VMC1,ADDR=0,DESC=X,EGU=mm,DIR=Pos,VELO=1,VBAS=.1,ACCL=.2,BDST=0,BVEL=1,BACC=.2,MRES=.0025,PREC=4,DHLM=100,DLLM=-100,INIT="
)
dbLoadRecords
(
"$(MOTOR)/db/asyn_motor.db"
,
"P=$(PREFIX),M=m2,DTYP=asynMotor,PORT=VMC1,ADDR=1,DESC=Y,EGU=mm,DIR=Pos,VELO=1,VBAS=.1,ACCL=.2,BDST=0,BVEL=1,BACC=.2,MRES=.0025,PREC=4,DHLM=100,DLLM=-100,INIT="
)
dbLoadRecords
(
"$(MOTOR)/db/asyn_motor.db"
,
"P=$(PREFIX),M=m3,DTYP=asynMotor,PORT=VMC1,ADDR=2,DESC=Z,EGU=mm,DIR=Pos,VELO=1,VBAS=.1,ACCL=.2,BDST=0,BVEL=1,BACC=.2,MRES=.0025,PREC=4,DHLM=100,DLLM=-100,INIT="
)
#
!
dbLoadRecords
(
"$(MOTOR)/db/asyn_motor.db"
,
"P=$(PREFIX),M=m1,DTYP=asynMotor,PORT=VMC1,ADDR=0,DESC=X,EGU=mm,DIR=Pos,VELO=1,VBAS=.1,ACCL=.2,BDST=0,BVEL=1,BACC=.2,MRES=.0025,PREC=4,DHLM=100,DLLM=-100,INIT="
)
#
!
dbLoadRecords
(
"$(MOTOR)/db/asyn_motor.db"
,
"P=$(PREFIX),M=m2,DTYP=asynMotor,PORT=VMC1,ADDR=1,DESC=Y,EGU=mm,DIR=Pos,VELO=1,VBAS=.1,ACCL=.2,BDST=0,BVEL=1,BACC=.2,MRES=.0025,PREC=4,DHLM=100,DLLM=-100,INIT="
)
#
!
dbLoadRecords
(
"$(MOTOR)/db/asyn_motor.db"
,
"P=$(PREFIX),M=m3,DTYP=asynMotor,PORT=VMC1,ADDR=2,DESC=Z,EGU=mm,DIR=Pos,VELO=1,VBAS=.1,ACCL=.2,BDST=0,BVEL=1,BACC=.2,MRES=.0025,PREC=4,DHLM=100,DLLM=-100,INIT="
)
#
The
dbLoadTemplate
approach
is
a
cleaner
way
to
load
multiple
database
instances
#
!
dbLoadTemplate
(
"vmc.substitutions"
,
"P=$(PREFIX)"
)
dbLoadTemplate
(
"
substitutions/
vmc.substitutions"
,
"P=$(PREFIX)"
)
#
VirtualMotorController
(
#
portName
The
name
of
the
asyn
port
that
will
be
created
for
this
driver
...
...
@@ -30,12 +30,12 @@ dbLoadRecords("$(MOTOR)/db/asyn_motor.db","P=$(PREFIX),M=m3,DTYP=asynMotor,PORT=
#
idlePollPeriod
The
time
between
polls
when
no
axis
is
moving
#
1
-second
idle
polling
VirtualMotorCreateController
(
"VMC1"
,
"VMC_ETH"
,
3
,
250
,
1000
)
#
!
VirtualMotorCreateController
(
"VMC1"
,
"VMC_ETH"
,
3
,
250
,
1000
)
#
10
-second
idle
polling
#
!
VirtualMotorCreateController
(
"VMC1"
,
"VMC_ETH"
,
3
,
250
,
10000
)
#
No
idle
polling
#
!
VirtualMotorCreateController
(
"VMC1"
,
"VMC_ETH"
,
3
,
250
,
0
)
#
Extra
axes
,
10
-second
idle
polling
#
!
VirtualMotorCreateController
(
"VMC1"
,
"VMC_ETH"
,
8
,
250
,
10000
)
VirtualMotorCreateController
(
"VMC1"
,
"VMC_ETH"
,
8
,
250
,
10000
)
dbLoadRecords
(
"$(ASYN)/db/asynRecord.db"
,
"P=$(PREFIX),R=asyn1,PORT=VMC_ETH,ADDR=0,OMAX=0,IMAX=0"
)
dbLoadRecords
(
"$(ASYN)/db/asynRecord.db"
,
"P=$(PREFIX),R=asyn
_
1,PORT=VMC_ETH,ADDR=0,OMAX=0,IMAX=0"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment