Skip to content

Commit

Permalink
Add files aroud EL6688-PTP-twincat-ads
Browse files Browse the repository at this point in the history
Add more files to run crate 035 with epipcs-twincat-ads.
Either standalone or in parallel with ethercatmc.
For this situation differen PV names are needed.
Create st.mcu035-twincat-ads.iocsh and add the new PVs to the OPI.

Changes to be committed:
    modified:   ethercatmcExApp/op/Boy/IOC.opi
    new file:   ethercatmcExApp/op/Boy/tools/IOC-MCU1035-twincat-ads.mid
    new file:   iocsh/ethercatmcEL6688-PTP-twincat-ads.iocsh
    modified:   test/startup/st.mcu035-PTP-B02.iocsh
    new file:   test/startup/st.mcu035-twincat-ads.iocsh
  • Loading branch information
tboegi committed Nov 20, 2023
1 parent 3ee6aee commit 62cfe81
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 13 deletions.
57 changes: 57 additions & 0 deletions ethercatmcExApp/op/Boy/IOC.opi
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,63 @@ $(pv_value)</tooltip>
<x>0</x>
<y>432</y>
</widget>
<widget typeId="org.csstudio.opibuilder.widgets.ActionButton" version="2.0.0">
<actions hook="false" hook_all="false">
<action type="OPEN_DISPLAY">
<path>motor-0-ptp.opi</path>
<macros>
<include_parent_macros>true</include_parent_macros>
<PREFIX>LabS-MCAG:MC-MCU-1035:</PREFIX>
<P>LabS-MCAG:MC-MCU-1035:</P>
</macros>
<mode>1</mode>
<description></description>
</action>
</actions>
<alarm_pulsing>false</alarm_pulsing>
<backcolor_alarm_sensitive>false</backcolor_alarm_sensitive>
<background_color>
<color red="240" green="240" blue="240" />
</background_color>
<border_alarm_sensitive>false</border_alarm_sensitive>
<border_color>
<color red="0" green="128" blue="255" />
</border_color>
<border_style>0</border_style>
<border_width>1</border_width>
<enabled>true</enabled>
<font>
<opifont.name fontName=".SF NS Text" height="11" style="0" pixels="false">Default</opifont.name>
</font>
<forecolor_alarm_sensitive>false</forecolor_alarm_sensitive>
<foreground_color>
<color red="0" green="0" blue="0" />
</foreground_color>
<height>31</height>
<image></image>
<name>Action Button_7</name>
<push_action_index>0</push_action_index>
<pv_name></pv_name>
<pv_value />
<rules />
<scale_options>
<width_scalable>true</width_scalable>
<height_scalable>true</height_scalable>
<keep_wh_ratio>false</keep_wh_ratio>
</scale_options>
<scripts />
<style>0</style>
<text>MC-MCU-1035-twincat-ads</text>
<toggle_button>false</toggle_button>
<tooltip>$(pv_name)
$(pv_value)</tooltip>
<visible>true</visible>
<widget_type>Action Button</widget_type>
<width>180</width>
<wuid>1d681a25:1522fd92503:-61af</wuid>
<x>0</x>
<y>468</y>
</widget>
<widget typeId="org.csstudio.opibuilder.widgets.ActionButton" version="2.0.0">
<actions hook="false" hook_all="false">
<action type="OPEN_DISPLAY">
Expand Down
57 changes: 57 additions & 0 deletions ethercatmcExApp/op/Boy/tools/IOC-MCU1035-twincat-ads.mid
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<widget typeId="org.csstudio.opibuilder.widgets.ActionButton" version="2.0.0">
<actions hook="false" hook_all="false">
<action type="OPEN_DISPLAY">
<path>motor-0-ptp.opi</path>
<macros>
<include_parent_macros>true</include_parent_macros>
<PREFIX>LabS-MCAG:MC-MCU-1035:</PREFIX>
<P>LabS-MCAG:MC-MCU-1035:</P>
</macros>
<mode>1</mode>
<description></description>
</action>
</actions>
<alarm_pulsing>false</alarm_pulsing>
<backcolor_alarm_sensitive>false</backcolor_alarm_sensitive>
<background_color>
<color red="240" green="240" blue="240" />
</background_color>
<border_alarm_sensitive>false</border_alarm_sensitive>
<border_color>
<color red="0" green="128" blue="255" />
</border_color>
<border_style>0</border_style>
<border_width>1</border_width>
<enabled>true</enabled>
<font>
<opifont.name fontName=".SF NS Text" height="11" style="0" pixels="false">Default</opifont.name>
</font>
<forecolor_alarm_sensitive>false</forecolor_alarm_sensitive>
<foreground_color>
<color red="0" green="0" blue="0" />
</foreground_color>
<height>31</height>
<image></image>
<name>Action Button_7</name>
<push_action_index>0</push_action_index>
<pv_name></pv_name>
<pv_value />
<rules />
<scale_options>
<width_scalable>true</width_scalable>
<height_scalable>true</height_scalable>
<keep_wh_ratio>false</keep_wh_ratio>
</scale_options>
<scripts />
<style>0</style>
<text>MC-MCU-1035-twincat-ads</text>
<toggle_button>false</toggle_button>
<tooltip>$(pv_name)
$(pv_value)</tooltip>
<visible>true</visible>
<widget_type>Action Button</widget_type>
<width>180</width>
<wuid>1d681a25:1522fd92503:-61af</wuid>
<x>0</x>
<y>0</y>
</widget>
2 changes: 2 additions & 0 deletions iocsh/ethercatmcEL6688-PTP-twincat-ads.iocsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dbLoadRecords("ethercatmcEL6688-PTP-twincat-ads.template", "PREFIX=$(PREFIX), MOTOR_PORT=$(MOTOR_PORT), ASYN_PORT=$(ASYN_PORT)")

22 changes: 9 additions & 13 deletions test/startup/st.mcu035-PTP-B02.iocsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,34 @@ epicsEnvSet("MOTOR_PORT", "$(SM_MOTOR_PORT=MCU1)")
epicsEnvSet("IPADDR", "$(SM_IPADDR=172.30.38.73)")
epicsEnvSet("IPPORT", "$(SM_IPPORT=48898)")
epicsEnvSet("AMSNETIDIOC", "$(SM_AMSNETID=172.30.38.12.1.1)")
epicsEnvSet("REMOTEAMSNETID", "5.36.136.2.1.1")
epicsEnvSet("ASYN_PORT", "$(SM_ASYN_PORT=MC_CPU1)")
epicsEnvSet("PREFIX", "$(SM_PREFIX=LabS-MCAG:MC-MCU-035:)")
epicsEnvSet("PREC", "$(SM_PREC=3)")
epicsEnvSet("SM_NOAXES", "1")
epicsEnvSet("ECM_OPTIONS", "adsPort=852;amsNetIdRemote=5.36.136.2.1.1;amsNetIdLocal=$(AMSNETIDIOC)"
epicsEnvSet("ECM_OPTIONS", "adsPort=852;amsNetIdRemote=$(REMOTEAMSNETID);amsNetIdLocal=$(AMSNETIDIOC)"


# Do not start the poller yet
epicsEnvSet("ECM_MOVINGPOLLPERIOD", "0")
epicsEnvSet("ECM_IDLEPOLLPERIOD", "0")

< ethercatmcController.iocsh
< ethercatmcEL6688-PTP.iocsh
< ethercatmcEL6688-EL1252-PTP.iocsh
#< ethercatmcEL6688-PTP.iocsh
< ethercatmcEL6688-PTP-twincat-ads.iocsh


#####################################################
# EL1252, first channel, CHNO == 0
epicsEnvSet("CHNO", "0")
< ethercatmcEL1252-OneChannel.iocsh

#####################################################
# PTP with ExtSync
< ethercatmcEL6688-PTP.iocsh

#< ethercatmcEL1252-OneChannel.iocsh

#
# Start polling, values are in millisconds
#
epicsEnvSet("MOVINGPOLLPERIOD", "500")
epicsEnvSet("IDLEPOLLPERIOD", "500")
ethercatmcStartPoller("$(MOTOR_PORT)", "$(MOVINGPOLLPERIOD)", "$(IDLEPOLLPERIOD)")
#epicsEnvSet("MOVINGPOLLPERIOD", "500")
#epicsEnvSet("IDLEPOLLPERIOD", "500")
#ethercatmcStartPoller("$(MOTOR_PORT)", "$(MOVINGPOLLPERIOD)", "$(IDLEPOLLPERIOD)")

# Sleep to let the poller detect the AUX bit names
epicsThreadSleep 5
#epicsThreadSleep 5
26 changes: 26 additions & 0 deletions test/startup/st.mcu035-twincat-ads.iocsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
epicsEnvSet("MOTOR_PORT", "$(SM_MOTOR_PORT=MCU1)")
epicsEnvSet("IPADDR", "$(SM_IPADDR=172.30.38.73)")
epicsEnvSet("IPPORT", "$(SM_IPPORT=48898)")
epicsEnvSet("AMSNETIDIOC", "$(SM_AMSNETID=172.30.38.12.1.1)")
epicsEnvSet("REMOTEAMSNETID", "5.36.136.2.1.1")
epicsEnvSet("ASYN_PORT", "$(SM_ASYN_PORT=MC_CPU1)")
epicsEnvSet("PREFIX", "$(SM_PREFIX=LabS-MCAG:MC-MCU-1035:)")
epicsEnvSet("P", "$(SM_PREFIX=LabS-MCAG:MC-MCU-1035:)")
epicsEnvSet("PREC", "$(SM_PREC=3)")
epicsEnvSet("SM_NOAXES", "1")
epicsEnvSet("ECM_OPTIONS", "adsPort=852;amsNetIdRemote=$(REMOTEAMSNETID);amsNetIdLocal=$(AMSNETIDIOC)"

< ethercatmcController.iocsh

< ethercatmcEL6688-PTP-twincat-ads.iocsh


#####################################################
# EL1252, first channel TS_NS
epicsEnvSet("R", "TS_NS")
epicsEnvSet("DESC", "1Hz-TimeStamp ns")
epicsEnvSet("EGU", "ns")
epicsEnvSet("ASYNADDR", "ADSPORT=852/GVL_APP.nTS_NS?")

< ethercatmcInt64in.iocsh

0 comments on commit 62cfe81

Please sign in to comment.