98 Commits

Author SHA1 Message Date
Martino Ferrari
6f9de86b71 added gain to fhps output 2026-02-11 14:15:13 +01:00
Martino Ferrari
fa5db368cd added ScaleGAM 2026-02-11 14:14:56 +01:00
Martino Ferrari
47d7f8c446 added scale gam 2026-02-11 14:11:16 +01:00
Martino Ferrari
cb00d24179 fixed CCPS in op 2026-02-11 12:00:21 +01:00
Martino Ferrari
5ad2d75aa4 added missing links between aux states and do 2026-02-11 11:38:31 +01:00
ferrog
1e0b797e9e Wrong AO board index, fixed PS communication 2026-02-11 09:30:13 +00:00
Martino Ferrari
b23b75115b fixed and logic 2026-02-11 09:53:30 +01:00
Martino Ferrari
7a145d3912 Updated staet logic 2026-02-10 16:17:40 +01:00
Martino Ferrari
f07bcafc07 Better Error management 2026-02-10 16:08:42 +01:00
ferrog
d18c98311a Fixing DAN timing, inverting MHVPS_FLT dig input 2026-02-10 14:53:58 +00:00
ferrog
7a1a8da39c Set Analog DAN on different CPU that ADC 2026-02-09 18:58:15 +00:00
Martino Ferrari
d2c858ce40 Fixes 2026-02-09 18:29:48 +01:00
Martino Ferrari
4c6f0a5bb4 Fixed minors typos 2026-02-09 18:17:26 +01:00
ferrog
34b7b68f67 Linked PCF_FLT and PXI_FLT to Thread3 2026-02-09 17:13:22 +00:00
ferrog
cdafede708 Fixed HTTP Interface and DAN DIO time 2026-02-09 16:32:58 +00:00
ferrog
1db89f9c01 Corrected DAN Trigger PV name 2026-02-09 13:25:47 +00:00
ferrog
2991286fd7 Fixing 2026-02-09 10:59:18 +00:00
Martino Ferrari
f47135f20c fixed wrong PVs 2026-02-09 07:09:02 +01:00
Martino Ferrari
c6c0244b27 varius fix 2026-02-06 19:07:39 +01:00
Martino Ferrari
83a6387db8 fixed casting 2026-02-06 19:01:52 +01:00
Martino Ferrari
6b1bad9cbe fixed casting and non initalised array 2026-02-06 18:51:33 +01:00
Martino Ferrari
d334b9e473 Renamed 2026-02-06 18:45:06 +01:00
Martino Ferrari
cf6cdc72ea Renam 2026-02-06 18:44:19 +01:00
Martino Ferrari
043dfacd77 fixed wrong tirgger param 2026-02-06 18:36:00 +01:00
Martino Ferrari
fc61534370 reduced header and fixed sdnpub 2026-02-06 18:34:49 +01:00
Martino Ferrari
054e18179d reduced header and fixed sdnsub 2026-02-06 18:33:58 +01:00
Martino Ferrari
907dfadf75 removed check 2026-02-06 18:22:29 +01:00
Martino Ferrari
cdd700bf4e Fixed types and feedback 2026-02-06 18:15:42 +01:00
Martino Ferrari
872baa1dc2 fixed uint8 2026-02-06 18:11:30 +01:00
Martino Ferrari
9f110481ad Updated triangualr waveform gen 2026-02-06 18:05:05 +01:00
Martino Ferrari
12ceba0bf6 fixed types 2026-02-06 17:48:05 +01:00
Martino Ferrari
e1549afa07 fixed input/out signal types 2026-02-06 17:39:22 +01:00
Martino Ferrari
89fac665f3 fixed unused signals 2026-02-06 17:27:43 +01:00
Martino Ferrari
0177b52b7f added dummy signal 2026-02-06 17:27:21 +01:00
Martino Ferrari
25e7daf7e4 fixed types 2026-02-06 17:07:31 +01:00
Martino Ferrari
dcf2c8a967 added signals 2026-02-06 17:06:18 +01:00
Martino Ferrari
297bd279e4 fixed types 2026-02-06 16:53:45 +01:00
Martino Ferrari
c8aebf5a9e missed initialization 2026-02-06 16:44:08 +01:00
Martino Ferrari
68ef85b06d unit8 for RFON 2026-02-06 16:39:57 +01:00
Martino Ferrari
4c160177fb Fixed minor issues 2026-02-06 16:29:57 +01:00
Martino Ferrari
18dccbf140 Fixed types and classes 2026-02-06 16:18:10 +01:00
Martino Ferrari
07b4d20790 new build 2026-02-06 16:18:07 +01:00
Martino Ferrari
8d952d9aee latest build 2026-02-06 15:45:19 +01:00
Martino Ferrari
3a0933a2c4 fixed corruption 2026-02-06 15:43:59 +01:00
Martino Ferrari
aed46398a3 updated DAN source 2026-02-06 14:59:59 +01:00
Martino Ferrari
798b052e1a Updated with fixes on GAMs and PXI timing changes 2026-02-06 14:59:35 +01:00
Martino Ferrari
8b171ed9e9 added pxi6683 status 2026-02-06 14:58:56 +01:00
Martino Ferrari
b45eefc031 updated schema 2026-02-06 14:58:24 +01:00
Martino Ferrari
364a25192a flushing every cycle 2026-02-06 12:19:44 +01:00
Martino Ferrari
fc56cf7a56 fixed buffer issue 2026-02-06 12:11:03 +01:00
Martino Ferrari
5372d87202 var name changed 2026-02-06 12:05:19 +01:00
Martino Ferrari
cdd238e204 added trigger 2026-02-06 11:59:27 +01:00
Martino Ferrari
1fa5fead70 added trigger 2026-02-06 11:59:21 +01:00
Martino Ferrari
9d719f4876 added http interface 2026-02-06 11:59:12 +01:00
Martino Ferrari
7ab711aea7 added type 2026-02-06 11:59:03 +01:00
Martino Ferrari
0beee7545b added DAN_Trigger 2026-02-06 11:58:57 +01:00
Martino Ferrari
8470ca8ca0 updated schema 2026-02-06 11:58:34 +01:00
Martino Ferrari
d54457fca5 flushing buffer 2026-02-06 11:58:11 +01:00
ferrog
f34f823b6d Small fixes in NI6368ADC 2026-02-06 09:42:28 +00:00
Martino Ferrari
e326e1296e compiled conf 2026-02-05 18:09:44 +01:00
ferrog
0866544474 Package OK 2026-02-05 17:07:28 +00:00
ferrog
3646b1fc49 Merge branch 'develop' into PBS52-83-update-jada-rf01-marte-application 2026-02-05 15:59:11 +00:00
ferrog
c14d19c420 Boh 2026-02-05 15:58:48 +00:00
ferrog
82cb489cfa Add mdt to the package 2026-02-05 15:56:24 +00:00
Martino Ferrari
6ebd943f9b Using 6258 inversion mask in datasource 2026-02-05 14:52:23 +01:00
Martino Ferrari
b22c195f60 added custom marte schema 2026-02-05 12:10:15 +01:00
Martino Ferrari
d18a573a5a Cleaned up GAMS and duplicated code 2026-02-05 12:09:34 +01:00
Martino Ferrari
084b18d095 using MARTe-extensions gam 2026-02-05 12:08:35 +01:00
Martino Ferrari
46f5010426 Simplified fields of JAMessageGAM 2026-02-05 12:08:07 +01:00
Martino Ferrari
11e6159e0a Config 1 2026-02-05 10:33:53 +01:00
Martino Ferrari
92e292f4ac improving sync 2026-01-28 18:02:14 +01:00
Martino Ferrari
41fb7bc3b2 using NI6528 datasource 2026-01-28 15:13:26 +01:00
Martino Ferrari
452ee198d1 minor syntax changes 2026-01-28 13:58:54 +01:00
Martino Ferrari
1b5751bd40 Updated build 2026-01-28 01:13:18 +01:00
Martino Ferrari
e32dbf40e4 removed useless namespace 2026-01-28 00:01:01 +01:00
Martino Ferrari
ee55e148ac removed previous codebase 2026-01-27 23:58:24 +01:00
Martino Ferrari
b4c86c6690 Renamed Out to out folder 2026-01-27 23:51:35 +01:00
Martino Ferrari
623b7bfebe first full build of the project 2026-01-27 23:51:32 +01:00
Martino Ferrari
5962a60bb6 fixed out of scope GAM 2026-01-27 23:51:12 +01:00
Martino Ferrari
64e94601b1 First complete re-configuration 2026-01-27 21:29:37 +01:00
Martino Ferrari
9a21634052 Implementing HVON mode 2026-01-27 16:47:53 +01:00
Martino Ferrari
68c62d7623 Implemented missing wait state (now missing only HVON states) 2026-01-27 16:30:57 +01:00
Martino Ferrari
1fcc12525f typos 2026-01-27 15:59:33 +01:00
Martino Ferrari
d8fbf7c1f4 Implementing more states 2026-01-27 10:36:39 +01:00
Martino Ferrari
6866d48ebc removed ErrorGam (now GoErrorGAM) from ErrorState as it already in error state 2026-01-27 09:42:29 +01:00
Martino Ferrari
4c688fe744 added missing datasources 2026-01-27 09:41:22 +01:00
Martino Ferrari
7e63addd75 Renamed JAGyroApp to RTApp for shortening and avoid repetition with project name jada_gyro 2026-01-27 09:14:31 +01:00
Martino Ferrari
39cb95ac04 Added EPICSCAOutput 2026-01-27 09:06:27 +01:00
Martino Ferrari
522b89debe Added EPICSCAOutput datasource 2026-01-27 09:06:04 +01:00
Martino Ferrari
1a9324bbe4 Continue implementation of marte app 2026-01-27 00:17:59 +01:00
Martino Ferrari
ba5ae74c22 Implementing cleaner configuration 2026-01-23 18:00:15 +01:00
Martino Ferrari
f19df69de7 added package macro 2026-01-23 16:37:07 +01:00
Martino Ferrari
99dc5113f2 renamed 2026-01-23 16:33:35 +01:00
Martino Ferrari
08eec953ba Renamed 2026-01-23 16:32:52 +01:00
Martino Ferrari
56f50e3be1 Implementing gams and datas 2026-01-23 16:31:54 +01:00
Martino Ferrari
0fdac299a8 Initial work on MARTe config 2026-01-23 15:59:37 +01:00
Martino Ferrari
febdac9a24 Reorganizing structure 2026-01-23 14:43:29 +01:00
Martino Ferrari
2fa63d1fd5 Removed test csv files 2026-01-23 14:40:50 +01:00
189 changed files with 21583 additions and 41251 deletions

121
.marte_schema.cue Normal file
View File

@@ -0,0 +1,121 @@
package schema
#Classes: {
ExtractBitGAM: {...}
CompactBitGAM: {...}
HttpService: {
Port!: uint & >1024 & <49151
WebRoot?: string
Timeout?: uint
ListenMaxConnection?: uint
AcceptTimeout?: uint
MaxNumberOfThreads?: uint
MinNumberOfThreads?: uint
}
HttpObjectBrowser: {
Root!: string
...
}
HttpDataMonitor: {
...
}
HttpObjectBrowser: {
Root!: string
}
HttpDirectoryResource: {
BaseDir: string
}
HttpMessageInterface: {
...
}
NI6528: {
...
}
ConfigurationDatabase: {
...
}
JAWFRecordGAM: {
Directory!: string
...
}
JAPreProgrammedGAM: {
Directory!: string
PreProgrammedPeriodMs!: uint32
...
}
JAConditionalSignalUpdateGAM: {
Operation!: "AND" | "OR" | "XOR" | "NOR"
InputSignals: {
[_]: {
Comparator!: "EQUALS" | "GREATER" | "LESSER"
Value!: number
Type!: string
...
}
}
OutputSignals: {
[_]: {
DefaultValue!: uint32
Value!: uint32
Type!: string
...
}
}
...
}
JASourceChoiceGAM: {
...
}
JAMessageGAM: {
Operation!: "AND" | "OR"
InputSignals: {
[_]: {
Value!: number
Comparator!: "EQUALS" | "GREATER" | "LESS" | "EQUALS_OR_GREATER" | "EQUALS_OR_LESS" | "NOT"
Type!: string
...
}
}
Event!: {
Class: "Message"
Destination!: string
Function!: string
}
...
}
JAModeControlGAM: {
...
}
JARTStateMachineGAM: {
ConditionTrigger: 0 | 1
mhvps_hvon: uint
aps_hvon: uint
aps_swon: uint
bps_hvon: uint
bps_swon: uint
...
}
JASDNRTStateMachineGAM: {
ConditionTrigger: 0 | 1
mhvps_hvon: uint
aps_hvon: uint
aps_swon: uint
bps_hvon: uint
bps_swon: uint
...
}
DANSource: {
...
}
JATriangleWaveGAM: {
...
}
JARampupGAM: {
...
}
NI6683H: {
BoardId: uint
...
}
}

View File

@@ -87,9 +87,6 @@ of the distribution package..
<include type="file" source="obj/Build/x86-linux/DataSources/JAEPICSCA/" target="${project.artifactId}/lib">
<include>*.so</include>
</include>
<include type="file" source="obj/Build/x86-linux/DataSources/NI6528/" target="${project.artifactId}/lib">
<include>*.so</include>
</include>
<include type="file" source="obj/Build/x86-linux/DataSources/RandomDataSource/" target="${project.artifactId}/lib">
<include>*.so</include>
</include>
@@ -124,7 +121,7 @@ of the distribution package..
<include type="file" source="obj/Build/x86-linux/GAMs/JASDNRTStateMachineGAM/" target="${project.artifactId}/lib">
<include>*.so</include>
</include>
<include type="file" source="obj/Build/x86-linux/GAMs/JASourceChoiseGAM/" target="${project.artifactId}/lib">
<include type="file" source="obj/Build/x86-linux/GAMs/JASourceChoiceGAM/" target="${project.artifactId}/lib">
<include>*.so</include>
</include>
<include type="file" source="obj/Build/x86-linux/GAMs/JATerminalInterfaceGAM/" target="${project.artifactId}/lib">
@@ -143,6 +140,18 @@ of the distribution package..
target="/etc/opt/codac/${project.artifactId}">
<include>*</include>
</include>
<include type="file"
source="main/resources/mdt/"
targetroot="SYSTEM_ROOT"
target="/etc/opt/codac/${project.artifactId}">
<include>*</include>
</include>
<include type="file"
source="main/resources/dan/"
targetroot="SYSTEM_ROOT"
target="/etc/opt/codac/${project.artifactId}">
<include>*</include>
</include>
<!-- Scripts -->
<include type="script"
scriptType="helper"
@@ -177,7 +186,7 @@ of the distribution package..
<servicetype>simple</servicetype>
<user>root</user>
<group>root</group>
<execstart>%{codac_bin}/ec-gn-ja-pcf-gy.sh JAGyrotronA_FY19_P1.cfg</execstart>
<execstart>%{codac_bin}/ec-gn-ja-pcf-gy.sh jada_gyro_rtapp</execstart>
</include>
<!-- Soft dependencies and service ordering -->
<include type="file" source="-"
@@ -188,26 +197,6 @@ of the distribution package..
Wants=%{codac_service_prefix}-EC-GN-P01-PCF0CORE-ioc.service
After=%{codac_service_prefix}-EC-GN-P01-PCF0CORE-ioc.service]]>
<![CDATA[[Service]
KillSignal=SIGINT]]>
</include>
<include type="service"
name="ec-gn-ja-pcf-gyb"
target="ec-gn-ja-services" autostart="true">
<description>EC-GN-JA-PCF GYB daemon</description>
<servicetype>simple</servicetype>
<user>root</user>
<group>root</group>
<execstart>%{codac_bin}/ec-gn-ja-pcf-gy.sh JAGyrotronB_FY19_P1</execstart>
</include>
<!-- Soft dependencies and service ordering -->
<include type="file" source="-"
targetroot="SYSTEM_ROOT"
target="%{_unitdir}/%{codac_service_prefix}-ec-gn-ja-pcf-gyb.service.d/override.conf"
rpmeval="true">
<![CDATA[[Unit]
Wants=%{codac_service_prefix}-EC-GN-P01-PCF0CORE-ioc.service
After=%{codac_service_prefix}-EC-GN-P01-PCF0CORE-ioc.service]]>
<![CDATA[[Service]
KillSignal=SIGINT]]>
</include>
<requires version="current">%{codac_rpm_prefix}-${project.artifactId}-lib</requires>

View File

@@ -23,7 +23,7 @@
# $Id: Makefile.inc 3 2012-01-15 16:26:07Z aneto $
#
#############################################################
SPB = RandomDataSource.x NI6528.x JAEPICSCA.x
SPB = RandomDataSource.x JAEPICSCA.x
MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults

View File

@@ -1,30 +0,0 @@
#############################################################
#
# Copyright 2015 F4E | European Joint Undertaking for ITER
# and the Development of Fusion Energy ('Fusion for Energy')
#
# Licensed under the EUPL, Version 1.1 or - as soon they
# will be approved by the European Commission - subsequent
# versions of the EUPL (the "Licence");
# You may not use this work except in compliance with the
# Licence.
# You may obtain a copy of the Licence at:
#
# http://ec.europa.eu/idabc/eupl
#
# Unless required by applicable law or agreed to in
# writing, software distributed under the Licence is
# distributed on an "AS IS" basis,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied.
# See the Licence for the specific language governing
# permissions and limitations under the Licence.
#
# $Id: Makefile.gcc 3 2012-01-15 16:26:07Z aneto $
#
#############################################################
include Makefile.inc
LIBRARIES += -L$(CODAC_ROOT)/lib/ -lpxi6528

View File

@@ -1,53 +0,0 @@
#############################################################
#
# Copyright 2015 F4E | European Joint Undertaking for ITER
# and the Development of Fusion Energy ('Fusion for Energy')
#
# Licensed under the EUPL, Version 1.1 or - as soon they
# will be approved by the European Commission - subsequent
# versions of the EUPL (the "Licence");
# You may not use this work except in compliance with the
# Licence.
# You may obtain a copy of the Licence at:
#
# http://ec.europa.eu/idabc/eupl
#
# Unless required by applicable law or agreed to in
# writing, software distributed under the Licence is
# distributed on an "AS IS" basis,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied.
# See the Licence for the specific language governing
# permissions and limitations under the Licence.
#
# $Id: Makefile.inc 3 2012-01-15 16:26:07Z aneto $
#
#############################################################
OBJSX=NI6528.x
PACKAGE=DataSources
ROOT_DIR=../../../../obj
MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults
include $(MAKEDEFAULTDIR)/MakeStdLibDefs.$(TARGET)
INCLUDES += -I.
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L0Types
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L1Portability
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L2Objects
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L3Streams
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L4Messages
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L4Configuration
INCLUDES += -I$(MARTe2_DIR)/Source/Core/BareMetal/L5GAMs
INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L1Portability
INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L3Services
INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L4Messages
INCLUDES += -I$(CODAC_ROOT)/include/
all: $(OBJS) $(SUBPROJ) \
$(BUILD_DIR)/NI6528$(LIBEXT) \
$(BUILD_DIR)/NI6528$(DLLEXT)
echo $(OBJS)
include $(MAKEDEFAULTDIR)/MakeStdLibRules.$(TARGET)

View File

@@ -1,141 +0,0 @@
/**
* @file NI6528.cpp
* @brief Source file for class NI6528
* @date 01/03/2017
* @author Andre Neto
*
* @copyright Copyright 2015 F4E | European Joint Undertaking for ITER and
* the Development of Fusion Energy ('Fusion for Energy').
* Licensed under the EUPL, Version 1.1 or - as soon they will be approved
* by the European Commission - subsequent versions of the EUPL (the "Licence")
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl
*
* @warning Unless required by applicable law or agreed to in writing,
* software distributed under the Licence is distributed on an "AS IS"
* basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the Licence permissions and limitations under the Licence.
* @details This source file contains the definition of all the methods for
* the class NI6528 (public, protected, and private). Be aware that some
* methods, such as those inline could be defined on the header file, instead.
*/
/*---------------------------------------------------------------------------*/
/* Standard header includes */
/*---------------------------------------------------------------------------*/
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
/*---------------------------------------------------------------------------*/
/* Project header includes */
/*---------------------------------------------------------------------------*/
#include "AdvancedErrorManagement.h"
#include "CompilerTypes.h"
#include "NI6528.h"
/*---------------------------------------------------------------------------*/
/* Static definitions */
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/* Method definitions */
/*---------------------------------------------------------------------------*/
NI6528::NI6528() :
MARTe::DataSourceI() {
using namespace MARTe;
previousValue = 0u;
value = 0u;
port = 0u;
boardFileDescriptor = 0;
}
NI6528::~NI6528() {
using namespace MARTe;
(void) pxi6528_close_device(boardFileDescriptor);
}
bool NI6528::SetConfiguredDatabase(MARTe::StructuredDataI & data) {
using namespace MARTe;
bool ok = (DataSourceI::SetConfiguredDatabase(data));
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "DataSourceI::SetConfiguredDatabas() failed");
}
if (ok) {
ok = (GetNumberOfSignals() == 1u);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "GetNumberOfSignals() != 1u");
}
}
if (ok) {
ok = (GetSignalType(0u) == UnsignedInteger8Bit);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "GetSignalType(0u) != UnsignedInteger8Bit");
}
}
return ok;
}
bool NI6528::Initialise(MARTe::StructuredDataI & data) {
using namespace MARTe;
bool ok = DataSourceI::Initialise(data);
if (ok) {
ok = data.Read("Port", port);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "The Port shall be specified");
}
}
if (ok) {
ok = data.Read("DeviceName", deviceName);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "The DeviceName shall be specified");
}
}
int32 ret = pxi6528_open_device(&boardFileDescriptor, deviceName.Buffer(), O_NONBLOCK);
ok = (ret == 0);
if (!ok) {
StreamString err = strerror(-ret);
REPORT_ERROR(ErrorManagement::FatalError, "Could not open device (%s) : %s", deviceName.Buffer(), err.Buffer());
}
return ok;
}
bool NI6528::Synchronise() {
using namespace MARTe;
if(previousValue != value){
int32 ret = (pxi6528_write_port(boardFileDescriptor, port, value) > 0);
previousValue = value;
bool ok = (ret > -1);
if (!ok) {
StreamString err = strerror(-ret);
REPORT_ERROR(ErrorManagement::FatalError, "Could not write to device (%s) : %s", deviceName.Buffer(), err.Buffer());
}
}
return true;
}
bool NI6528::AllocateMemory() {
return true;
}
bool NI6528::GetSignalMemoryBuffer(const MARTe::uint32 signalIdx, const MARTe::uint32 bufferIdx, void *&signalAddress) {
signalAddress = &value;
return true;
}
const MARTe::char8 *NI6528::GetBrokerName(MARTe::StructuredDataI &data, const MARTe::SignalDirection direction) {
using namespace MARTe;
return "MemoryMapSynchronisedOutputBroker";
}
bool NI6528::PrepareNextState(const MARTe::char8 * const currentStateName, const MARTe::char8 * const nextStateName) {
return true;
}
CLASS_REGISTER(NI6528, "1.0")

View File

@@ -1,143 +0,0 @@
/**
* @file NI6528.h
* @brief Header file for class NI6528
* @date 07/06/2018
* @author Andre Neto
*
* @copyright Copyright 2015 F4E | European Joint Undertaking for ITER and
* the Development of Fusion Energy ('Fusion for Energy').
* Licensed under the EUPL, Version 1.1 or - as soon they will be approved
* by the European Commission - subsequent versions of the EUPL (the "Licence")
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl
*
* @warning Unless required by applicable law or agreed to in writing,
* software distributed under the Licence is distributed on an "AS IS"
* basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the Licence permissions and limitations under the Licence.
* @details This header file contains the declaration of the class NI6528
* with all of its public, protected and private members. It may also include
* definitions for inline methods which need to be visible to the compiler.
*/
#ifndef RANDOM_DATASOURCE_H_
#define RANDOM_DATASOURCE_H_
/*---------------------------------------------------------------------------*/
/* Standard header includes */
/*---------------------------------------------------------------------------*/
#include <pxi6528.h>
/*---------------------------------------------------------------------------*/
/* Project header includes */
/*---------------------------------------------------------------------------*/
#include "DataSourceI.h"
/*---------------------------------------------------------------------------*/
/* Class declaration */
/*---------------------------------------------------------------------------*/
/**
* @brief NI6528 simplified data source implementation.
*
* The configuration syntax is (names and signal quantities are only given as an example):
* +NI6528 = {
* Class = NI6528
* DeviceName = "/dev/pxi6528.0" //Mandatory
* Port = 0 //The port where to write
* Signals = {
* currentValue = {Type = uint8}
* bitmask = {Type = uint8}
* Value = {Type = uint8}
* }
* }
*/
class NI6528: public MARTe::DataSourceI {
public:
CLASS_REGISTER_DECLARATION()
/**
* @brief Constructor. NOOP.
*/
NI6528 ();
/**
* @brief Destructor. NOOP.
*/
virtual ~NI6528();
/**
* @brief The configuration data detailed in the class description
* @return true if all the compulsory parameters are set.
*/
virtual bool Initialise(MARTe::StructuredDataI & data);
/**
* @brief Verifies that at most one signal has been set with the correct type (i.e. any integer).
* @return true if the above conditions are met.
*/
virtual bool SetConfiguredDatabase(MARTe::StructuredDataI & data);
/**
* @brief @see DataSourceI::Synchronise
*/
virtual bool Synchronise();
/**
* @brief @see DataSourceI::AllocateMemory
*/
virtual bool AllocateMemory();
/**
* @brief @see DataSourceI::GetSignalMemoryBuffer
*/
virtual bool GetSignalMemoryBuffer(const MARTe::uint32 signalIdx, const MARTe::uint32 bufferIdx, void *&signalAddress);
/**
* @return "MemoryMapSynchronisedInputBroker"
*/
virtual const MARTe::char8 *GetBrokerName(MARTe::StructuredDataI &data, const MARTe::SignalDirection direction);
/**
* @brief NOOP
*/
virtual bool PrepareNextState(const MARTe::char8 * const currentStateName, const MARTe::char8 * const nextStateName);
private:
/**
* The previous value to write.
*/
MARTe::uint8 previousValue;
/**
* The bitmask to write value. (new value) = (current value) || (bitmask) && (write value)
*/
MARTe::uint8 bitmask;
/**
* The value to write.
*/
MARTe::uint8 value;
/**
* The port number
*/
MARTe::uint32 port;
/**
* The board file descriptor
*/
pxi6528_device_t boardFileDescriptor;
/**
* The device name
*/
MARTe::StreamString deviceName;
};
/*---------------------------------------------------------------------------*/
/* Inline method definitions */
/*---------------------------------------------------------------------------*/
#endif /* RANDOM_DATASOURCE_H_ */

View File

@@ -17,7 +17,8 @@
* or implied. See the Licence permissions and limitations under the Licence.
* @details This source file contains the definition of all the methods for
* the class JAConditionalSignalUpdateGAM (public, protected, and private). Be aware that some
* the class JAConditionalSignalUpdateGAM (public, protected, and private). Be
aware that some
* methods, such as those inline could be defined on the header file, instead.
*/
@@ -28,8 +29,11 @@
/*---------------------------------------------------------------------------*/
/* Project header includes */
/*---------------------------------------------------------------------------*/
#include "JAConditionalSignalUpdateGAM.h"
#include "AdvancedErrorManagement.h"
#include "Architecture/x86_gcc/CompilerTypes.h"
#include "ErrorType.h"
#include "JAConditionalSignalUpdateGAM.h"
#include "TypeDescriptor.h"
/*---------------------------------------------------------------------------*/
/* Static definitions */
@@ -39,18 +43,43 @@
/* Method definitions */
/*---------------------------------------------------------------------------*/
bool parse_comparator(const MARTe::StreamString &str,
JAConditionalSignalUpdateGAM::ComparisonMode &op) {
if (str == "EQUALS") {
op = JAConditionalSignalUpdateGAM::Equals;
return true;
}
if (str == "NOT") {
op = JAConditionalSignalUpdateGAM::Not;
return true;
}
if (str == "GREATER") {
op = JAConditionalSignalUpdateGAM::Greater;
return true;
}
if (str == "EQUALS_OR_GREATER") {
op = JAConditionalSignalUpdateGAM::EqualsOrGreater;
return true;
}
if (str == "LESS") {
op = JAConditionalSignalUpdateGAM::Less;
return true;
}
if (str == "EQUALS_OR_LESS") {
op = JAConditionalSignalUpdateGAM::EqualsOrLess;
return true;
}
return false;
}
JAConditionalSignalUpdateGAM::JAConditionalSignalUpdateGAM() {
inputSignals = NULL_PTR(void **);
inputSignalTypes = NULL_PTR(MARTe::TypeDescriptor *);
values = NULL_PTR(MARTe::uint32 *);
valuesCount = 0u;
comparators = NULL_PTR(comparator_t *);
outputSignals = NULL_PTR(MARTe::uint32 **);
defaultValues = NULL_PTR(MARTe::uint32 **);
outputs = NULL_PTR(output_t *);
needsReset = false;
expectedValues = NULL_PTR(MARTe::uint32 *);
expectedValuesCount = 0u;
operation = And;
comparators = NULL_PTR(ComparisonMode *);
}
JAConditionalSignalUpdateGAM::~JAConditionalSignalUpdateGAM() {
@@ -63,120 +92,141 @@ JAConditionalSignalUpdateGAM::~JAConditionalSignalUpdateGAM() {
if (inputSignalTypes != NULL_PTR(MARTe::TypeDescriptor *)) {
delete[] inputSignalTypes;
}
if (values != NULL_PTR(MARTe::uint32 *)) {
delete[] values;
if (outputs != NULL_PTR(output_t *)) {
delete[] outputs;
}
if (comparators != NULL_PTR(ComparisonMode *)) {
if (comparators != NULL_PTR(comparator_t *)) {
delete[] comparators;
}
if (defaultValues != NULL_PTR(MARTe::uint32 **)) {
delete[] defaultValues;
}
}
bool JAConditionalSignalUpdateGAM::Initialise(MARTe::StructuredDataI &data) {
using namespace MARTe;
bool ok = GAM::Initialise(data);
if (ok) {
// Read expected values.
AnyType valuesArray = data.GetType("ExpectedValues");
if (valuesArray.GetDataPointer() != NULL) {
expectedValuesCount = valuesArray.GetNumberOfElements(0u);
expectedValues = new uint32[expectedValuesCount];
Vector<uint32> valuesVector(expectedValues, expectedValuesCount);
ok = (data.Read("ExpectedValues", valuesVector));
}
}
if (ok) {
// Read comparators.
AnyType comparatorsArray = data.GetType("Comparators");
if (comparatorsArray.GetDataPointer() != NULL) {
uint32 count;
if (ok) {
count = comparatorsArray.GetNumberOfElements(0u);
ok = count == expectedValuesCount;
}
if (ok) {
comparators = new ComparisonMode[count];
StreamString* comp = new StreamString[count];
Vector<StreamString> compVector(comp, count);
ok = (data.Read("Comparators", compVector));
if (ok) {
for (uint32 i = 0; i < count; ++i) {
if (comp[i] == "EQUALS") {
comparators[i] = Equals;
} else if (comp[i] == "NOT") {
comparators[i] = Not;
} else if (comp[i] == "GREATER") {
comparators[i] = Greater;
} else if (comp[i] == "EQUALS_OR_GREATER") {
comparators[i] = EqualsOrGreater;
} else if (comp[i] == "LESS") {
comparators[i] = Less;
} else if (comp[i] == "EQUALS_OR_LESS") {
comparators[i] = EqualsOrLess;
} else {
ok = false;
REPORT_ERROR(ErrorManagement::ParametersError, "Comparator %s is not defined.", comp[i].Buffer());
}
}
}
delete[] comp;
} else {
REPORT_ERROR(ErrorManagement::ParametersError, "Expected values and operators shall have the same "
"number of elements.");
}
} else {
// Create default comparators (equals) when they aren't provided in the configuration.
comparators = new ComparisonMode[expectedValuesCount];
for (uint32 i = 0; i < expectedValuesCount; ++i) {
comparators[i] = Equals;
}
}
}
if (ok) {
MARTe::StreamString operationStr;
if (data.Read("Operation", operationStr)) {
if (operationStr == "AND") {
operation = And;
}
else if (operationStr == "OR") {
} else if (operationStr == "OR") {
operation = Or;
}
else if (operationStr == "NOR") {
} else if (operationStr == "NOR") {
operation = Nor;
}
else if (operationStr == "XOR") {
} else if (operationStr == "XOR") {
operation = Xor;
}
else {
} else {
ok = false;
REPORT_ERROR(ErrorManagement::ParametersError, "Operation %s is not defined", operationStr.Buffer());
REPORT_ERROR(ErrorManagement::ParametersError,
"Operation %s is not defined", operationStr.Buffer());
}
}
}
if (ok) {
// Read output signal values to be set.
AnyType valuesArray = data.GetType("Values");
ok = (valuesArray.GetDataPointer() != NULL);
ok = data.MoveRelative("InputSignals");
uint32 level = 0;
if (ok) {
valuesCount = valuesArray.GetNumberOfElements(0u);
ok = valuesCount > 0u;
}
if (ok) {
values = new uint32[valuesCount];
Vector<uint32> valuesVector(values, valuesCount);
ok = (data.Read("Values", valuesVector));
}
level++;
uint32 n_inputs = data.GetNumberOfChildren();
inputSignalTypes = new TypeDescriptor[n_inputs];
comparators = new comparator_t[n_inputs];
StreamString strbuff;
TypeDescriptor td;
for (uint32 i = 0; ok && i < n_inputs; i++) {
ok = data.MoveToChild(i);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "Values shall be defined.");
REPORT_ERROR(ErrorManagement::ParametersError,
"Impossible to move to InputSignals[%lu]", i);
break;
}
level++;
strbuff = "";
ok = data.Read("Type", strbuff);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError,
"Missing mandatory field Type from InputSignals[%lu]",
i);
break;
}
td = TypeDescriptor::GetTypeDescriptorFromTypeName(strbuff.Buffer());
ok = (td == UnsignedInteger8Bit) || (td == UnsignedInteger16Bit) ||
(td == UnsignedInteger32Bit);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError,
"Wrong value for field Type from InputSignals[%d]", i);
break;
}
inputSignalTypes[i] = td;
strbuff = "";
ok = data.Read("Comparator", strbuff);
if (!ok) {
REPORT_ERROR(
ErrorManagement::ParametersError,
"Missing mandatory field Comparator from InputSignals[%d]", i);
break;
}
ok = parse_comparator(strbuff, comparators[i].comparator);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError,
"Non Valid Comparator `%s` from InputSignals[%d]",
strbuff.Buffer(), i);
break;
}
ok = data.Read("Value", comparators[i].value);
if (!ok) {
REPORT_ERROR(
ErrorManagement::ParametersError,
"Missing field Value (expecting int) from InputSignals[%lu]", i);
break;
}
if (data.MoveToAncestor(1)) {
level--;
} else {
ok = false;
}
}
data.MoveToAncestor(level);
} else {
REPORT_ERROR(ErrorManagement::ParametersError,
"Impossible to move to InputSignals");
}
}
if (ok) {
ok = data.MoveRelative("OutputSignals");
uint32 level = 0;
if (ok) {
level++;
uint32 n_outputs = data.GetNumberOfChildren();
outputs = new output_t[n_outputs];
for (uint32 i = 0; ok && i < n_outputs; i++) {
ok = data.MoveToChild(i);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError,
"Impossible to move to InputSignals[%lu]", i);
break;
}
level++;
ok = data.Read("DefaultValue", outputs[i].defaultValue);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError,
"Impossible to read field DefaultValue for output %lu",
i);
break;
}
ok = data.Read("Value", outputs[i].value);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError,
"Impossible to read field Value for output %lu", i);
break;
}
ok = data.MoveToAncestor(1);
if (ok) {
level--;
}
}
data.MoveToAncestor(level);
} else {
REPORT_ERROR(ErrorManagement::ParametersError,
"Impossible to move to OutputSignals");
}
}
return ok;
@@ -184,115 +234,71 @@ bool JAConditionalSignalUpdateGAM::Initialise(MARTe::StructuredDataI & data) {
bool JAConditionalSignalUpdateGAM::Setup() {
using namespace MARTe;
bool ok = numberOfInputSignals == (expectedValuesCount + numberOfOutputSignals);
bool ok = numberOfInputSignals > 0;
if (ok) {
inputSignals = new void*[expectedValuesCount];
defaultValues = new uint32*[numberOfOutputSignals];
inputSignals = new void *[numberOfInputSignals];
uint32 i;
for (i = 0u; i < expectedValuesCount; i++) {
for (uint32 i = 0u; i < numberOfInputSignals; i++) {
inputSignals[i] = GetInputSignalMemory(i);
}
for (; i < numberOfInputSignals; i++) {
defaultValues[i - expectedValuesCount] = reinterpret_cast<uint32 *>(GetInputSignalMemory(i));
}
} else {
REPORT_ERROR(ErrorManagement::ParametersError, "Number of input signals shall be equal to number "
"of expected values plus number of output signals.");
REPORT_ERROR(ErrorManagement::ParametersError,
"Number of input signals shall be greater then 0 ");
}
if (ok) {
inputSignalTypes = new TypeDescriptor[expectedValuesCount];
uint32 i;
for (i = 0u; (i < expectedValuesCount) && (ok); i++) {
inputSignalTypes[i] = GetSignalType(InputSignals, i);
ok = ((inputSignalTypes[i] == UnsignedInteger32Bit) || (inputSignalTypes[i] == UnsignedInteger16Bit));
if (!ok) {
StreamString signalName;
(void) GetSignalName(InputSignals, i, signalName);
REPORT_ERROR(ErrorManagement::ParametersError, "Signal %s shall be defined as uint32 or uint16", signalName.Buffer());
}
}
}
if (ok) {
ok = numberOfOutputSignals == valuesCount;
if (ok) {
ok = numberOfOutputSignals > 0u;
if (ok) {
outputSignals = new uint32 *[numberOfOutputSignals];
uint32 i;
for (i = 0u; i < numberOfOutputSignals; i++) {
for (uint32 i = 0u; i < numberOfOutputSignals; i++) {
outputSignals[i] = reinterpret_cast<uint32 *>(GetOutputSignalMemory(i));
}
}
else {
REPORT_ERROR(ErrorManagement::ParametersError, "At least one output signal shall be defined");
}
}
else {
REPORT_ERROR(ErrorManagement::ParametersError, "Number of output signals shall be the same as "
"number of provided values.");
} else {
REPORT_ERROR(ErrorManagement::ParametersError,
"At least one output signal shall be defined");
}
}
return ok;
}
bool JAConditionalSignalUpdateGAM::PrepareNextState(const MARTe::char8 * const currentStateName, const MARTe::char8 * const nextStateName) {
bool JAConditionalSignalUpdateGAM::PrepareNextState(
const MARTe::char8 *const currentStateName,
const MARTe::char8 *const nextStateName) {
needsReset = false;
return true;
}
bool accumulate(JAConditionalSignalUpdateGAM::OperationMode mode, bool next,
bool current) {
switch (mode) {
case JAConditionalSignalUpdateGAM::Or:
return next || current;
case JAConditionalSignalUpdateGAM::And:
return next && current;
case JAConditionalSignalUpdateGAM::Nor:
return !(next || current);
case JAConditionalSignalUpdateGAM::Xor:
return (!next != !current);
}
return false;
}
bool JAConditionalSignalUpdateGAM::Execute() {
if (!needsReset) {
bool eventDetected = expectedValuesCount == 0;
if (!eventDetected) {
if (operation == Or) {
MARTe::uint32 j;
for (j = 0; (j < expectedValuesCount) && (!eventDetected); j++) {
eventDetected = Compare(j);
bool state = Compare(0);
for (MARTe::uint32 i = 1; i < numberOfInputSignals; i++) {
state = accumulate(operation, Compare(i), state);
}
}
else if (operation == Nor) {
MARTe::uint32 j;
for (j = 0; (j < expectedValuesCount) && (!eventDetected); j++) {
eventDetected = Compare(j);
}
eventDetected = !eventDetected;
}
else if (operation == And) {
MARTe::uint32 j;
eventDetected = Compare(0);
for (j = 1; (j < expectedValuesCount); j++) {
eventDetected &= Compare(j);
}
}
else if (operation == Xor) {
MARTe::uint32 j;
MARTe::uint32 eventDetectedUint32;
if (inputSignalTypes[0] == MARTe::UnsignedInteger32Bit) {
eventDetectedUint32 = *static_cast<MARTe::uint32 *>(inputSignals[0]);
}
else {
eventDetectedUint32 = *static_cast<MARTe::uint16 *>(inputSignals[0]);
}
for (j = 1; (j < expectedValuesCount); j++) {
eventDetectedUint32 ^= Compare(j);
}
eventDetected = (eventDetectedUint32 == 1u);
}
}
if (eventDetected) {
if (state) {
needsReset = true;
MARTe::uint32 i;
for (i = 0u; i < numberOfOutputSignals; ++i) {
*outputSignals[i] = values[i];
MARTe::StreamString signalName;
(void) GetSignalName(MARTe::OutputSignals, i, signalName);
for (i = 0u; i < numberOfOutputSignals; i++) {
*outputSignals[i] = outputs[i].value;
}
}
else {
} else {
MARTe::uint32 i;
for (i = 0u; i < numberOfOutputSignals; ++i) {
*outputSignals[i] = *defaultValues[i];
for (i = 0u; i < numberOfOutputSignals; i++) {
*outputSignals[i] = outputs[i].defaultValue;
}
}
}
@@ -303,6 +309,9 @@ bool JAConditionalSignalUpdateGAM::Compare(MARTe::uint32 index) {
if (inputSignalTypes[index] == MARTe::UnsignedInteger32Bit) {
return Compare<MARTe::uint32>(index);
}
if (inputSignalTypes[index] == MARTe::UnsignedInteger8Bit) {
return Compare<MARTe::uint8>(index);
}
return Compare<MARTe::uint16>(index);
}

View File

@@ -16,7 +16,8 @@
* basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the Licence permissions and limitations under the Licence.
* @details This header file contains the declaration of the class JAConditionalSignalUpdateGAM
* @details This header file contains the declaration of the class
JAConditionalSignalUpdateGAM
* with all of its public, protected and private members. It may also include
* definitions for inline methods which need to be visible to the compiler.
*/
@@ -31,6 +32,7 @@
/*---------------------------------------------------------------------------*/
/* Project header includes */
/*---------------------------------------------------------------------------*/
#include "Architecture/x86_gcc/CompilerTypes.h"
#include "GAM.h"
/*---------------------------------------------------------------------------*/
@@ -38,20 +40,24 @@
/*---------------------------------------------------------------------------*/
/**
* @brief GAM that writes predefined values to output signals when a condition is met.
* If there are no conditional signals provided, the condition is presumed to be met.
* @brief GAM that writes predefined values to output signals when a condition
* is met. If there are no conditional signals provided, the condition is
* presumed to be met.
*
* +ASYNCShotlengthControlGAM = {
* Class = JAConditionalSignalUpdateGAM
* Operation = OR // Logical operation performed between conditional signals
* Operation = OR // Logical operation performed between conditional
* signals
* // Supported values: AND, OR, XOR, NOR
* // Default: AND
* ExpectedValues = {1 1} // Values to which conditional signals will be compared.
* Comparators = {EQUALS EQUALS} // Operator between conditional signal an expected value
* // Supported values: EQUALS, NOT, GREATER, EQUALS_OR_GREATER, LESS, EQUALS_OR_LESS
* ExpectedValues = {1 1} // Values to which conditional signals will
* be compared. Comparators = {EQUALS EQUALS} // Operator between conditional
* signal an expected value
* // Supported values: EQUALS, NOT,
* GREATER, EQUALS_OR_GREATER, LESS, EQUALS_OR_LESS
* // Default: EQUALS
* Values = {0 3} // Values that will be written to output signals when condition is met.
* InputSignals = {
* Values = {0 3} // Values that will be written to output signals when
* condition is met. InputSignals = {
* // Conditional Signals
* SHOTLEN_FLAG = {
* DataSource = DDB1
@@ -61,15 +67,13 @@
* DataSource = DDB1
* Type = uint32
* }
* // Default values (set to output signals before the condition is met)
* APS_SWON = { // APS_SWON will keep the value from previous state.
* // Default values (set to output signals before the condition is
* met) APS_SWON = { // APS_SWON will keep the value from previous state.
* DataSource = DDB1
* Type = uint32
* }
* BPS_SWON_DEFAULT = { // BPS_SWON will be set to 7 before condition is met.
* DataSource = DDB1
* Type = uint32
* Default = 7
* BPS_SWON_DEFAULT = { // BPS_SWON will be set to 7 before
* condition is met. DataSource = DDB1 Type = uint32 Default = 7
* }
* }
* OutputSignals = {
@@ -84,7 +88,8 @@
* }
* }
*/
class JAConditionalSignalUpdateGAM : public MARTe::GAM, public MARTe::StatefulI {
class JAConditionalSignalUpdateGAM : public MARTe::GAM,
public MARTe::StatefulI {
public:
CLASS_REGISTER_DECLARATION()
@@ -101,6 +106,16 @@ public:
virtual bool PrepareNextState(const MARTe::char8 *const currentStateName,
const MARTe::char8 *const nextStateName);
enum ComparisonMode {
Equals,
Not,
Greater,
EqualsOrGreater,
Less,
EqualsOrLess
};
enum OperationMode { And, Or, Xor, Nor };
private:
/**
* @brief Does the input signal at provided index have the expected value.
@@ -109,71 +124,52 @@ private:
*/
bool Compare(MARTe::uint32 index);
template <class T>
bool Compare(MARTe::uint32 index);
enum OperationMode {
And, Or, Xor, Nor
};
enum ComparisonMode {
Equals, Not, Greater, EqualsOrGreater, Less, EqualsOrLess
};
template <class T> bool Compare(MARTe::uint32 index);
// Input signals
void **inputSignals;
MARTe::TypeDescriptor *inputSignalTypes;
struct comparator_t {
ComparisonMode comparator;
MARTe::uint32 value;
};
comparator_t *comparators;
// Condition operation.
OperationMode operation;
// Array of expected values of input signals.
MARTe::uint32* expectedValues;
// Expected values count (must be equal to numberOfInputSignals)
MARTe::uint32 expectedValuesCount;
// Array of comparators
ComparisonMode* comparators;
// Values to be written on output signals when input signal has the expected value.
MARTe::uint32 *values;
// Number of values (must be equal to numberOfOutputSignals)
MARTe::uint32 valuesCount;
// Output signals
MARTe::uint32 **outputSignals;
struct output_t {
MARTe::uint32 value;
MARTe::uint32 defaultValue;
};
output_t *outputs;
// Default values of output signals
MARTe::uint32 **defaultValues;
// Were output signals already set and we are waiting for a state change before they are set again.
// Were output signals already set and we are waiting for a state change
// before they are set again.
bool needsReset;
};
/*---------------------------------------------------------------------------*/
/* Inline method definitions */
/*---------------------------------------------------------------------------*/
template <class T>
bool JAConditionalSignalUpdateGAM::Compare(MARTe::uint32 index) {
switch (comparators[index]) {
switch (comparators[index].comparator) {
case Equals:
return *static_cast<T *>(inputSignals[index]) == static_cast<T>(expectedValues[index]);
return *(T*)(inputSignals[index]) == comparators[index].value;
case Not:
return *static_cast<T *>(inputSignals[index]) != static_cast<T>(expectedValues[index]);
return *(T *)(inputSignals[index]) != comparators[index].value;
case Greater:
return *static_cast<T *>(inputSignals[index]) > static_cast<T>(expectedValues[index]);
return *(T *)(inputSignals[index]) > comparators[index].value;
case EqualsOrGreater:
return *static_cast<T *>(inputSignals[index]) >= static_cast<T>(expectedValues[index]);
return *(T *)(inputSignals[index]) >= comparators[index].value;
case Less:
return *static_cast<T *>(inputSignals[index]) < static_cast<T>(expectedValues[index]);
return *(T *)(inputSignals[index]) < comparators[index].value;
default: // case EqualsOrLess:
return *static_cast<T *>(inputSignals[index]) <= static_cast<T>(expectedValues[index]);
return *(T *)(inputSignals[index]) <= comparators[index].value;
}
}

View File

@@ -29,8 +29,12 @@
/* Project header includes */
/*---------------------------------------------------------------------------*/
#include "AdvancedErrorManagement.h"
#include "Architecture/x86_gcc/CompilerTypes.h"
#include "ErrorType.h"
#include "JAMessageGAM.h"
#include "MessageI.h"
#include "StreamString.h"
#include "TypeDescriptor.h"
/*---------------------------------------------------------------------------*/
/* Static definitions */
@@ -41,7 +45,8 @@
/*---------------------------------------------------------------------------*/
template <class T, class U>
bool Compare(JAMessageGAM::ComparisonMode comparator, void *inputSignal, U expectedValue) {
bool Compare(JAMessageGAM::ComparisonMode comparator, void *inputSignal,
U expectedValue) {
switch (comparator) {
case JAMessageGAM::Equals:
return *static_cast<T *>(inputSignal) == expectedValue;
@@ -58,16 +63,53 @@ bool Compare(JAMessageGAM::ComparisonMode comparator, void *inputSignal, U expec
}
}
bool parse_comparator(const MARTe::StreamString &str,
JAMessageGAM::ComparisonMode &op) {
if (str == "EQUALS") {
op = JAMessageGAM::Equals;
return true;
}
if (str == "NOT") {
op = JAMessageGAM::Not;
return true;
}
if (str == "GREATER") {
op = JAMessageGAM::Greater;
return true;
}
if (str == "EQUALS_OR_GREATER") {
op = JAMessageGAM::EqualsOrGreater;
return true;
}
if (str == "LESS") {
op = JAMessageGAM::Less;
return true;
}
if (str == "EQUALS_OR_LESS") {
op = JAMessageGAM::EqualsOrLess;
return true;
}
return false;
}
bool is_int(const MARTe::TypeDescriptor &td) {
return (td == MARTe::UnsignedInteger32Bit) ||
(td == MARTe::SignedInteger32Bit) ||
(td == MARTe::UnsignedInteger16Bit) ||
(td == MARTe::SignedInteger16Bit) ||
(td == MARTe::UnsignedInteger8Bit) || (td == MARTe::SignedInteger8Bit);
}
bool is_float(const MARTe::TypeDescriptor &td) {
return (td == MARTe::Float32Bit) || (td == MARTe::Float64Bit);
}
JAMessageGAM::JAMessageGAM() {
inputSignals = NULL_PTR(void **);
inputSignalTypes = NULL_PTR(MARTe::TypeDescriptor *);
comparators = NULL_PTR(comparator_t *);
operation = And;
needsReset = false;
expectedValuesInt = NULL_PTR(MARTe::uint64 *);
expectedValuesFloat = NULL_PTR(MARTe::float64 *);
intValuesCount = 0u;
floatValuesCount = 0u;
comparators = NULL_PTR(ComparisonMode *);
}
JAMessageGAM::~JAMessageGAM() {
@@ -77,13 +119,7 @@ JAMessageGAM::~JAMessageGAM() {
if (inputSignalTypes != NULL_PTR(MARTe::TypeDescriptor *)) {
delete[] inputSignalTypes;
}
if (expectedValuesInt != NULL_PTR(MARTe::uint64 *)) {
delete[] expectedValuesInt;
}
if (expectedValuesFloat != NULL_PTR(MARTe::float64 *)) {
delete[] expectedValuesFloat;
}
if (comparators != NULL_PTR(ComparisonMode *)) {
if (comparators != NULL_PTR(comparator_t *)) {
delete[] comparators;
}
}
@@ -91,130 +127,113 @@ JAMessageGAM::~JAMessageGAM() {
bool JAMessageGAM::Initialise(MARTe::StructuredDataI &data) {
using namespace MARTe;
bool ok = GAM::Initialise(data);
if (ok) {
// Read expected integer values.
AnyType valuesArray = data.GetType("ExpectedIntValues");
bool intValuesProvided = (valuesArray.GetDataPointer() != NULL);
if (intValuesProvided) {
intValuesCount = valuesArray.GetNumberOfElements(0u);
}
if (intValuesProvided) {
expectedValuesInt = new uint64[intValuesCount];
Vector<uint64> valuesVector(expectedValuesInt, intValuesCount);
ok = (data.Read("ExpectedIntValues", valuesVector));
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "Failed to read ExpectedIntValues.");
return ok;
}
}
// Read expected float values.
valuesArray = data.GetType("ExpectedFloatValues");
bool floatValuesProvided = (valuesArray.GetDataPointer() != NULL);
if (floatValuesProvided) {
floatValuesCount = valuesArray.GetNumberOfElements(0u);
}
if (floatValuesProvided) {
expectedValuesFloat = new float64[floatValuesCount];
Vector<float64> valuesVector(expectedValuesFloat, floatValuesCount);
ok = (data.Read("ExpectedFloatValues", valuesVector));
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "Failed to read ExpectedFloatValues.");
return ok;
}
}
ok = (floatValuesCount + intValuesCount) > 0u;
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "ExpectedFloatValues and or ExpectedIntValues shall be defined.");
}
}
if (ok) {
// Read comparators.
AnyType comparatorsArray = data.GetType("Comparators");
if (comparatorsArray.GetDataPointer() != NULL) {
uint32 count = comparatorsArray.GetNumberOfElements(0u);
ok = count == (intValuesCount + floatValuesCount);
if (ok) {
comparators = new ComparisonMode[count];
StreamString* comp = new StreamString[count];
Vector<StreamString> compVector(comp, count);
ok = (data.Read("Comparators", compVector));
if (ok) {
for (uint32 i = 0; i < count; ++i) {
if (comp[i] == "EQUALS") {
comparators[i] = Equals;
} else if (comp[i] == "NOT") {
comparators[i] = Not;
} else if (comp[i] == "GREATER") {
comparators[i] = Greater;
} else if (comp[i] == "EQUALS_OR_GREATER") {
comparators[i] = EqualsOrGreater;
} else if (comp[i] == "LESS") {
comparators[i] = Less;
} else if (comp[i] == "EQUALS_OR_LESS") {
comparators[i] = EqualsOrLess;
} else {
ok = false;
REPORT_ERROR(ErrorManagement::ParametersError, "Comparator %s is not defined.", comp[i].Buffer());
}
}
}
} else {
REPORT_ERROR(ErrorManagement::ParametersError, "Expected values and operators shall have the same "
"number of elements.");
}
} else {
uint32 count = intValuesCount + floatValuesCount;
if (ok) {
// Create default comparators (equals) when they aren't provided in the configuration.
comparators = new ComparisonMode[count];
for (uint32 i = 0; i < count; ++i) {
comparators[i] = Equals;
}
} else {
REPORT_ERROR(ErrorManagement::ParametersError, "Expected values and operators shall have the same "
"number of elements.");
}
}
}
if (ok) {
MARTe::StreamString operationStr;
if (data.Read("Operation", operationStr)) {
if (operationStr == "AND") {
operation = And;
}
else if (operationStr == "OR") {
} else if (operationStr == "OR") {
operation = Or;
}
else if (operationStr == "NOR") {
} else if (operationStr == "NOR") {
operation = Nor;
}
else if (operationStr == "XOR") {
} else if (operationStr == "XOR") {
operation = Xor;
}
else {
} else {
ok = false;
REPORT_ERROR(ErrorManagement::ParametersError, "Operation %s is not defined", operationStr.Buffer());
REPORT_ERROR(ErrorManagement::ParametersError,
"Operation %s is not defined", operationStr.Buffer());
}
}
}
if (ok) {
ok = (Size() == 1);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "A Message object shall be added to this container");
REPORT_ERROR(ErrorManagement::ParametersError,
"A Message object shall be added to this container");
}
}
if (ok) {
eventMsg = Get(0);
ok = (eventMsg.IsValid());
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "A valid Message shall be added to this container");
REPORT_ERROR(ErrorManagement::ParametersError,
"A valid Message shall be added to this container");
}
}
if (ok) {
ok = data.MoveRelative("InputSignals");
uint32 level = 0;
if (ok) {
level++;
uint32 n_inputs = data.GetNumberOfChildren();
comparators = new comparator_t[n_inputs];
StreamString strbuffer;
TypeDescriptor td;
for (uint32 i = 0; ok && i < n_inputs; i++) {
ok = data.MoveToChild(i);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError,
"Impossible to move to InputSignals[%lu]", i);
break;
}
level++;
strbuffer = "";
ok = data.Read("Type", strbuffer);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError,
"Missing mandatory field Type from InputSignals[%lu]",
i);
break;
}
td = TypeDescriptor::GetTypeDescriptorFromTypeName(strbuffer.Buffer());
ok = (td != InvalidType) && (is_float(td) || is_int(td));
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError,
"Wrong value for field Type from InputSignals[%lu]", i);
break;
}
strbuffer = "";
ok = data.Read("Comparator", strbuffer);
if (!ok) {
REPORT_ERROR(
ErrorManagement::ParametersError,
"Missing mandatory field Comparator from InputSignals[%lu]", i);
break;
}
ok = parse_comparator(strbuffer, comparators[i].comparator);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError,
"Non Valid Comparator `%s` from InputSignals[%lu]",
strbuffer.Buffer(), i);
break;
}
if (is_int(td)) {
ok = data.Read("Value", comparators[i].value.i64);
if (!ok) {
REPORT_ERROR(
ErrorManagement::ParametersError,
"Missing field Value (expecting int) from InputSignals[%lu]",
i);
break;
}
} else {
ok = data.Read("Value", comparators[i].value.f64);
if (!ok) {
REPORT_ERROR(
ErrorManagement::ParametersError,
"Missing field Value (expecting float) from InputSignals[%lu]",
i);
break;
}
}
if (data.MoveToAncestor(1)) {
level--;
}
}
data.MoveToAncestor(level);
} else {
REPORT_ERROR(ErrorManagement::ParametersError,
"Impossible to move to InputSignals");
}
}
return ok;
@@ -222,22 +241,16 @@ bool JAMessageGAM::Initialise(MARTe::StructuredDataI & data) {
bool JAMessageGAM::Setup() {
using namespace MARTe;
bool ok = numberOfInputSignals == (intValuesCount + floatValuesCount);
if (ok) {
ok = numberOfInputSignals > 0u;
bool ok = numberOfInputSignals > 0u;
if (ok) {
inputSignals = new void *[numberOfInputSignals];
uint32 i;
for (i = 0u; i < numberOfInputSignals; i++) {
inputSignals[i] = GetInputSignalMemory(i);
}
}
else {
REPORT_ERROR(ErrorManagement::ParametersError, "At least one input signal shall be defined");
}
} else {
REPORT_ERROR(ErrorManagement::ParametersError, "Number of input signals shall be the same as "
"number of expected values.");
REPORT_ERROR(ErrorManagement::ParametersError,
"At least one input signal shall be defined");
}
if (ok) {
inputSignalTypes = new TypeDescriptor[numberOfInputSignals];
@@ -245,15 +258,21 @@ bool JAMessageGAM::Setup() {
for (i = 0u; (i < numberOfInputSignals) && (ok); i++) {
TypeDescriptor inputType = GetSignalType(InputSignals, i);
inputSignalTypes[i] = inputType;
ok = (inputType == UnsignedInteger32Bit) || (inputType == SignedInteger32Bit) ||
(inputType == UnsignedInteger16Bit) || (inputType == SignedInteger16Bit) ||
(inputType == UnsignedInteger8Bit) || (inputType == SignedInteger8Bit) ||
(inputType == Float64Bit) || (inputType == Float32Bit);
ok = (inputType == UnsignedInteger32Bit) ||
(inputType == SignedInteger32Bit) ||
(inputType == UnsignedInteger16Bit) ||
(inputType == SignedInteger16Bit) ||
(inputType == UnsignedInteger8Bit) ||
(inputType == SignedInteger8Bit) || (inputType == Float64Bit) ||
(inputType == Float32Bit);
if (!ok) {
StreamString signalName;
(void)GetSignalName(InputSignals, i, signalName);
REPORT_ERROR(ErrorManagement::ParametersError, "Signal %s shall be defined as 32/16/8 bit signed/unsigned integer "
"or as 64/32 float.", signalName.Buffer());
REPORT_ERROR(ErrorManagement::ParametersError,
"Signal %s shall be defined as 32/16/8 bit "
"signed/unsigned integer "
"or as 64/32 float.",
signalName.Buffer());
}
}
}
@@ -261,7 +280,8 @@ bool JAMessageGAM::Setup() {
return ok;
}
bool JAMessageGAM::PrepareNextState(const MARTe::char8 * const currentStateName, const MARTe::char8 * const nextStateName) {
bool JAMessageGAM::PrepareNextState(const MARTe::char8 *const currentStateName,
const MARTe::char8 *const nextStateName) {
needsReset = false;
return true;
}
@@ -274,25 +294,28 @@ bool JAMessageGAM::Execute() {
uint32 intIndex = 0;
uint32 floatIndex = 0;
if (operation == Or) {
for (inputPortIndex = 0; (inputPortIndex < numberOfInputSignals) && (!eventDetected); inputPortIndex++) {
for (inputPortIndex = 0;
(inputPortIndex < numberOfInputSignals) && (!eventDetected);
inputPortIndex++) {
eventDetected = Compare(inputPortIndex, floatIndex, intIndex);
}
}
else if (operation == Nor) {
for (inputPortIndex = 0; (inputPortIndex < numberOfInputSignals) && (!eventDetected); inputPortIndex++) {
} else if (operation == Nor) {
for (inputPortIndex = 0;
(inputPortIndex < numberOfInputSignals) && (!eventDetected);
inputPortIndex++) {
eventDetected = Compare(inputPortIndex, floatIndex, intIndex);
}
eventDetected = !eventDetected;
}
else if (operation == And) {
} else if (operation == And) {
eventDetected = Compare(0, floatIndex, intIndex);
for (inputPortIndex = 1; (inputPortIndex < numberOfInputSignals); inputPortIndex++) {
for (inputPortIndex = 1; (inputPortIndex < numberOfInputSignals);
inputPortIndex++) {
eventDetected &= Compare(inputPortIndex, floatIndex, intIndex);
}
}
else if (operation == Xor) {
} else if (operation == Xor) {
uint32 eventDetectedUInt32 = Compare(inputPortIndex, floatIndex, intIndex);
for (inputPortIndex = 1; (inputPortIndex < numberOfInputSignals); inputPortIndex++) {
for (inputPortIndex = 1; (inputPortIndex < numberOfInputSignals);
inputPortIndex++) {
eventDetectedUInt32 ^= Compare(inputPortIndex, floatIndex, intIndex);
}
eventDetected = (eventDetectedUInt32 == 1u);
@@ -306,39 +329,50 @@ bool JAMessageGAM::Execute() {
return ok;
}
bool JAMessageGAM::Compare(MARTe::uint32 inputPortIndex, MARTe::uint32 &floatValueIndex, MARTe::uint32 &intValueIndex) {
bool JAMessageGAM::Compare(MARTe::uint32 inputPortIndex,
MARTe::uint32 &floatValueIndex,
MARTe::uint32 &intValueIndex) {
using namespace MARTe;
bool ret = false;
if (inputSignalTypes[inputPortIndex] == UnsignedInteger32Bit) {
ret = ::Compare<uint32>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesInt[intValueIndex]);
ret = ::Compare<uint32>(comparators[inputPortIndex].comparator,
inputSignals[inputPortIndex],
comparators[inputPortIndex].value.i64);
++intValueIndex;
}
else if (inputSignalTypes[inputPortIndex] == SignedInteger32Bit) {
ret = ::Compare<int32>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesInt[intValueIndex]);
} else if (inputSignalTypes[inputPortIndex] == SignedInteger32Bit) {
ret = ::Compare<int32>(comparators[inputPortIndex].comparator,
inputSignals[inputPortIndex],
comparators[inputPortIndex].value.i64);
++intValueIndex;
}
else if (inputSignalTypes[inputPortIndex] == UnsignedInteger16Bit) {
ret = ::Compare<uint16>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesInt[intValueIndex]);
} else if (inputSignalTypes[inputPortIndex] == UnsignedInteger16Bit) {
ret = ::Compare<uint16>(comparators[inputPortIndex].comparator,
inputSignals[inputPortIndex],
comparators[inputPortIndex].value.i64);
++intValueIndex;
}
else if (inputSignalTypes[inputPortIndex] == SignedInteger16Bit) {
ret = ::Compare<int16>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesInt[intValueIndex]);
} else if (inputSignalTypes[inputPortIndex] == SignedInteger16Bit) {
ret = ::Compare<int16>(comparators[inputPortIndex].comparator,
inputSignals[inputPortIndex],
comparators[inputPortIndex].value.i64);
++intValueIndex;
}
else if (inputSignalTypes[inputPortIndex] == UnsignedInteger8Bit) {
ret = ::Compare<uint8>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesInt[intValueIndex]);
} else if (inputSignalTypes[inputPortIndex] == UnsignedInteger8Bit) {
ret = ::Compare<uint8>(comparators[inputPortIndex].comparator,
inputSignals[inputPortIndex],
comparators[inputPortIndex].value.i64);
++intValueIndex;
}
else if (inputSignalTypes[inputPortIndex] == SignedInteger8Bit) {
ret = ::Compare<int8>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesInt[intValueIndex]);
} else if (inputSignalTypes[inputPortIndex] == SignedInteger8Bit) {
ret = ::Compare<int8>(comparators[inputPortIndex].comparator,
inputSignals[inputPortIndex],
comparators[inputPortIndex].value.i64);
++intValueIndex;
}
else if (inputSignalTypes[inputPortIndex] == Float64Bit) {
ret = ::Compare<float64>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesFloat[floatValueIndex]);
} else if (inputSignalTypes[inputPortIndex] == Float64Bit) {
ret = ::Compare<float64>(comparators[inputPortIndex].comparator,
inputSignals[inputPortIndex],
comparators[inputPortIndex].value.f64);
++floatValueIndex;
}
else {
ret = ::Compare<float32>(comparators[inputPortIndex], inputSignals[inputPortIndex], expectedValuesFloat[floatValueIndex]);
} else {
ret = ::Compare<float32>(comparators[inputPortIndex].comparator,
inputSignals[inputPortIndex],
comparators[inputPortIndex].value.f64);
++floatValueIndex;
}
return ret;

View File

@@ -32,6 +32,7 @@
/* Project header includes */
/*---------------------------------------------------------------------------*/
#include "Architecture/x86_gcc/CompilerTypes.h"
#include "GAM.h"
#include "Message.h"
@@ -48,22 +49,23 @@
* +MessageGAM = {
* Class = JAMessageGAM
* Operation = AND // Accepted values are: AND, OR, XOR, NOR. Default value is AND.
* ExpectedIntValues = {1 10} // Expected values for input signals of integral type.
* ExpectedFloatValues = {3.5} // Expected values for float signals of floting point type.
* Comparators = {EQUALS GREATER NOT} // Accepted values are: EQUALS, NOT, GREATER, EQUALS_OR_GREATER, LESS, EQUALS_OR_LESS
* // Comparators element is optional. Default comparator is EQUALS.
* InputSignals = {
* Sig1 = {
* DataSource = EPICSCAInput
* Type = uint32
* Comparator = "EQUALS" | "GREATER" | "NOT" | "EQUALS_OR_GREATER" | "LESS" | "EQUALS_OR_LESS"
* ExpectedValue = 1
* }
* Sig2 = {
* DataSource = EPICSCAInput
* Type = float32
* Comparator = "EQUALS" | "GREATER" | "NOT" | "EQUALS_OR_GREATER" | "LESS" | "EQUALS_OR_LESS"
* ExpectedValue = 3.5
* }
* Sig3 = {
* DataSource = EPICSCAInput
* Type = uint32
* Comparator = "EQUALS" | "GREATER" | "NOT" | "EQUALS_OR_GREATER" | "LESS" | "EQUALS_OR_LESS"
* }
* }
* +Event = { // Message to be sent when condition is true.
@@ -113,6 +115,17 @@ private:
// Input signals
void **inputSignals;
struct comparator_t {
ComparisonMode comparator;
union {
MARTe::int64 i64;
MARTe::float64 f64;
} value;
};
comparator_t * comparators;
MARTe::TypeDescriptor *inputSignalTypes;
// Condition operation.
@@ -123,21 +136,6 @@ private:
// Was the message already sent and we are waiting for a state change before next message can be sent.
bool needsReset;
// Array of expected integer values of input signals.
MARTe::uint64* expectedValuesInt;
// Array of expected float values for input signals.
MARTe::float64* expectedValuesFloat;
// Expected integer values count (must be equal to numberOfInputSignals - floatValuesCount)
MARTe::uint32 intValuesCount;
// Expected integer values count (must be equal to numberOfInputSignals - floatValuesCount)
MARTe::uint32 floatValuesCount;
// Array of comparators
ComparisonMode* comparators;
};

View File

@@ -53,7 +53,7 @@ JAPreProgrammedGAM::JAPreProgrammedGAM() :
timeSignal = NULL_PTR(MARTe::int32 *);
loadTriggerSignal = NULL_PTR(MARTe::uint32 *);
fhpsrefSignal = NULL_PTR(MARTe::float32 *);
rfonStateSignal = NULL_PTR(MARTe::uint32 *);
rfonStateSignal = NULL_PTR(MARTe::uint8 *);
valueSignals = NULL_PTR(MARTe::float32 **);
preProgrammedValues = NULL_PTR(MARTe::float32 **);
@@ -178,13 +178,13 @@ bool JAPreProgrammedGAM::Setup() {
}
else {
TypeDescriptor inputType = GetSignalType(InputSignals, rfonIndex);
ok = (inputType == UnsignedInteger32Bit);
ok = (inputType == UnsignedInteger8Bit);
if (!ok) {
StreamString signalName;
(void) GetSignalName(InputSignals, rfonIndex, signalName);
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "Signal %s shall be defined as float32", signalName.Buffer());
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "Signal %s shall be defined as uint8", signalName.Buffer());
} else {
rfonStateSignal = reinterpret_cast<uint32 *>(GetInputSignalMemory(rfonIndex));
rfonStateSignal = reinterpret_cast<uint8 *>(GetInputSignalMemory(rfonIndex));
}
}
}

View File

@@ -138,7 +138,7 @@ private:
MARTe::uint32 *loadTriggerSignal; //index:0
MARTe::uint32 filenameSignalIndex;//index:1
MARTe::float32 *fhpsrefSignal; //index:2
MARTe::uint32 *rfonStateSignal; //index:3
MARTe::uint8 *rfonStateSignal; //index:3
//Output Signals
MARTe::int32 *timeSignal; //index:0

View File

@@ -32,6 +32,7 @@
#include "JARTStateMachineGAM.h"
#include "AdvancedErrorManagement.h"
#include "TypeDescriptor.h"
/*---------------------------------------------------------------------------*/
/* Static definitions */
@@ -57,7 +58,7 @@ JARTStateMachineGAM::JARTStateMachineGAM() {
mhvps_hvon = 0;
// Parameters which get from Input signals.
triggerSignal = NULL_PTR(MARTe::uint32 *);
triggerSignal = NULL_PTR(MARTe::uint8 *);
currentTime = NULL_PTR(MARTe::uint32 *);
turn_off_delay = 2000; //us
@@ -68,18 +69,18 @@ JARTStateMachineGAM::JARTStateMachineGAM() {
triggerDelay_bps_swon = NULL_PTR(MARTe::uint32 *);
triggerDelay_shotlen = NULL_PTR(MARTe::uint32 *);
stopRequest = NULL_PTR(MARTe::uint32 *);
stopRequest = NULL_PTR(MARTe::uint8 *);
modePulseLengthLimit = NULL_PTR(MARTe::uint32 *);
short_pulse_mode = NULL_PTR(MARTe::uint32 *);
modulation = NULL_PTR(MARTe::uint32 *);
modulation = NULL_PTR(MARTe::uint8 *);
// write out target.
outputSignal = NULL_PTR(MARTe::uint32 *);
outputBeamON = NULL_PTR(MARTe::uint32 *);
outputHVArmed = NULL_PTR(MARTe::uint32 *);
outputHVInjection = NULL_PTR(MARTe::uint32 *);
outputRFON = NULL_PTR(MARTe::uint32 *);
outputBeamON = NULL_PTR(MARTe::uint8 *);
outputHVArmed = NULL_PTR(MARTe::uint8*);
outputHVInjection = NULL_PTR(MARTe::uint8 *);
outputRFON = NULL_PTR(MARTe::uint8 *);
outputBeamONTime = NULL_PTR(MARTe::uint32 *);
outputRFONTime = NULL_PTR(MARTe::uint32 *);
shotCounter = NULL_PTR(MARTe::uint32 *);
@@ -153,9 +154,9 @@ bool JARTStateMachineGAM::Setup() {
using namespace MARTe;
bool ok = (numberOfInputSignals == 13u);
if (ok) {
ok = (numberOfOutputSignals == 16u);
ok = (numberOfOutputSignals == 14u);
if (!ok) {
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "Seven output signals shall be defined %d",numberOfOutputSignals);
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "14 output signals shall be defined %d",numberOfOutputSignals);
}
}
else {
@@ -165,7 +166,7 @@ bool JARTStateMachineGAM::Setup() {
uint32 c;
for (c = 0u; c < numberOfInputSignals; c++) {
TypeDescriptor inputType = GetSignalType(InputSignals, c);
ok = (inputType == UnsignedInteger32Bit);
ok = (inputType == UnsignedInteger32Bit || inputType == UnsignedInteger8Bit);
if (!ok) {
StreamString signalName;
(void) GetSignalName(InputSignals, c, signalName);
@@ -181,45 +182,43 @@ bool JARTStateMachineGAM::Setup() {
ok = (outputType == UnsignedInteger32Bit || outputType == UnsignedInteger8Bit);
if (!ok) {
StreamString signalName;
(void) GetSignalName(InputSignals, c, signalName);
(void) GetSignalName(OutputSignals, c, signalName);
REPORT_ERROR(MARTe::ErrorManagement::ParametersError, "Signal %s shall be defined as uint32", signalName.Buffer());
}
}
}
if (ok) {
currentTime = reinterpret_cast<uint32 *>(GetInputSignalMemory(0));
triggerSignal = reinterpret_cast<uint32 *>(GetInputSignalMemory(1));
triggerSignal = reinterpret_cast<uint8 *>(GetInputSignalMemory(1));
triggerDelay_mhvps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(2));
triggerDelay_aps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(3));
triggerDelay_aps_swon = reinterpret_cast<uint32 *>(GetInputSignalMemory(4));
triggerDelay_bps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(5));
triggerDelay_bps_swon = reinterpret_cast<uint32 *>(GetInputSignalMemory(6));
triggerDelay_shotlen = reinterpret_cast<uint32 *>(GetInputSignalMemory(7));
stopRequest = reinterpret_cast<uint32 *>(GetInputSignalMemory(8));
stopRequest = reinterpret_cast<uint8 *>(GetInputSignalMemory(8));
modePulseLengthLimit = reinterpret_cast<uint32 *>(GetInputSignalMemory(9));
short_pulse_mode = reinterpret_cast<uint32 *>(GetInputSignalMemory(10));
modulation = reinterpret_cast<uint32 *>(GetInputSignalMemory(11));
pauseSet = reinterpret_cast<uint32 *>(GetInputSignalMemory(12));
modulation = reinterpret_cast<uint8 *>(GetInputSignalMemory(11));
pauseSet = reinterpret_cast<uint8 *>(GetInputSignalMemory(12));
outputSignal = reinterpret_cast<uint32 *>(GetOutputSignalMemory(0));
outputBeamON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(1));
outputHVArmed = reinterpret_cast<uint32 *>(GetOutputSignalMemory(2));
outputHVInjection = reinterpret_cast<uint32 *>(GetOutputSignalMemory(3));
outputRFON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(4));
outputBeamON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(1));
outputHVArmed = reinterpret_cast<uint8 *>(GetOutputSignalMemory(2));
outputHVInjection = reinterpret_cast<uint8 *>(GetOutputSignalMemory(3));
outputRFON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(4));
outputBeamONTime = reinterpret_cast<uint32 *>(GetOutputSignalMemory(5));
outputRFONTime = reinterpret_cast<uint32 *>(GetOutputSignalMemory(6));
shotCounter = reinterpret_cast<uint32 *>(GetOutputSignalMemory(7));
outputAPSHVON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(8));
outputAPSSWON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(9));
outputBPSHVON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(10));
outputBPSSWON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(11));
outputMHVPSON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(12));
outputAPSHVON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(8));
outputAPSSWON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(9));
outputBPSHVON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(10));
outputBPSSWON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(11));
outputMHVPSON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(12));
outputSignalNI6259 = reinterpret_cast<uint32 *>(GetOutputSignalMemory(13));
outputSignalNI6528P3 = reinterpret_cast<uint8 *>(GetOutputSignalMemory(14));
outputSignalNI6528P4 = reinterpret_cast<uint8 *>(GetOutputSignalMemory(15));
*shotCounter = 0;
}
@@ -389,20 +388,9 @@ bool JARTStateMachineGAM::Execute() {
}
}
if(*short_pulse_mode == 1){
p3Value = 1*aps_hvon_state + 8*bps_hvon_state +16*bps_swon_state + 64*(*outputBeamON);
*outputSignalNI6259 = 1*aps_swon_state;
*outputSignalNI6528P3 = ~p3Value;
//REPORT_ERROR(ErrorManagement::Debug, "short pulse mode with p3: %d.", p3Value);
} else {
p3Value = 1*aps_hvon_state +2*aps_swon_state + 8*bps_hvon_state +16*bps_swon_state + 64*(*outputBeamON);
*outputSignalNI6528P3 = ~p3Value;
//REPORT_ERROR(ErrorManagement::Debug, "long pulse mode with p3: %d.", p3Value);
p3Value = aps_hvon_state + 8*bps_hvon_state +16*bps_swon_state + 64*(*outputBeamON);
*outputSignalNI6259 = aps_swon_state;
}
p4Value = 8*mhvps_hvon_state;
if (modulation) p4Value += 32;
if (pauseSet) p4Value += 1;
//*outputSignalNI6528P4 = ~(*ni6528p4Value | p4Value);
*outputSignalNI6528P4 = ~p4Value;
return true;
}

View File

@@ -32,6 +32,7 @@
/* Project header includes */
/*---------------------------------------------------------------------------*/
#include "Architecture/x86_gcc/CompilerTypes.h"
#include "GAM.h"
/*---------------------------------------------------------------------------*/
@@ -174,7 +175,7 @@ private:
MARTe::uint32 bps_swon;
//The trigger signal (PLC_ON)
MARTe::uint32 *triggerSignal;
MARTe::uint8 *triggerSignal;
//Time signal
MARTe::uint32 *currentTime;
@@ -188,24 +189,24 @@ private:
MARTe::uint32 *triggerDelay_shotlen;
// Input signal for sequence stop request.
MARTe::uint32 *stopRequest;
MARTe::uint8 *stopRequest;
// Input signal for pulse length limit by mode.
MARTe::uint32 *modePulseLengthLimit;
// Input signal for short pulse mode.
MARTe::uint32 *short_pulse_mode;
// Input signal for modulation pv.
MARTe::uint32 *modulation;
MARTe::uint8 *modulation;
// Input signal for pause signal set pv.
MARTe::uint32 *pauseSet;
MARTe::uint8 *pauseSet;
// Output signal to which the output value will be written.
// One state write One signal.
MARTe::uint32 *outputSignal;
// state notify output
MARTe::uint32 *outputBeamON;
MARTe::uint32 *outputHVArmed;
MARTe::uint32 *outputHVInjection;
MARTe::uint32 *outputRFON;
MARTe::uint8 *outputBeamON;
MARTe::uint8 *outputHVArmed;
MARTe::uint8 *outputHVInjection;
MARTe::uint8 *outputRFON;
// elapsed time notify output;
MARTe::uint32 *outputBeamONTime;
MARTe::uint32 *outputRFONTime;
@@ -213,16 +214,14 @@ private:
MARTe::uint32 *shotCounter;
// Added for HVPS state (20201117)
MARTe::uint32 *outputAPSHVON;
MARTe::uint32 *outputAPSSWON;
MARTe::uint32 *outputBPSHVON;
MARTe::uint32 *outputBPSSWON;
MARTe::uint32 *outputMHVPSON;
MARTe::uint8 *outputAPSHVON;
MARTe::uint8 *outputAPSSWON;
MARTe::uint8 *outputBPSHVON;
MARTe::uint8 *outputBPSSWON;
MARTe::uint8 *outputMHVPSON;
// Output signals for NI devices
MARTe::uint32 *outputSignalNI6259;
MARTe::uint8 *outputSignalNI6528P3;
MARTe::uint8 *outputSignalNI6528P4;
//////////////////////////////
//Internal Parameters
@@ -246,7 +245,6 @@ private:
// terminal values
MARTe::uint8 p3Value;
MARTe::uint8 p4Value;
MARTe::uint8 aps_hvon_state;
MARTe::uint8 aps_swon_state;
MARTe::uint8 mhvps_hvon_state;

View File

@@ -41,11 +41,10 @@
/*---------------------------------------------------------------------------*/
JARampupGAM::JARampupGAM() : GAM() {
current_setpoint = NULL_PTR(MARTe::float32 *);
target_value = NULL_PTR(MARTe::float32 *);
rampup_time = NULL_PTR(MARTe::float32 *);
start = NULL_PTR(MARTe::uint32 *);
standby = NULL_PTR(MARTe::uint32 *);
standby = NULL_PTR(MARTe::uint8 *);
isAuto = NULL_PTR(MARTe::uint32 *);
FHPS_PrePro = NULL_PTR(MARTe::float32 *);
@@ -59,8 +58,7 @@ JARampupGAM::JARampupGAM() : GAM() {
inWaitStandby = false;
}
JARampupGAM::~JARampupGAM() {
}
JARampupGAM::~JARampupGAM() {}
bool JARampupGAM::Initialise(MARTe::StructuredDataI &data) {
using namespace MARTe;
@@ -69,15 +67,16 @@ bool JARampupGAM::Initialise(MARTe::StructuredDataI & data) {
bool JARampupGAM::Setup() {
using namespace MARTe;
bool ok = (numberOfInputSignals == 7u);
bool ok = (numberOfInputSignals == 6u);
if (ok) {
ok = (numberOfOutputSignals == 2u);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "Two output signals shall be defined.");
REPORT_ERROR(ErrorManagement::ParametersError,
"Two output signals shall be defined.");
}
}
else {
REPORT_ERROR(ErrorManagement::ParametersError, "Six input signals shall be defined.");
} else {
REPORT_ERROR(ErrorManagement::ParametersError,
"Six input signals shall be defined.");
}
uint32 currentspvIndex;
uint32 targetvIndex;
@@ -87,31 +86,18 @@ bool JARampupGAM::Setup() {
uint32 isAutoIndex;
uint32 fhpsPreProIndex;
if (ok) {
StreamString signalName = "Currspv";
ok = GetSignalIndex(InputSignals, currentspvIndex, signalName.Buffer());
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "Currspv input signal shall be defined.");
}
else {
TypeDescriptor inputType = GetSignalType(InputSignals, currentspvIndex);
ok = (inputType == Float32Bit);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "Signal Currspv shall be defined as float32.");
}
}
}
if (ok) {
StreamString signalName = "Targetv";
ok = GetSignalIndex(InputSignals, targetvIndex, signalName.Buffer());
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "Targetv input signal shall be defined.");
}
else {
REPORT_ERROR(ErrorManagement::ParametersError,
"Targetv input signal shall be defined.");
} else {
TypeDescriptor inputType = GetSignalType(InputSignals, targetvIndex);
ok = (inputType == Float32Bit);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "Signal Targetv shall be defined as float32.");
REPORT_ERROR(ErrorManagement::ParametersError,
"Signal Targetv shall be defined as float32.");
}
}
}
@@ -119,13 +105,14 @@ bool JARampupGAM::Setup() {
StreamString signalName = "Time";
ok = GetSignalIndex(InputSignals, timeIndex, signalName.Buffer());
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "Time input signal shall be defined.");
}
else {
REPORT_ERROR(ErrorManagement::ParametersError,
"Time input signal shall be defined.");
} else {
TypeDescriptor inputType = GetSignalType(InputSignals, timeIndex);
ok = (inputType == Float32Bit);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "Signal Time shall be defined as float32.");
REPORT_ERROR(ErrorManagement::ParametersError,
"Signal Time shall be defined as float32.");
}
}
}
@@ -133,13 +120,14 @@ bool JARampupGAM::Setup() {
StreamString signalName = "Start";
ok = GetSignalIndex(InputSignals, startIndex, signalName.Buffer());
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "Start input signal shall be defined.");
}
else {
REPORT_ERROR(ErrorManagement::ParametersError,
"Start input signal shall be defined.");
} else {
TypeDescriptor inputType = GetSignalType(InputSignals, startIndex);
ok = (inputType == UnsignedInteger32Bit);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "Start shall be defined as uint32.");
REPORT_ERROR(ErrorManagement::ParametersError,
"Start shall be defined as uint32.");
}
}
}
@@ -147,13 +135,14 @@ bool JARampupGAM::Setup() {
StreamString signalName = "PLC_STANDBY";
ok = GetSignalIndex(InputSignals, standbyIndex, signalName.Buffer());
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "PLC_STANDBY input signal shall be defined.");
}
else {
REPORT_ERROR(ErrorManagement::ParametersError,
"PLC_STANDBY input signal shall be defined.");
} else {
TypeDescriptor inputType = GetSignalType(InputSignals, standbyIndex);
ok = (inputType == UnsignedInteger32Bit);
ok = (inputType == UnsignedInteger8Bit);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "PLC_STANDBY shall be defined as uint32.");
REPORT_ERROR(ErrorManagement::ParametersError,
"PLC_STANDBY shall be defined as uint8.");
}
}
}
@@ -161,13 +150,14 @@ bool JARampupGAM::Setup() {
StreamString signalName = "MANUAL_AUTO";
ok = GetSignalIndex(InputSignals, isAutoIndex, signalName.Buffer());
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "MANUAL_AUTO input signal shall be defined.");
}
else {
REPORT_ERROR(ErrorManagement::ParametersError,
"MANUAL_AUTO input signal shall be defined.");
} else {
TypeDescriptor inputType = GetSignalType(InputSignals, isAutoIndex);
ok = (inputType == UnsignedInteger32Bit);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "MANUAL_AUTO shall be defined as uint32.");
REPORT_ERROR(ErrorManagement::ParametersError,
"MANUAL_AUTO shall be defined as uint32.");
}
}
}
@@ -175,13 +165,14 @@ bool JARampupGAM::Setup() {
StreamString signalName = "FHPS_PrePro";
ok = GetSignalIndex(InputSignals, fhpsPreProIndex, signalName.Buffer());
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "FHPS_PrePro input signal shall be defined.");
}
else {
REPORT_ERROR(ErrorManagement::ParametersError,
"FHPS_PrePro input signal shall be defined.");
} else {
TypeDescriptor inputType = GetSignalType(InputSignals, fhpsPreProIndex);
ok = (inputType == Float32Bit);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "Signal FHPS_PrePro shall be defined as float32.");
REPORT_ERROR(ErrorManagement::ParametersError,
"Signal FHPS_PrePro shall be defined as float32.");
}
}
}
@@ -190,25 +181,28 @@ bool JARampupGAM::Setup() {
TypeDescriptor inputType = GetSignalType(OutputSignals, 0);
ok = (inputType == Float32Bit);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "Signal Output shall be defined as float32.");
REPORT_ERROR(ErrorManagement::ParametersError,
"Signal Output shall be defined as float32.");
}
}
if (ok) {
TypeDescriptor inputType = GetSignalType(OutputSignals, 1);
ok = (inputType == UnsignedInteger32Bit);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "Signal state shall be defined as float32.");
REPORT_ERROR(ErrorManagement::ParametersError,
"Signal state shall be defined as float32.");
}
}
if (ok) {
current_setpoint = reinterpret_cast<float32 *>(GetInputSignalMemory(currentspvIndex));
target_value = reinterpret_cast<float32 *>(GetInputSignalMemory(targetvIndex));
target_value =
reinterpret_cast<float32 *>(GetInputSignalMemory(targetvIndex));
rampup_time = reinterpret_cast<float32 *>(GetInputSignalMemory(timeIndex));
start = reinterpret_cast<uint32 *>(GetInputSignalMemory(startIndex));
standby = reinterpret_cast<uint32 *>(GetInputSignalMemory(standbyIndex));
standby = reinterpret_cast<uint8 *>(GetInputSignalMemory(standbyIndex));
isAuto = reinterpret_cast<uint32 *>(GetInputSignalMemory(isAutoIndex));
FHPS_PrePro = reinterpret_cast<float32 *>(GetInputSignalMemory(fhpsPreProIndex));
FHPS_PrePro =
reinterpret_cast<float32 *>(GetInputSignalMemory(fhpsPreProIndex));
output = reinterpret_cast<float32 *>(GetOutputSignalMemory(0));
state = reinterpret_cast<uint32 *>(GetOutputSignalMemory(1));
@@ -216,9 +210,12 @@ bool JARampupGAM::Setup() {
return ok;
}
bool JARampupGAM::PrepareNextState(const MARTe::char8 * const currentStateName, const MARTe::char8 * const nextStateName){
if(strcmp(nextStateName, "WaitHVON_PREP")==0 || strcmp(nextStateName, "WaitHVON_SDN_PREP")==0 ||
strcmp(nextStateName, "WaitHVON")==0 || strcmp(nextStateName, "WaitHVON_SDN")==0){
bool JARampupGAM::PrepareNextState(const MARTe::char8 *const currentStateName,
const MARTe::char8 *const nextStateName) {
if (strcmp(nextStateName, "WaitHVON_PREP") == 0 ||
strcmp(nextStateName, "WaitHVON_SDN_PREP") == 0 ||
strcmp(nextStateName, "WaitHVON") == 0 ||
strcmp(nextStateName, "WaitHVON_SDN") == 0) {
inWaitHVON = true;
inWaitStandby = false;
} else {
@@ -234,6 +231,7 @@ bool JARampupGAM::PrepareNextState(const MARTe::char8 * const currentStateName,
bool JARampupGAM::Execute() {
using namespace MARTe;
float32 current_setpoint = *output;
if (!inWaitHVON) {
if (*target_value <= 0.0f || *standby == 0u) {
*output = 0.0f;
@@ -254,7 +252,8 @@ bool JARampupGAM::Execute() {
// Calcrate new rampup rate.
if (*rampup_time != 0 && resetFlag == true) {
rampup_rate = (*target_value - *current_setpoint) / *rampup_time/1000.0f; // Volt/msec
rampup_rate = (*target_value - current_setpoint) / *rampup_time /
1000.0f; // Volt/msec
resetFlag = false;
}
@@ -269,8 +268,7 @@ bool JARampupGAM::Execute() {
//*output = *target_value;
*state = 0u;
return true;
}
else if (inRampup){
} else if (inRampup) {
if (*output + rampup_rate < *target_value && *rampup_time != 0) {
*output = *output + rampup_rate;
*state = 1u;

View File

@@ -97,8 +97,6 @@ public:
const MARTe::char8 * const nextStateName);
private:
// Input signal containing current current_setpoint
MARTe::float32 *current_setpoint;
// Input signal containing the frequency of the waveform.
MARTe::float32 *target_value;
@@ -110,7 +108,7 @@ private:
MARTe::uint32 *start;
// Input signal PLC_STANDBY
MARTe::uint32 *standby;
MARTe::uint8 *standby;
// MANUAL AUTO button
MARTe::uint32 *isAuto;

View File

@@ -32,6 +32,7 @@
#include "JASDNRTStateMachineGAM.h"
#include "AdvancedErrorManagement.h"
#include "TypeDescriptor.h"
/*---------------------------------------------------------------------------*/
/* Static definitions */
@@ -54,7 +55,7 @@ JASDNRTStateMachineGAM::JASDNRTStateMachineGAM() {
mhvps_hvon = 0;
// Parameters which get from Input signals.
triggerSignal = NULL_PTR(MARTe::uint32 *);
triggerSignal = NULL_PTR(MARTe::uint8 *);
currentTime = NULL_PTR(MARTe::uint32 *);
triggerDelay_mhvps_hvon = NULL_PTR(MARTe::uint32 *);
triggerDelay_aps_hvon = NULL_PTR(MARTe::uint32 *);
@@ -62,16 +63,16 @@ JASDNRTStateMachineGAM::JASDNRTStateMachineGAM() {
triggerDelay_bps_hvon = NULL_PTR(MARTe::uint32 *);
triggerDelay_bps_swon = NULL_PTR(MARTe::uint32 *);
triggerDelay_shotlen = NULL_PTR(MARTe::uint32 *);
stopRequest = NULL_PTR(MARTe::uint32 *);
stopRequest = NULL_PTR(MARTe::uint8 *);
modePulseLengthLimit = NULL_PTR(MARTe::uint32 *);
sdnCommand = NULL_PTR(MARTe::uint16 *);
// write out target.
outputSignal = NULL_PTR(MARTe::uint32 *);
outputBeamON = NULL_PTR(MARTe::uint32 *);
outputHVArmed = NULL_PTR(MARTe::uint32 *);
outputHVInjection = NULL_PTR(MARTe::uint32 *);
outputRFON = NULL_PTR(MARTe::uint32 *);
outputBeamON = NULL_PTR(MARTe::uint8 *);
outputHVArmed = NULL_PTR(MARTe::uint8 *);
outputHVInjection = NULL_PTR(MARTe::uint8 *);
outputRFON = NULL_PTR(MARTe::uint8 *);
outputBeamONTime = NULL_PTR(MARTe::uint32 *);
outputRFONTime = NULL_PTR(MARTe::uint32 *);
shotCounter = NULL_PTR(MARTe::uint32 *);
@@ -149,7 +150,7 @@ bool JASDNRTStateMachineGAM::Setup() {
uint32 c;
for (c = 0u; c < numberOfInputSignals; c++) {
TypeDescriptor inputType = GetSignalType(InputSignals, c);
ok = (inputType == UnsignedInteger32Bit || inputType == UnsignedInteger16Bit);
ok = (inputType == UnsignedInteger32Bit || inputType == UnsignedInteger16Bit || inputType == UnsignedInteger8Bit);
if (!ok) {
StreamString signalName;
(void) GetSignalName(InputSignals, c, signalName);
@@ -162,7 +163,7 @@ bool JASDNRTStateMachineGAM::Setup() {
uint32 c;
for (c = 0u; c < numberOfOutputSignals; c++) {
TypeDescriptor outputType = GetSignalType(OutputSignals, c);
ok = (outputType == UnsignedInteger32Bit);
ok = (outputType == UnsignedInteger32Bit || outputType == UnsignedInteger8Bit);
if (!ok) {
StreamString signalName;
(void) GetSignalName(InputSignals, c, signalName);
@@ -172,22 +173,22 @@ bool JASDNRTStateMachineGAM::Setup() {
}
if (ok) {
currentTime = reinterpret_cast<uint32 *>(GetInputSignalMemory(0));
triggerSignal = reinterpret_cast<uint32 *>(GetInputSignalMemory(1));
triggerSignal = reinterpret_cast<uint8 *>(GetInputSignalMemory(1));
triggerDelay_mhvps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(2));
triggerDelay_aps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(3));
triggerDelay_aps_swon = reinterpret_cast<uint32 *>(GetInputSignalMemory(4));
triggerDelay_bps_hvon = reinterpret_cast<uint32 *>(GetInputSignalMemory(5));
triggerDelay_bps_swon = reinterpret_cast<uint32 *>(GetInputSignalMemory(6));
triggerDelay_shotlen = reinterpret_cast<uint32 *>(GetInputSignalMemory(7));
stopRequest = reinterpret_cast<uint32 *>(GetInputSignalMemory(8));
stopRequest = reinterpret_cast<uint8 *>(GetInputSignalMemory(8));
modePulseLengthLimit = reinterpret_cast<uint32 *>(GetInputSignalMemory(9));
sdnCommand = reinterpret_cast<uint16 *>(GetInputSignalMemory(10));
outputSignal = reinterpret_cast<uint32 *>(GetOutputSignalMemory(0));
outputBeamON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(1));
outputHVArmed = reinterpret_cast<uint32 *>(GetOutputSignalMemory(2));
outputHVInjection = reinterpret_cast<uint32 *>(GetOutputSignalMemory(3));
outputRFON = reinterpret_cast<uint32 *>(GetOutputSignalMemory(4));
outputBeamON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(1));
outputHVArmed = reinterpret_cast<uint8 *>(GetOutputSignalMemory(2));
outputHVInjection = reinterpret_cast<uint8 *>(GetOutputSignalMemory(3));
outputRFON = reinterpret_cast<uint8 *>(GetOutputSignalMemory(4));
outputBeamONTime = reinterpret_cast<uint32 *>(GetOutputSignalMemory(5));
outputRFONTime = reinterpret_cast<uint32 *>(GetOutputSignalMemory(6));
shotCounter = reinterpret_cast<uint32 *>(GetOutputSignalMemory(7));

View File

@@ -16,7 +16,8 @@
* basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the Licence permissions and limitations under the Licence.
* @details This header file contains the declaration of the class JARTStateMachineGAM
* @details This header file contains the declaration of the class
JARTStateMachineGAM
* with all of its public, protected and private members. It may also include
* definitions for inline methods which need to be visible to the compiler.
*/
@@ -41,13 +42,9 @@
/**
* @brief GAM provides real-time state machine that communicate with SDN packet.
*
* The configuration syntax is (names and signal quantity are only given as an example):
* <pre>
* +GAMSDNRealTimeStateMachine = {
* Class = JASDNRTStateMachineGAM
* ConditionTrigger = 1
* mhvps_hvon = 4
* aps_hvon = 1
* The configuration syntax is (names and signal quantity are only given as an
* example): <pre> +GAMSDNRealTimeStateMachine = { Class =
* JASDNRTStateMachineGAM ConditionTrigger = 1 mhvps_hvon = 4 aps_hvon = 1
* aps_swon = 16
* bps_hvon = 2
* bps_swon = 8
@@ -185,7 +182,7 @@ private:
// Input signals
/////////////////////////////////////////////////
// The trigger signal (PLC_ON)
MARTe::uint32 *triggerSignal;
MARTe::uint8 *triggerSignal;
// Time signal (Time from TimerGAM)
MARTe::uint32 *currentTime;
// Input signals for trigger delay parameters
@@ -196,7 +193,7 @@ private:
MARTe::uint32 *triggerDelay_bps_swon;
MARTe::uint32 *triggerDelay_shotlen;
// Input signal for sequence stop request.
MARTe::uint32 *stopRequest;
MARTe::uint8 *stopRequest;
// Input signal for pulse length limit by mode.
MARTe::uint32 *modePulseLengthLimit;
// Input signal for SDN commands.
@@ -208,10 +205,10 @@ private:
// One state write One signal.
MARTe::uint32 *outputSignal;
// state notify output
MARTe::uint32 *outputBeamON;
MARTe::uint32 *outputHVArmed;
MARTe::uint32 *outputHVInjection;
MARTe::uint32 *outputRFON;
MARTe::uint8 *outputBeamON;
MARTe::uint8 *outputHVArmed;
MARTe::uint8 *outputHVInjection;
MARTe::uint8 *outputRFON;
// elapsed time notify output;
MARTe::uint32 *outputBeamONTime;
MARTe::uint32 *outputRFONTime;
@@ -238,11 +235,8 @@ private:
bool aps_swon_is_on;
bool bps_hvon_is_on;
bool bps_swon_is_on;
};
/*---------------------------------------------------------------------------*/
/* Inline method definitions */
/*---------------------------------------------------------------------------*/

View File

@@ -1,6 +1,6 @@
/**
* @file JASourceChoiseGAM.cpp
* @brief Source file for class JASourceChoiseGAM
* @file JASourceChoiceGAM.cpp
* @brief Source file for class JASourceChoiceGAM
* @date Nov 26, 2018
* @author aneto
*
@@ -17,7 +17,7 @@
* or implied. See the Licence permissions and limitations under the Licence.
* @details This source file contains the definition of all the methods for
* the class JASourceChoiseGAM (public, protected, and private). Be aware that some
* the class JASourceChoiceGAM (public, protected, and private). Be aware that some
* methods, such as those inline could be defined on the header file, instead.
*/
@@ -29,7 +29,7 @@
/* Project header includes */
/*---------------------------------------------------------------------------*/
#include "JASourceChoiseGAM.h"
#include "JASourceChoiceGAM.h"
#include "AdvancedErrorManagement.h"
@@ -41,15 +41,15 @@
/* Method definitions */
/*---------------------------------------------------------------------------*/
JASourceChoiseGAM::JASourceChoiseGAM() {
JASourceChoiceGAM::JASourceChoiceGAM() {
// initialize member variables.
numberOfPVs = 0;
}
JASourceChoiseGAM::~JASourceChoiseGAM() {
JASourceChoiceGAM::~JASourceChoiceGAM() {
}
bool JASourceChoiseGAM::Initialise(MARTe::StructuredDataI & data) {
bool JASourceChoiceGAM::Initialise(MARTe::StructuredDataI & data) {
//GAM parameters are initialized.
using namespace MARTe;
bool ok = GAM::Initialise(data);
@@ -62,12 +62,12 @@ bool JASourceChoiseGAM::Initialise(MARTe::StructuredDataI & data) {
return ok;
}
bool JASourceChoiseGAM::PrepareNextState(const MARTe::char8 * const currentStateName, const MARTe::char8 * const nextStateName) {
bool JASourceChoiceGAM::PrepareNextState(const MARTe::char8 * const currentStateName, const MARTe::char8 * const nextStateName) {
//This method changes internal parameter based on next realtime state.
return true;
}
bool JASourceChoiseGAM::Setup() {
bool JASourceChoiceGAM::Setup() {
// Setup memory for input/output signals on the GAM.
using namespace MARTe;
bool ok = (numberOfInputSignals == numberOfPVs*3u);
@@ -147,7 +147,7 @@ bool JASourceChoiseGAM::Setup() {
return ok;
}
bool JASourceChoiseGAM::Execute() {
bool JASourceChoiceGAM::Execute() {
// This method is called every realtime state thread cycle.
using namespace MARTe;
@@ -185,4 +185,4 @@ bool JASourceChoiseGAM::Execute() {
return true;
}
CLASS_REGISTER(JASourceChoiseGAM, "1.0")
CLASS_REGISTER(JASourceChoiceGAM, "1.0")

View File

@@ -38,13 +38,13 @@
/* Class declaration */
/*---------------------------------------------------------------------------*/
class JASourceChoiseGAM : public MARTe::GAM, public MARTe::StatefulI {
class JASourceChoiceGAM : public MARTe::GAM, public MARTe::StatefulI {
public:
CLASS_REGISTER_DECLARATION()
JASourceChoiseGAM();
JASourceChoiceGAM();
virtual ~JASourceChoiseGAM();
virtual ~JASourceChoiceGAM();
virtual bool Initialise(MARTe::StructuredDataI & data);

View File

@@ -23,7 +23,7 @@
# $Id: Makefile.inc 3 2012-01-15 16:26:07Z aneto $
#
#############################################################
OBJSX=JASourceChoiseGAM.x
OBJSX=JASourceChoiceGAM.x
PACKAGE=GAMs
@@ -48,8 +48,8 @@ INCLUDES += -I$(MARTe2_DIR)/Source/Core/FileSystem/L3Streams
all: $(OBJS) $(SUBPROJ) \
$(BUILD_DIR)/JASourceChoiseGAM$(LIBEXT) \
$(BUILD_DIR)/JASourceChoiseGAM$(DLLEXT)
$(BUILD_DIR)/JASourceChoiceGAM$(LIBEXT) \
$(BUILD_DIR)/JASourceChoiceGAM$(DLLEXT)
echo $(OBJS)
include $(MAKEDEFAULTDIR)/MakeStdLibRules.$(TARGET)

View File

@@ -51,7 +51,7 @@ JATriangleWaveGAM::JATriangleWaveGAM() {
frequency = NULL_PTR(MARTe::float32 *);
amplitude = NULL_PTR(MARTe::float32 *);
offset = NULL_PTR(MARTe::float32 *);
plcStandby = NULL_PTR(MARTe::uint32 *);
plcStandby = NULL_PTR(MARTe::uint8 *);
waveOutput = NULL_PTR(MARTe::float32 *);
time = 0.0f;
}
@@ -130,9 +130,9 @@ bool JATriangleWaveGAM::Setup() {
}
else {
TypeDescriptor inputType = GetSignalType(InputSignals, plcStandbyIndex);
ok = (inputType == UnsignedInteger32Bit);
ok = (inputType == UnsignedInteger8Bit);
if (!ok) {
REPORT_ERROR(ErrorManagement::ParametersError, "PLCSTANDBY shall be defined as uint32.");
REPORT_ERROR(ErrorManagement::ParametersError, "PLCSTANDBY shall be defined as uint8.");
}
}
}
@@ -147,7 +147,7 @@ bool JATriangleWaveGAM::Setup() {
frequency = reinterpret_cast<float32 *>(GetInputSignalMemory(freqIndex));
amplitude = reinterpret_cast<float32 *>(GetInputSignalMemory(ampIndex));
offset = reinterpret_cast<float32 *>(GetInputSignalMemory(offsetIndex));
plcStandby = reinterpret_cast<uint32 *>(GetInputSignalMemory(plcStandbyIndex));
plcStandby = reinterpret_cast<uint8 *>(GetInputSignalMemory(plcStandbyIndex));
waveOutput = reinterpret_cast<float32 *>(GetOutputSignalMemory(0));
}
return ok;

View File

@@ -114,7 +114,7 @@ private:
//MARTe::uint32 *plcReady;
// Input signal condition CCPS_STANDBY
MARTe::uint32 *plcStandby;
MARTe::uint8 *plcStandby;
MARTe::float32 *waveOutput;

View File

@@ -27,8 +27,8 @@
SPB = JAMessageGAM.x JAPreProgrammedGAM.x JAModeControlGAM.x \
JAWFRecordGAM.x JATriangleWaveGAM.x JARampupGAM.x \
JARTStateMachineGAM.x JASDNRTStateMachineGAM.x JATerminalInterfaceGAM.x \
JABitSumGAM.x JAConditionalSignalUpdateGAM.x JASourceChoiseGAM.x JABitReverseGAM.x \
JAESDNTimeCompareGAM.x
JABitSumGAM.x JAConditionalSignalUpdateGAM.x JASourceChoiceGAM.x JABitReverseGAM.x \
JAESDNTimeCompareGAM.x ScaleGAM.x
MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults

View File

@@ -23,11 +23,11 @@
# $Id: Makefile.inc 3 2012-01-15 16:26:07Z aneto $
#
#############################################################
OBJSX=JAMessageGAM.x
OBJSX=ScaleGAM.x
PACKAGE=GAMs
ROOT_DIR=../../
ROOT_DIR=../../../../obj
MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults
include $(MAKEDEFAULTDIR)/MakeStdLibDefs.$(TARGET)
@@ -45,8 +45,8 @@ INCLUDES += -I$(MARTe2_DIR)/Source/Core/Scheduler/L4Messages
all: $(OBJS) $(SUBPROJ) \
$(BUILD_DIR)/JAMessageGAM$(LIBEXT) \
$(BUILD_DIR)/JAMessageGAM$(DLLEXT)
$(BUILD_DIR)/ScaleGAM$(LIBEXT) \
$(BUILD_DIR)/ScaleGAM$(DLLEXT)
echo $(OBJS)
include $(MAKEDEFAULTDIR)/MakeStdLibRules.$(TARGET)

View File

@@ -0,0 +1,127 @@
/*---------------------------------------------------------------------------*/
/* Standard header includes */
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/* Project header includes */
/*---------------------------------------------------------------------------*/
#include "AdvancedErrorManagement.h"
#include "CompilerTypes.h"
#include "DataSourceI.h"
#include "ScaleGAM.h"
#include "TypeDescriptor.h"
/*---------------------------------------------------------------------------*/
/* Static definitions */
/*---------------------------------------------------------------------------*/
namespace MARTe {} // namespace MARTe
/*---------------------------------------------------------------------------*/
/* Method definitions */
/*---------------------------------------------------------------------------*/
namespace MARTe {
const MARTe::uint32 NUM_OUTPUTS = 1u;
const MARTe::uint32 NUM_PARAMS = 0u;
ScaleGAM::ScaleGAM() : GAM(), MessageI() {
factors = NULL_PTR(float32 *);
inputs = NULL_PTR(float32 *);
outputs = NULL_PTR(float32 *);
}
ScaleGAM::~ScaleGAM() {
if (factors != NULL_PTR(float32 *)) {
delete[] factors;
}
}
bool ScaleGAM::Setup() {
bool ok = numberOfInputSignals == numberOfOutputSignals;
for (uint32 i = 0; i < numberOfInputSignals && ok; i++) {
if (GetSignalType(InputSignals, i) != Float32Bit) {
REPORT_ERROR(ErrorManagement::InitialisationError,
"Input %d should be float32", i);
ok = false;
}
if (GetSignalType(OutputSignals, i) != Float32Bit) {
REPORT_ERROR(ErrorManagement::InitialisationError,
"Output %d should be float32", i);
ok = false;
}
}
inputs = (float32 *)inputSignalsMemory;
outputs = (float32 *)outputSignalsMemory;
return ok;
}
bool ScaleGAM::Initialise(StructuredDataI &data) {
bool ret = GAM::Initialise(data);
uint32 nin = 0;
if (ret && data.MoveRelative("InputSignals")) {
nin = data.GetNumberOfChildren();
if (nin == 0) {
REPORT_ERROR(ErrorManagement::InitialisationError,
"Number of inputs should > 0");
ret = false;
} else {
factors = new float32[nin];
}
for (uint32 i = 0; i < nin && ret; i++) {
ret = data.MoveToChild(i);
if (!ret) {
REPORT_ERROR(ErrorManagement::InitialisationError,
"Impossible to move to children %d", i);
data.MoveToAncestor(1u);
break;
}
ret = data.Read("Factor", factors[i]);
if (!ret) {
REPORT_ERROR(ErrorManagement::InitialisationError,
"Impossible to move to read `Factor` for signal n %d ", i);
data.MoveToAncestor(1u);
break;
}
}
ret = data.MoveToAncestor(1u) & ret;
} else {
REPORT_ERROR(ErrorManagement::InitialisationError,
"No input signals found");
ret &= false;
}
if (ret && data.MoveRelative("OutputSignals")) {
uint32 nout = data.GetNumberOfChildren();
if (nout != nin) {
REPORT_ERROR(
ErrorManagement::InitialisationError,
"Number of Outputs should be exactly equal to number of outputs",
NUM_OUTPUTS);
ret = false;
}
ret = data.MoveToAncestor(1u);
} else {
REPORT_ERROR(ErrorManagement::InitialisationError,
"No output signals, exactly %d outputs are needed",
NUM_OUTPUTS);
ret = false;
}
REPORT_ERROR(ret ? ErrorManagement::Information
: ErrorManagement::InitialisationError,
ret ? "%s Initialised" : "%s Failed to initialise", GetName());
return ret;
}
bool ScaleGAM::Execute() {
for (uint32 i = 0; i < numberOfInputSignals; i++) {
outputs[i] = inputs[i] / factors[i];
}
return true;
}
CLASS_REGISTER(ScaleGAM, "1.0")
} /* namespace MARTe */

View File

@@ -0,0 +1,71 @@
#ifndef SCALE_GAM_H
#define SCALE_GAM_H
/*---------------------------------------------------------------------------*/
/* Standard header includes */
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/* Project header includes */
/*---------------------------------------------------------------------------*/
#include "Architecture/x86_gcc/CompilerTypes.h"
#include "GAM.h"
#include "MessageI.h"
/*---------------------------------------------------------------------------*/
/* Class declaration */
/*---------------------------------------------------------------------------*/
namespace MARTe {
class ScaleGAM : public GAM, public MessageI {
public:
CLASS_REGISTER_DECLARATION()
/**
* @brief Constructor. NOOP.
*/
ScaleGAM();
/**
* @brief Destructor. NOOP.
*/
virtual ~ScaleGAM();
/**
* @brief Initialises the output signal memory with default values provided
* through configuration.
* @return true if the pre-conditions are met.
* @pre
* The pairs of signals have the same byte size.
*/
virtual bool Setup();
/**
* @see DataSourceI::Initialise
* @details Initialise the parameters of the ComparatorGAM
* @return true if the pre-conditions are met.
* @pre
* The number of input signals is even and each pair of signals have the same
* type.
**/
virtual bool Initialise(StructuredDataI &data);
/**
* @brief Execute method. NOOP.
* @return true.
*/
virtual bool Execute();
private:
float32 * inputs;
float32 * outputs;
float32 * factors;
};
} // namespace MARTe
/*---------------------------------------------------------------------------*/
/* Inline method definitions */
/*---------------------------------------------------------------------------*/
#endif

View File

@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
DAN Configuration
Root: danApi
CODAC-VERSION: 5.1b5
WARNING: This is an automatically generated file. PLEASE DO NOT MODIFY.
-->
<danApi>
<version>1.0.0</version>
<ICprogram name="JADA_RF01App">
<source name="FastAnalogDAN_float32">
<itemDanType>danFloat</itemDanType>
<maxTransferRate>100000</maxTransferRate>
<advancedSource>
<dataModel>DM_BLOCK2D_VAR</dataModel>
<streamType>DATA_D0</streamType>
<checkPolicy>NO_CHECK</checkPolicy>
<queueSize>1000</queueSize>
<profMonitoring>1</profMonitoring>
<timeFormat>UTC</timeFormat>
<debug>
<srvChunkHeaderSize>20</srvChunkHeaderSize>
<srvChunkSize>10000</srvChunkSize>
<srvBufferSize>2</srvBufferSize>
</debug>
</advancedSource>
<deviceInfo>
<deviceName>DAQ</deviceName>
<deviceVersion>v1.0</deviceVersion>
<operationalMode>0</operationalMode>
<manufactureCode>0</manufactureCode>
</deviceInfo>
<channelsInfo sequence="SEQUENCIAL">
<channel number="0" variable="EC-GN-P01:GY_APS_V_MEAS" label="EC-GN-P01:GY_APS_V_MEAS" status="ENABLE"></channel>
<channel number="1" variable="EC-GN-P01:GY_APS_I_MEAS" label="EC-GN-P01:GY_APS_I_MEAS" status="ENABLE"></channel>
<channel number="2" variable="EC-GN-P01:GY_BPS_V_MEAS" label="EC-GN-P01:GY_BPS_V_MEAS" status="ENABLE"></channel>
<channel number="3" variable="EC-GN-P01:GY_BPS_I_MEAS" label="EC-GN-P01:GY_BPS_I_MEAS" status="ENABLE"></channel>
<channel number="4" variable="EC-GN-P01:GY_MHV_V_MEAS" label="EC-GN-P01:GY_MHV_V_MEAS" status="ENABLE"></channel>
<channel number="5" variable="EC-GN-P01:GY_MHV_I_MEAS" label="EC-GN-P01:GY_MHV_I_MEAS" status="ENABLE"></channel>
<channel number="6" variable="EC-GN-P01:GY_ARC1_V_MEAS" label="EC-GN-P01:GY_ARC1_V_MEAS" status="ENABLE"></channel>
<channel number="7" variable="EC-GN-P01:GY_ARC2_V_MEAS" label="EC-GN-P01:GY_ARC2_V_MEAS" status="ENABLE"></channel>
<channel number="8" variable="EC-GN-P01:GY_ARC3_V_MEAS" label="EC-GN-P01:GY_ARC3_V_MEAS" status="ENABLE"></channel>
<channel number="9" variable="EC-GN-P01:GY_RF_V_MEAS" label="EC-GN-P01:GY_RF_V_MEAS" status="ENABLE"></channel>
</channelsInfo>
</source>
<source name="DANDIODataSource_uint8">
<itemDanType>danUInt8</itemDanType>
<maxTransferRate>100000</maxTransferRate>
<advancedSource>
<dataModel>DM_BLOCK2D_VAR</dataModel>
<streamType>DATA_D0</streamType>
<checkPolicy>NO_CHECK</checkPolicy>
<queueSize>1000</queueSize>
<profMonitoring>1</profMonitoring>
<timeFormat>UTC</timeFormat>
<debug>
<srvChunkHeaderSize>20</srvChunkHeaderSize>
<srvChunkSize>10000</srvChunkSize>
<srvBufferSize>2</srvBufferSize>
</debug>
</advancedSource>
<deviceInfo>
<deviceName>DAQ</deviceName>
<deviceVersion>v1.0</deviceVersion>
<operationalMode>0</operationalMode>
<manufactureCode>0</manufactureCode>
</deviceInfo>
<channelsInfo sequence="SEQUENCIAL">
<channel number="0" variable="EC-GN-P01:GYA_APS_READY" label="EC-GN-P01:GYA_APS_READY" status="ENABLE"></channel>
<channel number="1" variable="EC-GN-P01:GYA_APS_FLT" label="EC-GN-P01:GYA_APS_FLT" status="ENABLE"></channel>
<channel number="2" variable="EC-GN-P01:GYA_BPS_READY" label="EC-GN-P01:GYA_BPS_READY" status="ENABLE"></channel>
<channel number="3" variable="EC-GN-P01:GYA_BPS_FLT" label="EC-GN-P01:GYA_BPS_FLT" status="ENABLE"></channel>
<channel number="4" variable="EC-GN-P01:MHVPS_OV" label="EC-GN-P01:MHVPS_OV" status="ENABLE"></channel>
<channel number="5" variable="EC-GN-P01:MHVPS_OC" label="EC-GN-P01:MHVPS_OC" status="ENABLE"></channel>
<channel number="6" variable="EC-GN-P01:MHVPS_FLT" label="EC-GN-P01:MHVPS_FLT" status="ENABLE"></channel>
<channel number="7" variable="EC-GN-P01:MHVPS_READY" label="EC-GN-P01:MHVPS_READY" status="ENABLE"></channel>
<channel number="8" variable="EC-GN-P01:ECPC_MOD" label="EC-GN-P01:ECPC_MOD" status="ENABLE"></channel>
<channel number="9" variable="EC-GN-P01:FAST_TRIP" label="EC-GN-P01:FAST_TRIP" status="ENABLE"></channel>
<channel number="10" variable="EC-GN-P01:CRIO_RV1" label="EC-GN-P01:CRIO_RV1" status="ENABLE"></channel>
<channel number="11" variable="EC-GN-P01:CRIO_RV2" label="EC-GN-P01:CRIO_RV2" status="ENABLE"></channel>
<channel number="12" variable="EC-GN-P01:CRIO_RV3" label="EC-GN-P01:CRIO_RV3" status="ENABLE"></channel>
<channel number="13" variable="EC-GN-P01:PLC_ITL" label="EC-GN-P01:PLC_ITL" status="ENABLE"></channel>
<channel number="14" variable="EC-GN-P01:PLC_STANDBY" label="EC-GN-P01:PLC_STANDBY" status="ENABLE"></channel>
<channel number="15" variable="EC-GN-P01:PLC_READY" label="EC-GN-P01:PLC_READY" status="ENABLE"></channel>
<channel number="16" variable="EC-GN-P01:PLC_ON" label="EC-GN-P01:PLC_ON" status="ENABLE"></channel>
<channel number="17" variable="EC-GN-P01:PLC_PERMIT" label="EC-GN-P01:PLC_PERMIT" status="ENABLE"></channel>
<channel number="18" variable="EC-GN-P01:PLC_OP_SELECTED" label="EC-GN-P01:PLC_OP_SELECTED" status="ENABLE"></channel>
<channel number="19" variable="EC-GN-P01:PLC_CC_OP_SELECTED" label="EC-GN-P01:PLC_CC_OP_SELECTED" status="ENABLE"></channel>
<channel number="20" variable="EC-GN-P01:PLC_SYNCMODE" label="EC-GN-P01:PLC_SYNCMODE" status="ENABLE"></channel>
<channel number="21" variable="EC-GN-P01:TRIGGER" label="EC-GN-P01:TRIGGER" status="ENABLE"></channel>
<channel number="22" variable="EC-GN-P01:BEAM_ON_STAT" label="EC-GN-P01:BEAM_ON_STAT" status="ENABLE"></channel>
<channel number="23" variable="EC-GN-P01:HVARMED" label="EC-GN-P01:HVARMED" status="ENABLE"></channel>
<channel number="24" variable="EC-GN-P01:HVINJECTION" label="EC-GN-P01:HVINJECTION" status="ENABLE"></channel>
<channel number="25" variable="EC-GN-P01:RFON" label="EC-GN-P01:RFON" status="ENABLE"></channel>
</channelsInfo>
</source>
<source name="DANDIODataSource_uint32">
<itemDanType>danUInt32</itemDanType>
<maxTransferRate>100000</maxTransferRate>
<advancedSource>
<dataModel>DM_BLOCK2D_VAR</dataModel>
<streamType>DATA_D0</streamType>
<checkPolicy>NO_CHECK</checkPolicy>
<queueSize>1000</queueSize>
<profMonitoring>1</profMonitoring>
<timeFormat>UTC</timeFormat>
<debug>
<srvChunkHeaderSize>20</srvChunkHeaderSize>
<srvChunkSize>10000</srvChunkSize>
<srvBufferSize>2</srvBufferSize>
</debug>
</advancedSource>
<deviceInfo>
<deviceName>DAQ</deviceName>
<deviceVersion>v1.0</deviceVersion>
<operationalMode>0</operationalMode>
<manufactureCode>0</manufactureCode>
</deviceInfo>
<channelsInfo sequence="SEQUENCIAL">
<channel number="0" variable="EC-GN-P01:PXI6528_Status" label="EC-GN-P01:PXI6528_Status" status="ENABLE"></channel>
<channel number="1" variable="EC-GN-P01:BEAM_ON_TIME" label="EC-GN-P01:BEAM_ON_TIME" status="ENABLE"></channel>
<channel number="2" variable="EC-GN-P01:RFON_TIME" label="EC-GN-P01:RFON_TIME" status="ENABLE"></channel>
</channelsInfo>
</source>
<danStreamer name="DANSTREAMER0">
<link>ALL</link>
<internal>
<danInterface>${DAN_INTERFACE_NAME}</danInterface>
<!-- GGC
<danInterface>eno1</danInterface>
-->
<servers>
<policy>IF_FAIL_NEXT</policy>
<server >${DAN_ARCHIVE_MASTER}</server>
<server >${DAN_ARCHIVE_SLAVE}</server>
<!-- GGC
<server>10.142.0.24</server>
<server>10.142.0.24</server>
-->
</servers>
</internal>
</danStreamer>
</ICprogram>
</danApi>

View File

@@ -0,0 +1,121 @@
package schema
#Classes: {
ExtractBitGAM: {...}
CompactBitGAM: {...}
HttpService: {
Port!: uint & >1024 & <49151
WebRoot?: string
Timeout?: uint
ListenMaxConnection?: uint
AcceptTimeout?: uint
MaxNumberOfThreads?: uint
MinNumberOfThreads?: uint
}
HttpObjectBrowser: {
Root!: string
...
}
HttpDataMonitor: {
...
}
HttpObjectBrowser: {
Root!: string
}
HttpDirectoryResource: {
BaseDir: string
}
HttpMessageInterface: {
...
}
NI6528: {
...
}
ConfigurationDatabase: {
...
}
JAWFRecordGAM: {
Directory!: string
...
}
JAPreProgrammedGAM: {
Directory!: string
PreProgrammedPeriodMs!: uint32
...
}
JAConditionalSignalUpdateGAM: {
Operation!: "AND" | "OR" | "XOR" | "NOR"
InputSignals: {
[_]: {
Comparator!: "EQUALS" | "GREATER" | "LESSER"
Value!: number
Type!: string
...
}
}
OutputSignals: {
[_]: {
DefaultValue!: uint32
Value!: uint32
Type!: string
...
}
}
...
}
JASourceChoiceGAM: {
...
}
JAMessageGAM: {
Operation!: "AND" | "OR"
InputSignals: {
[_]: {
Value!: number
Comparator!: "EQUALS" | "GREATER" | "LESS" | "EQUALS_OR_GREATER" | "EQUALS_OR_LESS" | "NOT"
Type!: string
...
}
}
Event!: {
Class: "Message"
Destination!: string
Function!: string
}
...
}
JAModeControlGAM: {
...
}
JARTStateMachineGAM: {
ConditionTrigger: 0 | 1
mhvps_hvon: uint
aps_hvon: uint
aps_swon: uint
bps_hvon: uint
bps_swon: uint
...
}
JASDNRTStateMachineGAM: {
ConditionTrigger: 0 | 1
mhvps_hvon: uint
aps_hvon: uint
aps_swon: uint
bps_hvon: uint
bps_swon: uint
...
}
DANSource: {
...
}
JATriangleWaveGAM: {
...
}
JARampupGAM: {
...
}
NI6683H: {
BoardId: uint
...
}
}

View File

@@ -1,103 +0,0 @@
#test configuration file2,,,,,,
#Time,MHVPS,BPS,APS,MC,GC,FHPS
0,60,45,0,10,10,10
10,55,40,-2,9,9,9
20,50,35,-4,8,8,8
30,45,30,-6,7,7,7
40,40,25,-8,6,6,6
50,35,20,-10,5,5,5
60,30,15,-12,4,4,4
70,25,10,-14,3,3,3
80,20,5,-16,2,2,2
90,15,0,-18,1,1,1
100,10,-5,-20,0,0,0
110,5,0,-22,1,1,1
120,0,5,-20,2,2,2
130,-5,10,-18,3,3,3
140,0,15,-16,4,4,4
150,5,20,-14,5,5,5
160,10,25,-12,6,6,6
170,15,30,-10,7,7,7
180,20,35,-8,8,8,8
190,25,40,-6,9,9,9
200,30,45,-4,10,10,10
210,35,40,-2,9,9,9
220,40,35,0,8,8,8
230,45,30,-2,7,7,7
240,50,25,-4,6,6,6
250,55,20,-6,5,5,5
260,60,15,-8,4,4,4
270,55,10,-10,3,3,3
280,50,5,-12,2,2,2
290,45,0,-14,1,1,1
300,40,-5,-16,0,0,0
310,35,0,-18,1,1,1
320,30,5,-20,2,2,2
330,25,10,-25,3,3,3
340,20,15,-20,4,4,4
350,15,20,-18,5,5,5
360,10,25,-16,6,6,6
370,5,30,-14,7,7,7
380,0,35,-12,8,8,8
390,-5,40,-10,9,9,9
400,0,45,-8,10,10,10
410,5,40,-6,9,9,9
420,10,35,-4,8,8,8
430,15,30,-2,7,7,7
440,20,25,0,6,6,6
450,25,20,-2,5,5,5
460,30,15,-4,4,4,4
470,35,10,-6,3,3,3
480,40,5,-8,2,2,2
490,45,0,-10,1,1,1
500,50,-5,-12,0,0,0
510,55,0,-14,1,1,1
520,60,5,-16,2,2,2
530,55,10,-18,3,3,3
540,50,15,-20,4,4,4
550,45,20,-30,5,5,5
560,40,25,-20,6,6,6
570,35,30,-18,7,7,7
580,30,35,-16,8,8,8
590,25,40,-14,9,9,9
600,20,45,-12,10,10,10
610,15,40,-10,9,9,9
620,10,35,-8,8,8,8
630,5,30,-6,7,7,7
640,0,25,-4,6,6,6
650,-5,20,-2,5,5,5
660,0,15,0,4,4,4
670,5,10,-2,3,3,3
680,10,5,-4,2,2,2
690,15,0,-6,1,1,1
700,20,-5,-8,0,0,0
710,25,0,-10,1,1,1
720,30,5,-12,2,2,2
730,35,10,-14,3,3,3
740,40,15,-16,4,4,4
750,45,20,-18,5,5,5
760,50,25,-20,6,6,6
770,55,30,-22,7,7,7
780,60,35,-20,8,8,8
790,55,40,-18,9,9,9
800,50,45,-16,10,10,10
810,45,40,-14,9,9,9
820,40,35,-12,8,8,8
830,35,30,-10,7,7,7
840,30,25,-8,6,6,6
850,25,20,-6,5,5,5
860,20,15,-4,4,4,4
870,15,10,-2,3,3,3
880,10,5,0,2,2,2
890,5,0,-2,1,1,1
900,0,-5,-4,0,0,0
910,-5,0,-6,1,1,1
920,0,5,-8,2,2,2
930,5,10,-10,3,3,3
940,10,15,-12,4,4,4
950,15,20,-14,5,5,5
960,20,25,-16,6,6,6
970,25,30,-18,7,7,7
980,30,35,-20,8,8,8
990,35,40,-22,9,9,9
1000,40,45,-20,10,10,10
1 #test configuration file2
2 #Time MHVPS BPS APS MC GC FHPS
3 0 60 45 0 10 10 10
4 10 55 40 -2 9 9 9
5 20 50 35 -4 8 8 8
6 30 45 30 -6 7 7 7
7 40 40 25 -8 6 6 6
8 50 35 20 -10 5 5 5
9 60 30 15 -12 4 4 4
10 70 25 10 -14 3 3 3
11 80 20 5 -16 2 2 2
12 90 15 0 -18 1 1 1
13 100 10 -5 -20 0 0 0
14 110 5 0 -22 1 1 1
15 120 0 5 -20 2 2 2
16 130 -5 10 -18 3 3 3
17 140 0 15 -16 4 4 4
18 150 5 20 -14 5 5 5
19 160 10 25 -12 6 6 6
20 170 15 30 -10 7 7 7
21 180 20 35 -8 8 8 8
22 190 25 40 -6 9 9 9
23 200 30 45 -4 10 10 10
24 210 35 40 -2 9 9 9
25 220 40 35 0 8 8 8
26 230 45 30 -2 7 7 7
27 240 50 25 -4 6 6 6
28 250 55 20 -6 5 5 5
29 260 60 15 -8 4 4 4
30 270 55 10 -10 3 3 3
31 280 50 5 -12 2 2 2
32 290 45 0 -14 1 1 1
33 300 40 -5 -16 0 0 0
34 310 35 0 -18 1 1 1
35 320 30 5 -20 2 2 2
36 330 25 10 -25 3 3 3
37 340 20 15 -20 4 4 4
38 350 15 20 -18 5 5 5
39 360 10 25 -16 6 6 6
40 370 5 30 -14 7 7 7
41 380 0 35 -12 8 8 8
42 390 -5 40 -10 9 9 9
43 400 0 45 -8 10 10 10
44 410 5 40 -6 9 9 9
45 420 10 35 -4 8 8 8
46 430 15 30 -2 7 7 7
47 440 20 25 0 6 6 6
48 450 25 20 -2 5 5 5
49 460 30 15 -4 4 4 4
50 470 35 10 -6 3 3 3
51 480 40 5 -8 2 2 2
52 490 45 0 -10 1 1 1
53 500 50 -5 -12 0 0 0
54 510 55 0 -14 1 1 1
55 520 60 5 -16 2 2 2
56 530 55 10 -18 3 3 3
57 540 50 15 -20 4 4 4
58 550 45 20 -30 5 5 5
59 560 40 25 -20 6 6 6
60 570 35 30 -18 7 7 7
61 580 30 35 -16 8 8 8
62 590 25 40 -14 9 9 9
63 600 20 45 -12 10 10 10
64 610 15 40 -10 9 9 9
65 620 10 35 -8 8 8 8
66 630 5 30 -6 7 7 7
67 640 0 25 -4 6 6 6
68 650 -5 20 -2 5 5 5
69 660 0 15 0 4 4 4
70 670 5 10 -2 3 3 3
71 680 10 5 -4 2 2 2
72 690 15 0 -6 1 1 1
73 700 20 -5 -8 0 0 0
74 710 25 0 -10 1 1 1
75 720 30 5 -12 2 2 2
76 730 35 10 -14 3 3 3
77 740 40 15 -16 4 4 4
78 750 45 20 -18 5 5 5
79 760 50 25 -20 6 6 6
80 770 55 30 -22 7 7 7
81 780 60 35 -20 8 8 8
82 790 55 40 -18 9 9 9
83 800 50 45 -16 10 10 10
84 810 45 40 -14 9 9 9
85 820 40 35 -12 8 8 8
86 830 35 30 -10 7 7 7
87 840 30 25 -8 6 6 6
88 850 25 20 -6 5 5 5
89 860 20 15 -4 4 4 4
90 870 15 10 -2 3 3 3
91 880 10 5 0 2 2 2
92 890 5 0 -2 1 1 1
93 900 0 -5 -4 0 0 0
94 910 -5 0 -6 1 1 1
95 920 0 5 -8 2 2 2
96 930 5 10 -10 3 3 3
97 940 10 15 -12 4 4 4
98 950 15 20 -14 5 5 5
99 960 20 25 -16 6 6 6
100 970 25 30 -18 7 7 7
101 980 30 35 -20 8 8 8
102 990 35 40 -22 9 9 9
103 1000 40 45 -20 10 10 10

View File

@@ -1,103 +0,0 @@
#test configuration file2,,,,,,
#Time,MHVPS,BPS,APS,MC,GC,FHPS
0,60,45,10,10,10,10
10,55,40,9,9,9,9
20,50,35,8,8,8,8
30,45,30,7,7,7,7
40,40,25,6,6,6,6
50,35,20,5,5,5,5
60,30,15,4,4,4,4
70,25,10,3,3,3,3
80,20,5,2,2,2,2
90,15,0,1,1,1,1
100,10,-5,0,0,0,0
110,5,0,1,1,1,1
120,0,5,2,2,2,2
130,-5,10,3,3,3,3
140,0,15,4,4,4,4
150,5,20,5,5,5,5
160,10,25,6,6,6,6
170,15,30,7,7,7,7
180,20,35,8,8,8,8
190,25,40,9,9,9,9
200,30,45,10,10,10,10
210,35,40,11,9,9,9
220,40,35,12,8,8,8
230,45,30,11,7,7,7
240,50,25,10,6,6,6
250,55,20,9,5,5,5
260,60,15,8,4,4,4
270,55,10,7,3,3,3
280,50,5,6,2,2,2
290,45,0,5,1,1,1
300,40,-5,4,0,0,0
310,35,0,3,1,1,1
320,30,5,2,2,2,2
330,25,10,1,3,3,3
340,20,15,0,4,4,4
350,15,20,1,5,5,5
360,10,25,2,6,6,6
370,5,30,3,7,7,7
380,0,35,4,8,8,8
390,-5,40,5,9,9,9
400,0,45,6,10,10,10
410,5,40,7,9,9,9
420,10,35,8,8,8,8
430,15,30,9,7,7,7
440,20,25,10,6,6,6
450,25,20,11,5,5,5
460,30,15,12,4,4,4
470,35,10,11,3,3,3
480,40,5,10,2,2,2
490,45,0,9,1,1,1
500,50,-5,8,0,0,0
510,55,0,7,1,1,1
520,60,5,6,2,2,2
530,55,10,5,3,3,3
540,50,15,4,4,4,4
550,45,20,3,5,5,5
560,40,25,2,6,6,6
570,35,30,1,7,7,7
580,30,35,0,8,8,8
590,25,40,1,9,9,9
600,20,45,2,10,10,10
610,15,40,3,9,9,9
620,10,35,4,8,8,8
630,5,30,5,7,7,7
640,0,25,6,6,6,6
650,-5,20,7,5,5,5
660,0,15,8,4,4,4
670,5,10,9,3,3,3
680,10,5,10,2,2,2
690,15,0,11,1,1,1
700,20,-5,12,0,0,0
710,25,0,11,1,1,1
720,30,5,10,2,2,2
730,35,10,9,3,3,3
740,40,15,8,4,4,4
750,45,20,7,5,5,5
760,50,25,6,6,6,6
770,55,30,5,7,7,7
780,60,35,4,8,8,8
790,55,40,3,9,9,9
800,50,45,2,10,10,10
810,45,40,1,9,9,9
820,40,35,0,8,8,8
830,35,30,1,7,7,7
840,30,25,2,6,6,6
850,25,20,3,5,5,5
860,20,15,4,4,4,4
870,15,10,5,3,3,3
880,10,5,6,2,2,2
890,5,0,7,1,1,1
900,0,-5,8,0,0,0
910,-5,0,9,1,1,1
920,0,5,10,2,2,2
930,5,10,11,3,3,3
940,10,15,12,4,4,4
950,15,20,11,5,5,5
960,20,25,10,6,6,6
970,25,30,9,7,7,7
980,30,35,8,8,8,8
990,35,40,7,9,9,9
1000,40,45,6,10,10,10
1 #test configuration file2
2 #Time MHVPS BPS APS MC GC FHPS
3 0 60 45 10 10 10 10
4 10 55 40 9 9 9 9
5 20 50 35 8 8 8 8
6 30 45 30 7 7 7 7
7 40 40 25 6 6 6 6
8 50 35 20 5 5 5 5
9 60 30 15 4 4 4 4
10 70 25 10 3 3 3 3
11 80 20 5 2 2 2 2
12 90 15 0 1 1 1 1
13 100 10 -5 0 0 0 0
14 110 5 0 1 1 1 1
15 120 0 5 2 2 2 2
16 130 -5 10 3 3 3 3
17 140 0 15 4 4 4 4
18 150 5 20 5 5 5 5
19 160 10 25 6 6 6 6
20 170 15 30 7 7 7 7
21 180 20 35 8 8 8 8
22 190 25 40 9 9 9 9
23 200 30 45 10 10 10 10
24 210 35 40 11 9 9 9
25 220 40 35 12 8 8 8
26 230 45 30 11 7 7 7
27 240 50 25 10 6 6 6
28 250 55 20 9 5 5 5
29 260 60 15 8 4 4 4
30 270 55 10 7 3 3 3
31 280 50 5 6 2 2 2
32 290 45 0 5 1 1 1
33 300 40 -5 4 0 0 0
34 310 35 0 3 1 1 1
35 320 30 5 2 2 2 2
36 330 25 10 1 3 3 3
37 340 20 15 0 4 4 4
38 350 15 20 1 5 5 5
39 360 10 25 2 6 6 6
40 370 5 30 3 7 7 7
41 380 0 35 4 8 8 8
42 390 -5 40 5 9 9 9
43 400 0 45 6 10 10 10
44 410 5 40 7 9 9 9
45 420 10 35 8 8 8 8
46 430 15 30 9 7 7 7
47 440 20 25 10 6 6 6
48 450 25 20 11 5 5 5
49 460 30 15 12 4 4 4
50 470 35 10 11 3 3 3
51 480 40 5 10 2 2 2
52 490 45 0 9 1 1 1
53 500 50 -5 8 0 0 0
54 510 55 0 7 1 1 1
55 520 60 5 6 2 2 2
56 530 55 10 5 3 3 3
57 540 50 15 4 4 4 4
58 550 45 20 3 5 5 5
59 560 40 25 2 6 6 6
60 570 35 30 1 7 7 7
61 580 30 35 0 8 8 8
62 590 25 40 1 9 9 9
63 600 20 45 2 10 10 10
64 610 15 40 3 9 9 9
65 620 10 35 4 8 8 8
66 630 5 30 5 7 7 7
67 640 0 25 6 6 6 6
68 650 -5 20 7 5 5 5
69 660 0 15 8 4 4 4
70 670 5 10 9 3 3 3
71 680 10 5 10 2 2 2
72 690 15 0 11 1 1 1
73 700 20 -5 12 0 0 0
74 710 25 0 11 1 1 1
75 720 30 5 10 2 2 2
76 730 35 10 9 3 3 3
77 740 40 15 8 4 4 4
78 750 45 20 7 5 5 5
79 760 50 25 6 6 6 6
80 770 55 30 5 7 7 7
81 780 60 35 4 8 8 8
82 790 55 40 3 9 9 9
83 800 50 45 2 10 10 10
84 810 45 40 1 9 9 9
85 820 40 35 0 8 8 8
86 830 35 30 1 7 7 7
87 840 30 25 2 6 6 6
88 850 25 20 3 5 5 5
89 860 20 15 4 4 4 4
90 870 15 10 5 3 3 3
91 880 10 5 6 2 2 2
92 890 5 0 7 1 1 1
93 900 0 -5 8 0 0 0
94 910 -5 0 9 1 1 1
95 920 0 5 10 2 2 2
96 930 5 10 11 3 3 3
97 940 10 15 12 4 4 4
98 950 15 20 11 5 5 5
99 960 20 25 10 6 6 6
100 970 25 30 9 7 7 7
101 980 30 35 8 8 8 8
102 990 35 40 7 9 9 9
103 1000 40 45 6 10 10 10

View File

@@ -1,103 +0,0 @@
#test configuration file2,,,,,,
#Time,MHVPS,BPS,APS,MC,GC,FHPS
0,60,45,10,10,10,10
10,55,40,7,9,9,9
20,50,35,4,8,8,8
30,45,30,1,7,7,7
40,40,25,-2,6,6,6
50,35,20,-5,5,5,5
60,30,15,-8,4,4,4
70,25,10,-11,3,3,3
80,20,5,-14,2,2,2
90,15,0,-17,1,1,1
100,10,-5,-20,0,0,0
110,5,0,-23,1,1,1
120,0,5,-20,2,2,2
130,-5,10,-17,3,3,3
140,0,15,-14,4,4,4
150,5,20,-11,5,5,5
160,10,25,-8,6,6,6
170,15,30,-5,7,7,7
180,20,35,-2,8,8,8
190,25,40,1,9,9,9
200,30,45,4,10,10,10
210,35,40,7,9,9,9
220,40,35,10,8,8,8
230,45,30,13,7,7,7
240,50,25,10,6,6,6
250,55,20,7,5,5,5
260,60,15,4,4,4,4
270,55,10,1,3,3,3
280,50,5,-2,2,2,2
290,45,0,-5,1,1,1
300,40,-5,-8,0,0,0
310,35,0,-11,1,1,1
320,30,5,-14,2,2,2
330,25,10,-17,3,3,3
340,20,15,-20,4,4,4
350,15,20,-23,5,5,5
360,10,25,-20,6,6,6
370,5,30,-17,7,7,7
380,0,35,-14,8,8,8
390,-5,40,-11,9,9,9
400,0,45,-8,10,10,10
410,5,40,-5,9,9,9
420,10,35,-2,8,8,8
430,15,30,1,7,7,7
440,20,25,4,6,6,6
450,25,20,7,5,5,5
460,30,15,10,4,4,4
470,35,10,13,3,3,3
480,40,5,10,2,2,2
490,45,0,7,1,1,1
500,50,-5,4,0,0,0
510,55,0,1,1,1,1
520,60,5,-2,2,2,2
530,55,10,-5,3,3,3
540,50,15,-8,4,4,4
550,45,20,-11,5,5,5
560,40,25,-14,6,6,6
570,35,30,-17,7,7,7
580,30,35,-20,8,8,8
590,25,40,-23,9,9,9
600,20,45,-20,10,10,10
610,15,40,-17,9,9,9
620,10,35,-14,8,8,8
630,5,30,-11,7,7,7
640,0,25,-8,6,6,6
650,-5,20,-5,5,5,5
660,0,15,-2,4,4,4
670,5,10,1,3,3,3
680,10,5,4,2,2,2
690,15,0,7,1,1,1
700,20,-5,10,0,0,0
710,25,0,13,1,1,1
720,30,5,10,2,2,2
730,35,10,7,3,3,3
740,40,15,4,4,4,4
750,45,20,1,5,5,5
760,50,25,-2,6,6,6
770,55,30,-5,7,7,7
780,60,35,-8,8,8,8
790,55,40,-11,9,9,9
800,50,45,-14,10,10,10
810,45,40,-17,9,9,9
820,40,35,-20,8,8,8
830,35,30,-23,7,7,7
840,30,25,-20,6,6,6
850,25,20,-17,5,5,5
860,20,15,-14,4,4,4
870,15,10,-11,3,3,3
880,10,5,-8,2,2,2
890,5,0,-5,1,1,1
900,0,-5,-2,0,0,0
910,-5,0,1,1,1,1
920,0,5,4,2,2,2
930,5,10,7,3,3,3
940,10,15,10,4,4,4
950,15,20,13,5,5,5
960,20,25,10,6,6,6
970,25,30,7,7,7,7
980,30,35,4,8,8,8
990,35,40,1,9,9,9
1000,40,45,-2,10,10,10
1 #test configuration file2
2 #Time MHVPS BPS APS MC GC FHPS
3 0 60 45 10 10 10 10
4 10 55 40 7 9 9 9
5 20 50 35 4 8 8 8
6 30 45 30 1 7 7 7
7 40 40 25 -2 6 6 6
8 50 35 20 -5 5 5 5
9 60 30 15 -8 4 4 4
10 70 25 10 -11 3 3 3
11 80 20 5 -14 2 2 2
12 90 15 0 -17 1 1 1
13 100 10 -5 -20 0 0 0
14 110 5 0 -23 1 1 1
15 120 0 5 -20 2 2 2
16 130 -5 10 -17 3 3 3
17 140 0 15 -14 4 4 4
18 150 5 20 -11 5 5 5
19 160 10 25 -8 6 6 6
20 170 15 30 -5 7 7 7
21 180 20 35 -2 8 8 8
22 190 25 40 1 9 9 9
23 200 30 45 4 10 10 10
24 210 35 40 7 9 9 9
25 220 40 35 10 8 8 8
26 230 45 30 13 7 7 7
27 240 50 25 10 6 6 6
28 250 55 20 7 5 5 5
29 260 60 15 4 4 4 4
30 270 55 10 1 3 3 3
31 280 50 5 -2 2 2 2
32 290 45 0 -5 1 1 1
33 300 40 -5 -8 0 0 0
34 310 35 0 -11 1 1 1
35 320 30 5 -14 2 2 2
36 330 25 10 -17 3 3 3
37 340 20 15 -20 4 4 4
38 350 15 20 -23 5 5 5
39 360 10 25 -20 6 6 6
40 370 5 30 -17 7 7 7
41 380 0 35 -14 8 8 8
42 390 -5 40 -11 9 9 9
43 400 0 45 -8 10 10 10
44 410 5 40 -5 9 9 9
45 420 10 35 -2 8 8 8
46 430 15 30 1 7 7 7
47 440 20 25 4 6 6 6
48 450 25 20 7 5 5 5
49 460 30 15 10 4 4 4
50 470 35 10 13 3 3 3
51 480 40 5 10 2 2 2
52 490 45 0 7 1 1 1
53 500 50 -5 4 0 0 0
54 510 55 0 1 1 1 1
55 520 60 5 -2 2 2 2
56 530 55 10 -5 3 3 3
57 540 50 15 -8 4 4 4
58 550 45 20 -11 5 5 5
59 560 40 25 -14 6 6 6
60 570 35 30 -17 7 7 7
61 580 30 35 -20 8 8 8
62 590 25 40 -23 9 9 9
63 600 20 45 -20 10 10 10
64 610 15 40 -17 9 9 9
65 620 10 35 -14 8 8 8
66 630 5 30 -11 7 7 7
67 640 0 25 -8 6 6 6
68 650 -5 20 -5 5 5 5
69 660 0 15 -2 4 4 4
70 670 5 10 1 3 3 3
71 680 10 5 4 2 2 2
72 690 15 0 7 1 1 1
73 700 20 -5 10 0 0 0
74 710 25 0 13 1 1 1
75 720 30 5 10 2 2 2
76 730 35 10 7 3 3 3
77 740 40 15 4 4 4 4
78 750 45 20 1 5 5 5
79 760 50 25 -2 6 6 6
80 770 55 30 -5 7 7 7
81 780 60 35 -8 8 8 8
82 790 55 40 -11 9 9 9
83 800 50 45 -14 10 10 10
84 810 45 40 -17 9 9 9
85 820 40 35 -20 8 8 8
86 830 35 30 -23 7 7 7
87 840 30 25 -20 6 6 6
88 850 25 20 -17 5 5 5
89 860 20 15 -14 4 4 4
90 870 15 10 -11 3 3 3
91 880 10 5 -8 2 2 2
92 890 5 0 -5 1 1 1
93 900 0 -5 -2 0 0 0
94 910 -5 0 1 1 1 1
95 920 0 5 4 2 2 2
96 930 5 10 7 3 3 3
97 940 10 15 10 4 4 4
98 950 15 20 13 5 5 5
99 960 20 25 10 6 6 6
100 970 25 30 7 7 7 7
101 980 30 35 4 8 8 8
102 990 35 40 1 9 9 9
103 1000 40 45 -2 10 10 10

View File

@@ -1,353 +0,0 @@
+DDB1 = {
Class = GAMDataSource
AllowNoProducers = 1
ResetUnusedVariablesAtStateChange = 0
}
// Timer for thread 1 (Normal RT state execution cycle.)
+Timer1kHz = {
Class = LinuxTimer
SleepNature = "Busy"
SleepPercentage = 40
ExecutionMode = RealTimeThread
CPUMask = 0x100
Signals = {
Counter = {
Type = uint32
}
Time = {
Type = uint32
}
}
}
+EPICSCAInput_Th1 = {
Class = "EPICSCA::EPICSCAInput"
CPUMask = "0x100" //change from 200
StackSize = "10000000"
Signals = {
CCPS_OUTPUT_FREQ = {
PVName = "EC-GN-P01-GAF-CCPS:STAT-FREQ"
Type = float32
}
CCPS_OUTPUT_AMP = {
PVName = "EC-GN-P01-GAF-CCPS:STAT-AMP"
Type = float32
}
CCPS_OUTPUT_OFFS = {
PVName = "EC-GN-P01-GAF-CCPS:STAT-OFFS"
Type = float32
}
CSV_LOAD = {
PVName = "EC-GN-P01-GAF:STAT-CSV-LOAD"
Type = uint32
}
CSV_NAME = {
PVName = "EC-GN-P01-GAF:STAT-CSV-NAME"
Type = char8
NumberOfElements = 40
}
FHPS_AUTO_TAGV = {
PVName = "EC-GN-P01-GAF-FHPS:PSU2610-AUTO-TAGV"
Type = float32
}
FHPS_AUTO_TIME = {
PVName = "EC-GN-P01-GAF-FHPS:PSU2610-AUTO-RU-TIME"
Type = float32
}
FHPS_AUTO_START = {
PVName = "EC-GN-P01-GAF-FHPS:PSU2610-AUTO-START"
Type = uint32
}
FHPS_MANM = {
PVName = "EC-GN-P01-GAF-FHPS:STAT-MANM"
Type = uint32
}
GCPS_TRG_CURR_MANUAL = {
PVName = "EC-GN-P01-GAF-GCPS:PSU2130-TRG-CURR-SET-MI"
Type = float32
}
MCPS_TRG_CURR_MANUAL = {
PVName = "EC-GN-P01-GAF-MCPS:PSU2120-TRG-CURR-SET-MI"
Type = float32
}
BPS_MM = {
PVName = "EC-GN-P01-PB1F:STAT-MANM"
Type = uint32
}
BPS_MANUAL = {
PVName = "EC-GN-P01-PB1F:PSU1000-EREF-MSP"
Type = float32
}
APS_MM = {
PVName = "EC-GN-P01-PA1F:STAT-MANM"
Type = uint32
}
APS_MANUAL = {
PVName = "EC-GN-P01-PA1F:PSU3000-EREF-MSP"
Type = float32
}
MHVPS_MANUAL = {
PVName = "EC-GN-P01-PMF:PSU0000-EREF-MSP"
Type = float32
}
MHVPS_MM = {
PVName = "EC-GN-P01-PMF:STAT-MANM"
Type = uint32
}
MCPS_MM = {
PVName = "EC-GN-P01-GAF-MCPS:STAT-MANM"
Type = uint32
}
MCPS_TRG_CURR_MANUAL = {
PVName = "EC-GN-P01-GAF-MCPS:PSU2120-TRG-CURR-SET-MI"
Type = float32
}
GCPS_TRG_CURR_MANUAL = {
PVName = "EC-GN-P01-GAF-GCPS:PSU2130-TRG-CURR-SET-MI"
Type = float32
}
GCPS_MM = {
PVName = "EC-GN-P01-GAF-GCPS:STAT-MANM"
Type = uint32
}
PLC_STANDBY = {
PVName = "EC-GN-P01-GPS:PLC4110-YTS-ST1R"
Type = uint32
}
PLC_READY = {
PVName = "EC-GN-P01-GPS:PLC4110-YTS-ST2R"
Type = uint32
}
PLC_SELECT = {
PVName = "EC-GN-P01-GPS:PLC4110-CON-OPGY1"
Type = uint32
}
PLC_SYNCMODE = {
PVName = "EC-GN-P01-GPS:PLC4110-YSTA-MPSS"
Type = uint32
}
PLC_PERMIT = {
PVName = "EC-GN-P01-GPS:PLC4110-CON-GY1PRM"
Type = uint32
}
//PXI Board status PVs
PXI6259_0 = {
PVName = "EC-GN-HWCF:6259-0-STATUS"
Type = uint32
}
PXI6259_1 = {
PVName = "EC-GN-HWCF:6259-1-STATUS"
Type = uint32
}
PXI6528_0 = {
PVName = "EC-GN-HWCF:6528-0-STATUS"
Type = uint32
}
PXI6528_1 = {
PVName = "EC-GN-HWCF:6528-1-STATUS"
Type = uint32
}
PXI6368_0 = {
PVName = "EC-GN-HWCF:6368-0-STATUS"
Type = uint32
}
PXI6368_1 = {
PVName = "EC-GN-HWCF:6368-1-STATUS"
Type = uint32
}
MCPS_ACT_RB = {
PVName = "EC-GN-P01-GAF-MCPS:PSU2120-ACT-RB"
Type = uint32
}
GCPS_ACT_RB = {
PVName = "EC-GN-P01-GAF-GCPS:PSU2130-ACT-RB"
Type = uint32
}
FHPS_RU = {
PVName = "EC-GN-P01-GAF-FHPS:PSU2610-YTS-RUP"
Type = uint32
}
FHPS_MEAS_ACV = {
PVName = "EC-GN-P01-GAF-FHPS:PSU2610-MEAS-ACV"
Type = float32
}
PREP_MODE = {
PVName = "EC-GN-P01-GAF:STAT-PREP-MODE"
Type = uint32
}
RESET_FLT = {
PVName = "EC-GN-P01-GPF:STAT-RST-FLT"
Type = uint32
}
}
}
+EPICSCAOutput_Th1 = {
Class = "EPICSCA::EPICSCAOutput"
CPUMask = "0x100" //change from 0x200
StackSize = "10000000"
NumberOfBuffers = 2
Signals = {
PCF_STATE = {
PVName = "EC-GN-P01-GAF:STAT-SM"
Type = uint32
}
MCPS_ACT_SP = {
PVName = "EC-GN-P01-GAF-MCPS:PSU2120-ACT-SP-MO"
Type = uint32
}
GCPS_ACT_SP = {
PVName = "EC-GN-P01-GAF-GCPS:PSU2130-ACT-SP-MO"
Type = uint32
}
BPS_REF = {
PVName = "EC-GN-P01-PB1F:PSU1000-EREF"
Type = float32
}
APS_REF = {
PVName = "EC-GN-P01-PA1F:STAT-EREF-CONV.A"
Type = float32
}
MCPS_TRG_CURR_SET = {
PVName = "EC-GN-P01-GAF-MCPS:PSU2120-TRG-CURR-SET-MO"
Type = float32
}
MCPS_TRG_CURR_SET = {
PVName = "EC-GN-P01-GAF-MCPS:PSU2120-TRG-CURR-SET-MO"
Type = float32
}
FHPS_REF = {
PVName = "EC-GN-P01-GAF-FHPS:PSU2610-EREF"
Type = float32
}
CSV_LOADED = {
PVName = "EC-GN-P01-GAF:STAT-CSV-LOADED"
Type = uint32
}
CSV_ERR = {
PVName = "EC-GN-P01-GAF:STAT-CSV-ERR"
Type = uint32
}
ELAPSED_TIME = {
PVName = "EC-GN-P01-GAF:STAT-ELAPSED"
Type = uint32
}
HVARMED = {
PVName = "EC-GN-P01-GPF:PCF4210-YTS-GA1"
Type = uint32
}
HVINJECTION = {
PVName = "EC-GN-P01-GPF:PCF4210-YTS-GA2"
Type = uint32
}
RFON = {
PVName = "EC-GN-P01-GPF:PCF4210-YTS-GA3"
Type = uint32
}
MHVPS_REF = {
PVName = "EC-GN-P01-PMF:STAT-EREF-CALC.A"
Type = float32
}
PREP_TIME_WF = {
PVName = "EC-GN-P01-GAF:STAT-PREP-TIME-WF"
Type = int32
NumberOfElements = 8000
NumberOfDimensions = 1
}
MHVPS_PREP_WF = {
PVName = "EC-GN-P01-PMF:STAT-PREP-WF"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
BPS_PREP_WF = {
PVName = "EC-GN-P01-PB1F:STAT-PREP-WF"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
APS_PREP_WF = {
PVName = "EC-GN-P01-PA1F:STAT-PREP-WF"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
MCPS_PREP_WF = {
PVName = "EC-GN-P01-GAF-MCPS:STAT-PREP-WF"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GCPS_PREP_WF = {
PVName = "EC-GN-P01-GAF-GCPS:STAT-PREP-WF"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
FHPS_PREP_WF = {
PVName = "EC-GN-P01-GAF-FHPS:STAT-PREP-WF"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
CCPS_REF = {
PVName = "EC-GN-P01-GAF-CCPS:PSU2320-EREF"
Type = float32
}
MHVPS_STOP = {
PVName = "EC-GN-P01-PMF:PSU0000-COFF"
Type = uint32
}
APS_STOP = {
PVName = "EC-GN-P01-PA1F:PSU3000-CTRP"
Type = uint32
}
BPS_STOP = {
PVName = "EC-GN-P01-PB1F:PSU1000-CTRP"
Type = uint32
}
BEAM_ON_TIME = {
PVName = "EC-GN-P01-GAF:STAT-BEAMON-TIME"
Type = uint32
}
PCF_FLT = {
PVName = "EC-GN-P01-GPF:PCF4210-CTRP"
Type = uint32
}
PXI_FLT = {
PVName = "EC-GN-P01-GPS:PLC4110-RV2"
Type = uint32
}
BEAM_ON_STAT = {
PVName = "EC-GN-P01-GAFP:FMC4310-YSTA-GAOP"
Type = uint32
}
SHOT_ID = {
PVName = "EC-GN-P01-GAF:STAT-SHOT-ID"
Type = uint32
}
FHPS_AUTO_STAT = {
PVName = "EC-GN-P01-GAF-FHPS:PSU2610-AUTO-STAT"
Type = uint32
}
APS_HVON = {
PVName = "EC-GN-P01-PA1F:PSU3000-CON-HV"
Type = uint32
}
APS_SWON = {
PVName = "EC-GN-P01-PA1F:PSU3000-CON-SW"
Type = uint32
}
BPS_HVON = {
PVName = "EC-GN-P01-PB1F:PSU1000-CON-HV"
Type = uint32
}
BPS_SWON = {
PVName = "EC-GN-P01-PB1F:PSU1000-CON-SW"
Type = uint32
}
MHVPS_HVON = {
PVName = "EC-GN-P01-PMF:STAT-HVON-CALC.A"
Type = uint32
}
}
}

View File

@@ -1,419 +0,0 @@
+DDB2 = {
Class = GAMDataSource
AllowNoProducers = 1
ResetUnusedVariablesAtStateChange = 0
}
+TimerSDN = {
Class = LinuxTimer
SleepNature = "Busy"
SleepPercentage = 40
ExecutionMode = RealTimeThread
CPUMask = 0x200
Signals = {
Counter = {
Type = uint32
}
Time = {
Type = uint32
}
}
}
// for ESDN packet subscription/publication.
+SDNSubCommands = {
Class = SDN::SDNSubscriber
Topic = ECPC2SCUJA
Interface = SDN_IFACE
CPUs = 0x200 //change from 100
Locked = 1
Timeout = 2
Signals = {
Header = {
Type = uint8
NumberOfDimensions = 1
NumberOfElements = 48
}
ESDNHeaderVersionId = {
Type = uint8
NumberOfDimensions = 1
NumberOfElements = 1
}
ESDNHeaderSize = {
Type = uint8
NumberOfDimensions = 1
NumberOfElements = 1
}
ESDNStatus = {
Type = uint8
NumberOfDimensions = 1
NumberOfElements = 1
}
ESDNDoNotUse = {
Type = uint8
NumberOfDimensions = 1
NumberOfElements = 1
}
ESDNTime = {
Type = uint32
NumberOfDimensions = 1
NumberOfElements = 1
}
Command = {
Type = uint16
NumberOfDimensions = 1
NumberOfElements = 64
}
}
}
+SDNReply = {
Class = SDN::SDNPublisher
Topic = SCUJA2ECPC
Interface = SDN_IFACE
CPUs = 0x200 //changed from 0x100
Locked = 1
Signals = {
Header = {
Type = uint8
NumberOfElements = 48
}
ESDNHeaderVersionId = {
Type = uint8
NumberOfDimensions = 1
NumberOfElements = 1
}
ESDNHeaderSize = {
Type = uint8
NumberOfDimensions = 1
NumberOfElements = 1
}
ESDNStatus = {
Type = uint8
NumberOfDimensions = 1
NumberOfElements = 1
}
ESDNDoNotUse = {
Type = uint8
NumberOfDimensions = 1
NumberOfElements = 1
}
ESDNTime = {
Type = uint32
NumberOfDimensions = 1
NumberOfElements = 1
}
ReplyStatus = {
Type = uint16
NumberOfDimensions = 1
NumberOfElements = 1
}
ReplyWaveformAck = {
Type = uint16
NumberOfDimensions = 1
NumberOfElements = 1
}
//Status (26Bytes?) is not assigned
//GyrotronA measurements
//56Bytes are used as Gyrotron1 Measurements (verified on 2020/10/22)
GYA_MHVPS_MESVOLT = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYA_MHVPS_MESCURR = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYA_BPS_MESVOLT = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYA_BPS_MESCURR = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYA_APS_MESVOLT = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYA_APS_MESCURR = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYA_ARC1_MESVOLT = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYA_ARC1_MESCURR = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYA_ARC2_MESVOLT = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYA_ARC2_MESCURR = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYA_MCPS_CURR_MON = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYA_GCPS_CURR_MON = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYA_FHPS_MEAS_ACI = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYA_CCPS_MEAS_DCI = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
//GyrotronB measurements
GYB_MHVPS_MESVOLT = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYB_MHVPS_MESCURR = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYB_BPS_MESVOLT = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYB_BPS_MESCURR = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYB_APS_MESVOLT = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYB_APS_MESCURR = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYB_ARC1_MESVOLT = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYB_ARC1_MESCURR = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYB_ARC2_MESVOLT = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYB_ARC2_MESCURR = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYB_MCPS_CURR_MON = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYB_GCPS_CURR_MON = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYB_FHPS_MEAS_ACI = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
GYB_CCPS_MEAS_DCI = {
Type = float32
NumberOfDimensions = 1
NumberOfElements = 1
}
}
}
+EPICSCAInput_Th2 = {
Class = "EPICSCA::EPICSCAInput"
CPUMask = "0x100" //change from 200
StackSize = "10000000"
Signals = {
// Analog Input PVs.
GYA_BPS_MESVOLT = {
PVName = "EC-GN-P01-PB1F:PSU1000-ET"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYB_BPS_MESVOLT = {
PVName = "EC-GN-P01-PB2F:PSU2000-ET"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYA_BPS_MESCURR = {
PVName = "EC-GN-P01-PB1F:PSU1000-IT"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYB_BPS_MESCURR = {
PVName = "EC-GN-P01-PB2F:PSU2000-IT"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYA_APS_MESVOLT = {
PVName = "EC-GN-P01-PA1F:PSU3000-ET"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYB_APS_MESVOLT = {
PVName = "EC-GN-P01-PA2F:PSU4000-ET"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYA_APS_MESCURR = {
PVName = "EC-GN-P01-PA1F:PSU3000-IT"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYB_APS_MESCURR = {
PVName = "EC-GN-P01-PA2F:PSU4000-IT"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYA_ARC1_MESVOLT = {
PVName = "EC-GN-P01-GAF:MOE2810-ET"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYB_ARC1_MESVOLT = {
PVName = "EC-GN-P01-GBF:MOE2810-ET"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYA_ARC1_MESCURR = {
PVName = "EC-GN-P01-GAF:MOE2820-ET"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYB_ARC1_MESCURR = {
PVName = "EC-GN-P01-GBF:MOE2820-ET"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYA_ARC2_MESVOLT = {
PVName = "EC-GN-P01-GAF:MOE2830-ET"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYB_ARC2_MESVOLT = {
PVName = "EC-GN-P01-GBF:MOE2830-ET"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYA_ARC2_MESCURR = {
PVName = "EC-GN-P01-GAF:MRF2910-ET"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYB_ARC2_MESCURR = {
PVName = "EC-GN-P01-GBF:MRF2910-ET"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYA_MHVPS_MESVOLT = {
PVName = "EC-GN-P01-PMF:PSU0000-ET-GA"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYB_MHVPS_MESVOLT = {
PVName = "EC-GN-P01-PMF:PSU0000-ET-GB"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYA_MHVPS_MESCURR = {
PVName = "EC-GN-P01-PMF:PSU0000-IT-GA"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYB_MHVPS_MESCURR = {
PVName = "EC-GN-P01-PMF:PSU0000-IT-GB"
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYA_MCPS_CURR_MON = {
PVName = "EC-GN-P01-GAF-MCPS:PSU2120-CURR-MON"
Type = float32
}
GYA_GCPS_CURR_MON = {
PVName = "EC-GN-P01-GAF-GCPS:PSU2130-CURR-MON"
Type = float32
}
GYB_MCPS_CURR_MON = {
PVName = "EC-GN-P01-GBF-MCPS:PSU2120-CURR-MON"
Type = float32
}
GYB_GCPS_CURR_MON = {
PVName = "EC-GN-P01-GBF-GCPS:PSU2130-CURR-MON"
Type = float32
}
GYA_FHPS_MEAS_ACI = {
PVName = "EC-GN-P01-GAF-FHPS:PSU2610-MEAS-ACI"
Type = float32
}
GYB_FHPS_MEAS_ACI = {
PVName = "EC-GN-P01-GBF-FHPS:PSU2610-MEAS-ACI"
Type = float32
}
GYA_CCPS_MEAS_DCI = {
PVName = "EC-GN-P01-GAF-CCPS:PSU2320-MEAS-DCI"
Type = float32
}
GYB_CCPS_MEAS_DCI = {
PVName = "EC-GN-P01-GBF-CCPS:PSU2320-MEAS-DCI"
Type = float32
}
}
}

View File

@@ -1,296 +0,0 @@
+DDB3 = {
Class = GAMDataSource
AllowNoProducers = 1
ResetUnusedVariablesAtStateChange = 0
}
// Timer for thread 3 (RTStateMachineGAM execution cycle.)
+Timer = {
Class = LinuxTimer
SleepNature = "Busy"
SleepPercentage = 40
ExecutionMode = RealTimeThread
CPUMask = 0x400
Signals = {
Counter = {
Type = uint32
}
Time = {
Type = uint32
}
}
}
// Direct HW accesses. Follwing device/port assignment must be consistent with actual wiring.
// NI6259.0
// APS_SWON BoardId=0, PortId=3.0
+NI6259 = {
Class = NI6259::NI6259DIO
DeviceName = "/dev/pxi6259"
BoardId = 1
Signals = {
NI6259Value = {
Type = uint32
Mask = 0xFF
PortId = 0
}
}
}
//NI6528 digital output has logic low == 0 == close relay. ((See Driver Manual.)
//When the program send ON signal, this program writes 0 on the data source.
+NI6528P3 = {
Class = NI6528
DeviceName = "/dev/pxi6528.1"
Port = 3
NI6528P3Value = {
NI6528P3Value = {
Type = uint8
}
}
}
//P3.0 APS_HVON
//P3.1 APS_SWON
//P3.2 APS_Shutdown
//P3.3 BPS_HVON
//P3.4 BPS_SWON
//P3.5 BPS_Shutdown
//P3.6 GY1_Beam_ON_status
//P3.7 RV5 _cRIO
+NI6528P4 = {
Class = NI6528
DeviceName = "/dev/pxi6528.1"
Port = 4
NI6528P4Value = {
NI6528P4Value = {
Type = uint8
}
}
}
//P4.0 RV6 _cRIO
//P4.1 RV7 _cRIO
//P4.2 RV8 _cRIO
//P4.3 MHVPS_HVON
//P4.4 MHVPS_Shutdown
//P4.5 MHVPS_MOD
//P4.6 PCF_FLT
//P4.7 HVArmed
+NI6528P5 = {
Class = NI6528
DeviceName = "/dev/pxi6528.1"
Port = 5
NI6528P5Value = {
NI6528P5Value = {
Type = uint8
}
}
}
//P5.0 HVInjection
//P5.1 RFON
//P5.2 FHPS_Rampup_complete
//P5.3 SCM_RU_Complete
//P5.4 SCM_RD_Complete
//P5.5 CCPS_IN_OPERATION
//P5.6 None
//P5.7 None
+EPICSCAInput_Th3 = {
Class = "EPICSCA::EPICSCAInput"
CPUMask = "0x100" //change from 200
StackSize = "10000000"
Signals = {
MHVPS_DT = {
PVName = "EC-GN-P01-PMF:STAT-DT-HVON"
Type = uint32
}
APS_HVON_DT = {
PVName = "EC-GN-P01-PA1F:STAT-DT-HVON"
Type = uint32
}
APS_SWON_DT = {
PVName = "EC-GN-P01-PA1F:STAT-DT-SWON"
Type = uint32
}
BPS_HVON_DT = {
PVName = "EC-GN-P01-PB1F:STAT-DT-HVON"
Type = uint32
}
BPS_SWON_DT = {
PVName = "EC-GN-P01-PB1F:STAT-DT-SWON"
Type = uint32
}
SHOTLEN = {
PVName = "EC-GN-P01-GAF:STAT-DT-SHOTLEN"
Type = uint32
}
PLC_ON = {
PVName = "EC-GN-P01-GPS:PLC4110-YTS-ST3R"
Type = uint32
}
GYA_APS_FLT = {
PVName = "EC-GN-P01-PA1F:PSU3000-YFLT"
Type = uint32
}
GYB_APS_FLT = {
PVName = "EC-GN-P01-PA2F:PSU4000-YFLT"
Type = uint32
}
GYA_BPS_FLT = {
PVName = "EC-GN-P01-PB1F:PSU1000-YFLT"
Type = uint32
}
GYB_BPS_FLT = {
PVName = "EC-GN-P01-PB2F:PSU2000-YFLT"
Type = uint32
}
MHVPS_OV = {
PVName = "EC-GN-P01-GAFP:FMC4310-YFLT-OC"
Type = uint32
}
MHVPS_OC = {
PVName = "EC-GN-P01-GAFP:FMC4310-YFLT-OV"
Type = uint32
}
MHVPS_FLT = {
PVName = "EC-GN-P01-PMF:PSU0000-YFLT"
Type = uint32
}
MIS_ITL = {
PVName = "EC-GN-P01-GAFP:FMC4310-YTRP"
Type = uint32
}
MISB_ITL = {
PVName = "EC-GN-P01-GBFP:FMC4310-YTRP"
Type = uint32
}
PLC_ITL = {
PVName = "EC-GN-P01-GPS:PLC4110-YTRP"
Type = uint32
}
PLC_MODE1 = {
PVName = "EC-GN-P01-GPS:PLC4110-YTS-MD1"
Type = uint32
}
PLC_MODE2 = {
PVName = "EC-GN-P01-GPS:PLC4110-YTS-MD2"
Type = uint32
}
PLC_MODE3 = {
PVName = "EC-GN-P01-GPS:PLC4110-YTS-MD3"
Type = uint32
}
PLC_MODE4 = {
PVName = "EC-GN-P01-GPS:PLC4110-YTS-MD4"
Type = uint32
}
MD1_SHOTLEN_LIM = {
PVName = "EC-GN-P01-GPF:STAT-MD1-LIM"
Type = uint32
}
MD2_SHOTLEN_LIM = {
PVName = "EC-GN-P01-GPF:STAT-MD2-LIM"
Type = uint32
}
MD3_SHOTLEN_LIM = {
PVName = "EC-GN-P01-GPF:STAT-MD3-LIM"
Type = uint32
}
MD4_SHOTLEN_LIM = {
PVName = "EC-GN-P01-GPF:STAT-MD4-LIM"
Type = uint32
}
RFON = {
PVName = "EC-GN-P01-GPF:PCF4210-YTS-GA3"
Type = uint32
}
APS_HVON = {
PVName = "EC-GN-P01-PA1F:PSU3000-CON-HV"
Type = uint32
}
APS_SWON = {
PVName = "EC-GN-P01-PA1F:PSU3000-CON-SW"
Type = uint32
}
APS_STOP = {
PVName = "EC-GN-P01-PA1F:PSU3000-CTRP"
Type = uint32
}
BPS_HVON = {
PVName = "EC-GN-P01-PB1F:PSU1000-CON-HV"
Type = uint32
}
BPS_SWON = {
PVName = "EC-GN-P01-PB1F:PSU1000-CON-SW"
Type = uint32
}
BPS_STOP = {
PVName = "EC-GN-P01-PB1F:PSU1000-CTRP"
Type = uint32
}
BEAM_ON_STAT = {
PVName = "EC-GN-P01-GAFP:FMC4310-YSTA-GAOP"
Type = uint32
}
DO_REV5 = {
PVName = "EC-GN-P01-GAFP:FMC4310-RV5"
Type = uint32
}
DO_REV6 = {
PVName = "EC-GN-P01-GAFP:FMC4310-RV6"
Type = uint32
}
DO_REV7 = {
PVName = "EC-GN-P01-GAFP:FMC4310-RV7"
Type = uint32
}
DO_REV8 = {
PVName = "EC-GN-P01-GAFP:FMC4310-RV8"
Type = uint32
}
MHVPS_HVON = {
PVName = "EC-GN-P01-PMF:PSU0000-CON-SW"
Type = uint32
}
MHVPS_MODSW = {
PVName = "EC-GN-P01-PMF:PSU0000-CON-MOD"
Type = uint32
}
PCF_FLT = {
PVName = "EC-GN-P01-GPF:PCF4210-CTRP"
Type = uint32
}
PXI_FLT = {
PVName = "EC-GN-P01-GPS:PLC4110-RV2"
Type = uint32
}
HVARMED = {
PVName = "EC-GN-P01-GPF:PCF4210-YTS-GA1"
Type = uint32
}
HVINJECTION = {
PVName = "EC-GN-P01-GPF:PCF4210-YTS-GA2"
Type = uint32
}
SHORT_PULSE_MODE = {
PVName = "EC-GN-P01-GAF:STAT-SHORT-PULSE"
Type = uint32
}
FHPS_RU = {
PVName = "EC-GN-P01-GAF-FHPS:PSU2610-YTS-RUP"
Type = uint32
}
SCM_RU = {
PVName = "EC-GN-P01-GAF-MCPS:PSU2120-YTS-RUP"
Type = uint32
}
SCM_RD = {
PVName = "EC-GN-P01-GAF-MCPS:PSU2120-YTS-RDOWN"
Type = uint32
}
CCPS_IN_OPERATION = {
PVName = "EC-GN-P01-GAF-CCPS:PSU2320-TR"
Type = uint32
}
}
}

View File

@@ -1,20 +0,0 @@
+DDB4 = {
Class = GAMDataSource
AllowNoProducers = 1
ResetUnusedVariablesAtStateChange = 0
}
+Timer10Hz = {
Class = LinuxTimer
SleepNature = "Busy"
SleepPercentage = 40
ExecutionMode = RealTimeThread
CPUMask = 0x800
Signals = {
Counter = {
Type = uint32
}
Time = {
Type = uint32
}
}
}

View File

@@ -1,518 +0,0 @@
// Timer for SDN thread.
+TimeSDNGAM = {
Class = IOGAM
InputSignals = {
Time = {
DataSource = TimerSDN
Type = uint32
}
Counter = {
DataSource = TimerSDN
Type = uint32
Frequency = 1000 //operation:1k(=1ms cyc), debug:10
}
GYA_BPS_MESVOLT = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYB_BPS_MESVOLT = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYA_BPS_MESCURR = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYB_BPS_MESCURR = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYA_APS_MESVOLT = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYB_APS_MESVOLT = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYA_APS_MESCURR = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYB_APS_MESCURR = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYA_ARC1_MESVOLT = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYB_ARC1_MESVOLT = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYA_ARC1_MESCURR = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYB_ARC1_MESCURR = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYA_ARC2_MESVOLT = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYB_ARC2_MESVOLT = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYA_ARC2_MESCURR = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYB_ARC2_MESCURR = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYA_MHVPS_MESVOLT = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYB_MHVPS_MESVOLT = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYA_MHVPS_MESCURR = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYB_MHVPS_MESCURR = {
DataSource = EPICSCAInput_Th2
Ranges = {{0 0}}
}
GYA_MCPS_CURR_MON = {
DataSource = EPICSCAInput_Th2
}
GYB_MCPS_CURR_MON = {
DataSource = EPICSCAInput_Th2
}
GYA_GCPS_CURR_MON = {
DataSource = EPICSCAInput_Th2
}
GYB_GCPS_CURR_MON = {
DataSource = EPICSCAInput_Th2
}
GYA_FHPS_MEAS_ACI = {
DataSource = EPICSCAInput_Th2
}
GYB_FHPS_MEAS_ACI = {
DataSource = EPICSCAInput_Th2
}
GYA_CCPS_MEAS_DCI = {
DataSource = EPICSCAInput_Th2
}
GYB_CCPS_MEAS_DCI = {
DataSource = EPICSCAInput_Th2
}
}
OutputSignals = {
TimeSDN = {
DataSource = DDB2
Type = uint32
}
CounterSDN = {
DataSource = DDB2
Type = uint32
}
GYA_BPS_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYB_BPS_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYA_BPS_MESCURR = {
DataSource = DDB2
Type = float32
}
GYB_BPS_MESCURR = {
DataSource = DDB2
Type = float32
}
GYA_APS_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYB_APS_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYA_APS_MESCURR = {
DataSource = DDB2
Type = float32
}
GYB_APS_MESCURR = {
DataSource = DDB2
Type = float32
}
GYA_ARC1_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYB_ARC1_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYA_ARC1_MESCURR = {
DataSource = DDB2
Type = float32
}
GYB_ARC1_MESCURR = {
DataSource = DDB2
Type = float32
}
GYA_ARC2_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYB_ARC2_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYA_ARC2_MESCURR = {
DataSource = DDB2
Type = float32
}
GYB_ARC2_MESCURR = {
DataSource = DDB2
Type = float32
}
GYA_MHVPS_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYB_MHVPS_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYA_MHVPS_MESCURR = {
DataSource = DDB2
Type = float32
}
GYB_MHVPS_MESCURR = {
DataSource = DDB2
Type = float32
}
GYA_MCPS_CURR_MON = {
DataSource = DDB2
Type = float32
}
GYB_MCPS_CURR_MON = {
DataSource = DDB2
Type = float32
}
GYA_GCPS_CURR_MON = {
DataSource = DDB2
Type = float32
}
GYB_GCPS_CURR_MON = {
DataSource = DDB2
Type = float32
}
GYA_FHPS_MEAS_ACI = {
DataSource = DDB2
Type = float32
}
GYB_FHPS_MEAS_ACI = {
DataSource = DDB2
Type = float32
}
GYA_CCPS_MEAS_DCI = {
DataSource = DDB2
Type = float32
}
GYB_CCPS_MEAS_DCI = {
DataSource = DDB2
Type = float32
}
}
}
//GAM for SDN communication.(ProcessWF:thread1, Subscribe/Publish:thread2)
+SDNCommandGAM = {
Class = IOGAM
InputSignals = {
Command = {
DataSource = SDNSubCommands
Type = uint16
NumberOfDimensions = 1
NumberOfElements = 64
Ranges = {{0 0}}
// TODO uncomment this for release/testing
//Frequency = 1
}
ESDNTime = {
DataSource = SDNSubCommands
Type = uint32
NumberOfDimensions = 1
NumberOfElements = 1
}
}
OutputSignals = {
Command = {
DataSource = DDB2
Type = uint16
}
ESDNTime = {
DataSource = DDB2
Type = uint32
}
}
}
+SDNReplyGAM = {
Class = IOGAM
InputSignals = {
ESDNTime = {
DataSource = DDB2
Type = uint32
}
WaveformPacketID = {
DataSource = DDB2
Type = uint16
}
GYA_BPS_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYB_BPS_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYA_BPS_MESCURR = {
DataSource = DDB2
Type = float32
}
GYB_BPS_MESCURR = {
DataSource = DDB2
Type = float32
}
GYA_APS_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYB_APS_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYA_APS_MESCURR = {
DataSource = DDB2
Type = float32
}
GYB_APS_MESCURR = {
DataSource = DDB2
Type = float32
}
GYA_ARC1_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYB_ARC1_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYA_ARC1_MESCURR = {
DataSource = DDB2
Type = float32
}
GYB_ARC1_MESCURR = {
DataSource = DDB2
Type = float32
}
GYA_ARC2_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYB_ARC2_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYA_ARC2_MESCURR = {
DataSource = DDB2
Type = float32
}
GYB_ARC2_MESCURR = {
DataSource = DDB2
Type = float32
}
GYA_MHVPS_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYB_MHVPS_MESVOLT = {
DataSource = DDB2
Type = float32
}
GYA_MHVPS_MESCURR = {
DataSource = DDB2
Type = float32
}
GYB_MHVPS_MESCURR = {
DataSource = DDB2
Type = float32
}
GYA_MCPS_CURR_MON = {
DataSource = DDB2
Type = float32
}
GYB_MCPS_CURR_MON = {
DataSource = DDB2
Type = float32
}
GYA_GCPS_CURR_MON = {
DataSource = DDB2
Type = float32
}
GYB_GCPS_CURR_MON = {
DataSource = DDB2
Type = float32
}
GYA_FHPS_MEAS_ACI = {
DataSource = DDB2
Type = float32
}
GYB_FHPS_MEAS_ACI = {
DataSource = DDB2
Type = float32
}
GYA_CCPS_MEAS_DCI = {
DataSource = DDB2
Type = float32
}
GYB_CCPS_MEAS_DCI = {
DataSource = DDB2
Type = float32
}
Command = {
DataSource = DDB2
Type = uint16
}
GYA_MCPS_CURR_MON = {
DataSource = DDB2
Type = float32
}
GYA_GCPS_CURR_MON = {
DataSource = DDB2
Type = float32
}
}
OutputSignals = {
ESDNTime = {
DataSource = SDNReply
Type = uint32
Trigger = 1
}
ReplyWaveformAck = {
DataSource = SDNReply
Type = uint16
}
GYA_BPS_MESVOLT = {
DataSource = SDNReply
}
GYB_BPS_MESVOLT = {
DataSource = SDNReply
}
GYA_BPS_MESCURR = {
DataSource = SDNReply
}
GYB_BPS_MESCURR = {
DataSource = SDNReply
}
GYA_APS_MESVOLT = {
DataSource = SDNReply
}
GYB_APS_MESVOLT = {
DataSource = SDNReply
}
GYA_APS_MESCURR = {
DataSource = SDNReply
}
GYB_APS_MESCURR = {
DataSource = SDNReply
}
GYA_ARC1_MESVOLT = {
DataSource = SDNReply
}
GYB_ARC1_MESVOLT = {
DataSource = SDNReply
}
GYA_ARC1_MESCURR = {
DataSource = SDNReply
}
GYB_ARC1_MESCURR = {
DataSource = SDNReply
}
GYA_ARC2_MESVOLT = {
DataSource = SDNReply
}
GYB_ARC2_MESVOLT = {
DataSource = SDNReply
}
GYA_ARC2_MESCURR = {
DataSource = SDNReply
}
GYB_ARC2_MESCURR = {
DataSource = SDNReply
}
GYA_MHVPS_MESVOLT = {
DataSource = SDNReply
}
GYB_MHVPS_MESVOLT = {
DataSource = SDNReply
}
GYA_MHVPS_MESCURR = {
DataSource = SDNReply
}
GYB_MHVPS_MESCURR = {
DataSource = SDNReply
}
GYA_MCPS_CURR_MON = {
DataSource = SDNReply
}
GYB_MCPS_CURR_MON = {
DataSource = SDNReply
}
GYA_GCPS_CURR_MON = {
DataSource = SDNReply
}
GYB_GCPS_CURR_MON = {
DataSource = SDNReply
}
GYA_FHPS_MEAS_ACI = {
DataSource = SDNReply
}
GYB_FHPS_MEAS_ACI = {
DataSource = SDNReply
}
GYA_CCPS_MEAS_DCI = {
DataSource = SDNReply
}
GYB_CCPS_MEAS_DCI = {
DataSource = SDNReply
}
Command = {
DataSource = TriggerAsyncBridge
Type = uint16
}
GYA_MCPS_CURR_MON = {
DataSource = RealTimeThreadAsyncBridge
Type = float32
}
GYA_GCPS_CURR_MON = {
DataSource = RealTimeThreadAsyncBridge
Type = float32
}
}
}

View File

@@ -1,80 +0,0 @@
+Timer10HzGAM = {
Class = IOGAM
InputSignals = {
Counter = {
DataSource = Timer10Hz
Type = uint32
Frequency = 1 //Hz
}
Time = {
DataSource = Timer10Hz
Type = uint32
}
}
OutputSignals = {
Counter10Hz = {
DataSource = DDB4
Type = uint32
}
Time1Hz = {
DataSource = DDB4
Type = uint32
}
}
}
+GAMExecTime = {//debug
Class = IOGAM
InputSignals = {
GAMEPICSCA_ExecTime = {
DataSource = Timings
Type = uint32
}
StopRequestGAM_ExecTime = {
DataSource = Timings
Type = uint32
}
ModeLimitGAM_ExecTime = {
DataSource = Timings
Type = uint32
}
NI6528P3GAM_ExecTime = {
DataSource = Timings
Type = uint32
}
terminalInterfaceGAM_ExecTime = {
DataSource = Timings
Type = uint32
}
GAMRealTimeStateMachine_ExecTime = {
DataSource = Timings
Type = uint32
}
}
OutputSignals = {
GAMEPICSCA_ExecTime = {
DataSource = Display
Type = uint32
}
StopRequestGAM_ExecTime = {
DataSource = Display
Type = uint32
}
ModeLimitGAM_ExecTime = {
DataSource = Display
Type = uint32
}
NI6528P3GAM_ExecTime = {
DataSource = Display
Type = uint32
}
terminalInterfaceGAM_ExecTime = {
DataSource = Display
Type = uint32
}
GAMRealTimeStateMachine_ExecTime = {
DataSource = Display
Type = uint32
}
}
}

View File

@@ -1,786 +0,0 @@
// StateMachine node
+StateMachine = {
Class = StateMachine
+INITIAL = {
Class = ReferenceContainer
+Start = {
Class = StateMachineEvent
NextState = "WAITSTANDBY"
NextStateError = "ERROR"
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
}
+DISABLED = {
Class = ReferenceContainer
+GoWaitStandby = {
Class = StateMachineEvent
NextState = "WAITSTANDBY"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoError = {
Class = StateMachineEvent
NextState = "ERROR"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
}
+WAITSTANDBY = {
Class = ReferenceContainer
+GoWaitReady = {
Class = StateMachineEvent
NextState = "WAITREADY"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitReady
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoDisabled = {
Class = StateMachineEvent
NextState = "DISABLED"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = Disabled
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoError = {
Class = StateMachineEvent
NextState = "ERROR"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
}
+WAITREADY = {
Class = ReferenceContainer
+GoWaitStandby = {
Class = StateMachineEvent
NextState = "WAITSTANDBY"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoWaitPermit = {
Class = StateMachineEvent
NextState = "WAITPERMIT"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitPermit
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoError = {
Class = StateMachineEvent
NextState = "ERROR"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
}
+WAITPERMIT = {
Class = ReferenceContainer
+GoWaitReady = {
Class = StateMachineEvent
NextState = "WAITREADY"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitReady
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoWaitHVON = {
Class = StateMachineEvent
NextState = "WAITHVON"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitHVON
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoWaitHVON_SDN = {
Class = StateMachineEvent
NextState = "WAITHVON_SDN"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitHVON_SDN
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoWaitHVON_PREP = {
Class = StateMachineEvent
NextState = "WAITHVON_PREP"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitHVON_PREP
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoWaitHVON_SDN_PREP = {
Class = StateMachineEvent
NextState = "WAITHVON_SDN_PREP"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitHVON_SDN_PREP
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoError = {
Class = StateMachineEvent
NextState = "ERROR"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
}
// HVPS sequence control states.
+WAITHVON = {
Class = ReferenceContainer
+GoWaitStandby = {
Class = StateMachineEvent
NextState = "WAITSTANDBY"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoWaitPermit = {
Class = StateMachineEvent
NextState = "WAITPERMIT"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitPermit
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoError = {
Class = StateMachineEvent
NextState = "ERROR"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
}
+WAITHVON_SDN = {
Class = ReferenceContainer
+GoWaitStandby = {
Class = StateMachineEvent
NextState = "WAITSTANDBY"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoWaitPermit = {
Class = StateMachineEvent
NextState = "WAITPERMIT"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitPermit
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoError = {
Class = StateMachineEvent
NextState = "ERROR"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
}
+WAITHVON_PREP = {
Class = ReferenceContainer
+GoWaitStandby = {
Class = StateMachineEvent
NextState = "WAITSTANDBY"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoWaitPermit = {
Class = StateMachineEvent
NextState = "WAITPERMIT"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitPermit
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoError = {
Class = StateMachineEvent
NextState = "ERROR"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
}
+WAITHVON_SDN_PREP = {
Class = ReferenceContainer
+GoWaitStandby = {
Class = StateMachineEvent
NextState = "WAITSTANDBY"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoWaitPermit = {
Class = StateMachineEvent
NextState = "WAITPERMIT"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitPermit
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
+GoError = {
Class = StateMachineEvent
NextState = "ERROR"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
}
// Error State (Enter by HVPS errors)
+ERROR = {
Class = ReferenceContainer
+GoWaitStandby = {
Class = StateMachineEvent
NextState = "WAITSTANDBY"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StopCurrentStateExecution
Mode = ExpectsReply
}
+PrepareNextStateMsg = {
Class = Message
Destination = JAGyrotronRTApp
Mode = ExpectsReply
Function = PrepareNextState
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = JAGyrotronRTApp
Function = StartNextStateExecution
Mode = ExpectsReply
}
}
}
}

View File

@@ -1,37 +0,0 @@
+Disabled = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+Thread1 = {
Class = RealTimeThread
Functions = {
Timer1kHzGAM
InDisabledGAM
CCPSWaveformGAM
ChoiseGAM MCPSGAM GCPSGAM
PXI6368Error03GAM PXI6368Error04GAM PXI6259ErrorGAM PXIErrorGAM
EPICSOutputGAM
GoErrorGAM GoWaitStandbyGAM
}
CPUs = TH1_CPU
}
+Thread2 = {
Class = RealTimeThread
Functions = {
TimeSDNGAM SDNCommandGAM SDNReplyGAM
}
CPUs = TH2_CPU
}
+Thread3 = {
Class = RealTimeThread
Functions = {
Timer100kHzGAM
NI6528P3GAM NI6528P4GAM NI6528P5GAM
NI6528P3PV2PortGAM NI6528P4PV2PortGAM NI6528P5PV2PortGAM
NI6528P3WriteGAM NI6528P4WriteGAM NI6528P5WriteGAM
ShareOutGAM
}
CPUs = TH3_CPU
}
}
}

View File

@@ -1,39 +0,0 @@
+Error = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+Thread1 = {
Class = RealTimeThread
Functions = {
Timer1kHzGAM
InErrorGAM
CCPSWaveformGAM FHPSRampupGAM
ChoiseGAM
PXI6368Error03GAM PXI6368Error04GAM PXI6259ErrorGAM PXIErrorGAM
EPICSOutputGAM
ExitedHVArmedInjectionRFONGAM ResetPSsGAM ErrorGAM
EPICSOutputGAM
FromErrorToWaitStandbyGAM
}
CPUs = TH1_CPU
}
+Thread2 = {
Class = RealTimeThread
Functions = {
TimeSDNGAM SDNCommandGAM SDNReplyGAM
}
CPUs = TH2_CPU
}
+Thread3 = {
Class = RealTimeThread
Functions = {
Timer100kHzGAM
NI6528P3GAM NI6528P4GAM NI6528P5GAM
NI6528P3PV2PortGAM NI6528P4PV2PortGAM NI6528P5PV2PortGAM
NI6528P3WriteGAM NI6528P4WriteGAM NI6528P5WriteGAM
ShareOutGAM
}
CPUs = TH3_CPU
}
}
}

View File

@@ -1,39 +0,0 @@
+WaitHVON = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+Thread1 = {
Class = RealTimeThread
Functions = {
Timer1kHzGAM
InWaitHVONGAM
CCPSWaveformGAM FHPSRampupGAM
ChoiseGAM
PXI6368Error03GAM PXI6368Error04GAM PXI6259ErrorGAM PXIErrorGAM
EPICSOutputGAM
FromWaitHVONToWaitStandby FromWaitHVONToWaitPermit GoErrorGAM
}
CPUs = TH1_CPU
}
+Thread2 = {
Class = RealTimeThread
Functions = {
TimeSDNGAM SDNCommandGAM SDNReplyGAM
}
CPUs = TH2_CPU
}
+Thread3 = {
Class = RealTimeThread
Functions = {
Timer100kHzGAM
StopRequestGAM ModeLimitGAM
GAMRealTimeStateMachine
NI6528P5GAM
NI6528P5PV2PortGAM
NI6528P5WriteGAM
ShareOutGAM
}
CPUs = TH3_CPU
}
}
}

View File

@@ -1,39 +0,0 @@
+WaitHVON_PREP = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+Thread1 = {
Class = RealTimeThread
Functions = {
Timer1kHzGAM
InWaitHVON_PREPGAM
CCPSWaveformGAM PreProgrammedGAM FHPSRampupGAM
ChoiseGAM
PXI6368Error03GAM PXI6368Error04GAM PXI6259ErrorGAM PXIErrorGAM
EPICSOutputGAM
FromWaitHVONToWaitStandby FromWaitHVONToWaitPermit GoErrorGAM
}
CPUs = TH1_CPU
}
+Thread2 = {
Class = RealTimeThread
Functions = {
TimeSDNGAM SDNCommandGAM SDNReplyGAM
}
CPUs = TH2_CPU
}
+Thread3 = {
Class = RealTimeThread
Functions = {
Timer100kHzGAM
StopRequestGAM ModeLimitGAM
GAMRealTimeStateMachine
NI6528P5GAM
NI6528P5PV2PortGAM
NI6528P5WriteGAM
ShareOutGAM
}
CPUs = TH3_CPU
}
}
}

View File

@@ -1,40 +0,0 @@
+WaitHVON_SDN = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+Thread1 = {
Class = RealTimeThread
Functions = {
Timer1kHzGAM
InWaitHVON_SDNGAM
CCPSWaveformGAM FHPSRampupGAM
ChoiseGAM
PXI6368Error03GAM PXI6368Error04GAM PXI6259ErrorGAM PXIErrorGAM
EPICSOutputGAM
FromWaitHVONToWaitStandby FromWaitHVONToWaitPermit GoErrorGAM
}
CPUs = TH1_CPU
}
+Thread2 = {
Class = RealTimeThread
Functions = {
TimeSDNGAM SDNCommandGAM SDNReplyGAM
}
CPUs = TH2_CPU
}
+Thread3 = {
Class = RealTimeThread
Functions = {
Timer100kHzGAM
StopRequestGAM ModeLimitGAM
GAMSDNRealTimeStateMachine
NI6528P3GAM NI6528P4GAM NI6528P5GAM
TerminalInterfaceGAM
NI6528P5PV2PortGAM
NI6528P5WriteGAM
ShareOutGAM
}
CPUs = TH3_CPU
}
}
}

View File

@@ -1,40 +0,0 @@
+WaitHVON_SDN_PREP = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+Thread1 = {
Class = RealTimeThread
Functions = {
Timer1kHzGAM
InWaitHVON_SDN_PREPGAM
CCPSWaveformGAM PreProgrammedGAM FHPSRampupGAM
ChoiseGAM
PXI6368Error03GAM PXI6368Error04GAM PXI6259ErrorGAM PXIErrorGAM
EPICSOutputGAM
FromWaitHVONToWaitStandby FromWaitHVONToWaitPermit GoErrorGAM
}
CPUs = TH1_CPU
}
+Thread2 = {
Class = RealTimeThread
Functions = {
TimeSDNGAM SDNCommandGAM SDNReplyGAM
}
CPUs = TH2_CPU
}
+Thread3 = {
Class = RealTimeThread
Functions = {
Timer100kHzGAM
StopRequestGAM ModeLimitGAM
GAMSDNRealTimeStateMachine
NI6528P3GAM NI6528P4GAM NI6528P5GAM
TerminalInterfaceGAM
NI6528P5PV2PortGAM
NI6528P5WriteGAM
ShareOutGAM
}
CPUs = TH3_CPU
}
}
}

View File

@@ -1,38 +0,0 @@
+WaitPermit = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+Thread1 = {
Class = RealTimeThread
Functions = {
Timer1kHzGAM
InWaitPermitGAM
CCPSWaveformGAM WFRecordGAM PreProgrammedGAM FHPSRampupGAM
ChoiseGAM
PXI6368Error03GAM PXI6368Error04GAM PXI6259ErrorGAM PXIErrorGAM
EPICSOutputGAM
GoWaitHVONGAM GoWaitHVON_PREP_GAM GoWaitHVON_SDN_GAM GoWaitHVON_SDN_PREP_GAM GoWaitReadyFromWaitPermitGAM GoErrorGAM
}
CPUs = TH1_CPU
}
+Thread2 = {
Class = RealTimeThread
Functions = {
TimeSDNGAM SDNCommandGAM SDNReplyGAM
}
CPUs = TH2_CPU
}
+Thread3 = {
Class = RealTimeThread
Functions = {
Timer100kHzGAM
NI6528P3GAM NI6528P4GAM NI6528P5GAM
NI6528P3PV2PortGAM NI6528P4PV2PortGAM NI6528P5PV2PortGAM
NI6528P3WriteGAM NI6528P4WriteGAM NI6528P5WriteGAM
ShareOutGAM
}
CPUs = TH3_CPU
}
}
}

View File

@@ -1,37 +0,0 @@
+WaitReady = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+Thread1 = {
Class = RealTimeThread
Functions = {
Timer1kHzGAM
InWaitReadyGAM
CCPSWaveformGAM WFRecordGAM PreProgrammedGAM FHPSRampupGAM
ChoiseGAM
PXI6368Error03GAM PXI6368Error04GAM PXI6259ErrorGAM PXIErrorGAM
EPICSOutputGAM
GoWaitPermitGAM GoWaitStandbyFromReadyGAM GoErrorGAM
}
CPUs = TH1_CPU
}
+Thread2 = {
Class = RealTimeThread
Functions = {
TimeSDNGAM SDNCommandGAM SDNReplyGAM
}
CPUs = TH2_CPU
}
+Thread3 = {
Class = RealTimeThread
Functions = {
Timer100kHzGAM
NI6528P3GAM NI6528P4GAM NI6528P5GAM
NI6528P3PV2PortGAM NI6528P4PV2PortGAM NI6528P5PV2PortGAM
NI6528P3WriteGAM NI6528P4WriteGAM NI6528P5WriteGAM
ShareOutGAM
}
CPUs = TH3_CPU
}
}
}

View File

@@ -1,37 +0,0 @@
+WaitStandby = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+Thread1 = {
Class = RealTimeThread
Functions = {
Timer1kHzGAM
InWaitStandbyGAM
CCPSWaveformGAM FHPSRampupGAM
ChoiseGAM MCPSGAM GCPSGAM
PXI6368Error03GAM PXI6368Error04GAM PXI6259ErrorGAM PXIErrorGAM
EPICSOutputGAM
GoDisabledGAM GoWaitReadyGAM GoErrorGAM
}
CPUs = TH1_CPU
}
+Thread2 = {
Class = RealTimeThread
Functions = {
TimeSDNGAM SDNCommandGAM SDNReplyGAM
}
CPUs = TH2_CPU
}
+Thread3 = {
Class = RealTimeThread
Functions = {
Timer100kHzGAM
NI6528P3GAM NI6528P4GAM NI6528P5GAM
NI6528P3PV2PortGAM NI6528P4PV2PortGAM NI6528P5PV2PortGAM
NI6528P3WriteGAM NI6528P4WriteGAM NI6528P5WriteGAM
ShareOutGAM
}
CPUs = TH3_CPU
}
}
}

View File

@@ -23,7 +23,9 @@
#############################################################
#Named of the unit files to be compiled
OBJSX=JAGyrotronA_FY19_P1.x
OBJSX=JARF01App.x
MDT=mdt
SOURCES=src/*.marte src/state_machine/*.marte src/data/*.marte src/thread1/*.marte src/thread2/*.marte src/thread3/*.marte src/thread4/*.marte src/thread5/*.marte src/thread6/*.marte
#Location of the Build directory where the configuration file will be written to
BUILD_DIR?=.
@@ -36,7 +38,7 @@ MAKEDEFAULTDIR=$(MARTe2_DIR)/MakeDefaults
include $(MAKEDEFAULTDIR)/MakeStdLibDefs.$(TARGET)
all: $(OBJS)
echo $(OBJS)
$(MDT) build $(SOURCES) -o $(BUILD_DIR)/$(OBJSX)
include $(MAKEDEFAULTDIR)/MakeStdLibRules.$(TARGET)

View File

@@ -0,0 +1,99 @@
#package jada_gyro
+WebRoot = {
Class = HttpObjectBrowser
Root = "."
+ObjectBrowse = {
Class = HttpObjectBrowser
Root = "/"
}
+ResourcesHtml = {
Class = HttpDirectoryResource
BaseDir = "/opt/marte2-core/Resources/HTTP"
}
+Monitor = {
Class = HttpDataMonitor
Plot0 = {
APS_HVON = {
Component = RTApp.Data.DDB3
Signal = "Signals.APS_HVON"
}
APS_SWON = {
Component = RTApp.Data.DDB3
Signal = "Signals.APS_SWON"
}
BPS_HVON = {
Component = RTApp.Data.DDB3
Signal = "Signals.BPS_HVON"
}
BPS_SWON = {
Component = RTApp.Data.DDB3
Signal = "Signals.BPS_SWON"
}
HVPS_HVON = {
Component = RTApp.Data.DDB3
Signal = "Signals.MHVPS_HVON"
}
}
}
}
+WebServer = {
Class = HttpService
Port = 8084
WebRoot = WebRoot
Timeout = 0
ListenMaxConnections = 255
AcceptTimeout = 1000
MaxNumberOfThreads = 8
MinNumberOfThreads = 1
}
//# Main Operational State Machine
+StateMachine = {
Class = StateMachine
}
//# MARTe RealTime Application
+RTApp = {
Class = RealTimeApplication
+Data = {
Class = ReferenceContainer
DefaultDataSource = DDB1
//# GAM Datasource for Thread 1
+DDB1 = {
Class = GAMDataSource
AllowNoProducers = 1
ResetUnusedVariablesAtStateChange = 0
}
//# GAMDatasource for thread 2
+DDB2 = {
Class = GAMDataSource
AllowNoProducers = 1
ResetUnusedVariablesAtStateChange = 0
}
//# GAMDatasource for thread 3
+DDB3 = {
Class = GAMDataSource
AllowNoProducers = 1
ResetUnusedVariablesAtStateChange = 0
}
+DDB6 = {
Class = GAMDataSource
}
+Timings = {
Class = TimingDataSource
}
}
+Functions = {
Class = ReferenceContainer
}
+States = {
Class = ReferenceContainer
}
+Scheduler = {
Class = GAMScheduler
TimingDataSource = Timings
}
}

View File

@@ -0,0 +1,632 @@
#package jada_gyro.RTApp.States
+Disabled = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+EPICSThread = {
Class = RealTimeThread
CPUs = @cpus_epics
Functions = {
SyncThreadConsumerGAM,
DecimateGAM,
StateGAM,
MCPSGAM,
PXIErrorGAM,
GoErrorGAM,
GoWaitStandbyGAM,
ChoiceGAM,
EPICSThSyncGAM,
EPICSOutputGAM
}
}
+SDNThread = {
Class = RealTimeThread
CPUs = @cpus_sdn
Functions = {
TimeSDNGAM,
SDNCommandGAM,
SDNReplyGAM
}
}
+RealTimeThread = {
Class = RealTimeThread
CPUs = @cpus_rt
Functions = {
FastTimerGAM,
NI6528_0_ReaderGAM,
AsyncIOGAM,
HVPSsOffGAM,
NI6528_0_WriterGAM,
SyncThreadProducerGAM
}
}
+ADCThread = {
Class = RealTimeThread
CPUs = @cpus_adc
Functions = {
ReadADC,
PushADCtoDAN,
PushADCtoEpics
}
}
+DANThread = {
Class = RealTimeThread
CPUs = @cpus_dan
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
}
+ReferenceGenerationThread = {
Class = RealTimeThread
CPUs = @cpus_wg
Functions = {
WGTimerGAM,
CCPSWaveformGAM,
FHPSStateGAM,
FHPSGainGAM,
WGProducerGAM
}
}
}
}
+WaitStandby = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+EPICSThread = {
Class = RealTimeThread
Functions = {
SyncThreadConsumerGAM,
DecimateGAM,
StateGAM,
MCPSGAM,
PXIErrorGAM,
GoDisabledGAM,
GoWaitReadyGAM,
GoErrorGAM,
ChoiceGAM,
EPICSThSyncGAM,
EPICSOutputGAM
}
CPUs = @cpus_epics
}
+SDNThread = {
Class = RealTimeThread
Functions = {
TimeSDNGAM,
SDNCommandGAM,
SDNReplyGAM
}
CPUs = @cpus_sdn
}
+RealTimeThread = {
Class = RealTimeThread
Functions = {
FastTimerGAM,
NI6528_0_ReaderGAM,
AsyncIOGAM,
HVPSsOffGAM,
NI6528_0_WriterGAM,
SyncThreadProducerGAM
}
CPUs = @cpus_rt
}
+ADCThread = {
Class = RealTimeThread
Functions = {
ReadADC,
PushADCtoDAN,
PushADCtoEpics
}
CPUs = @cpus_adc
}
+DANThread = {
Class = RealTimeThread
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+ReferenceGenerationThread = {
Class = RealTimeThread
CPUs = @cpus_wg
Functions = {
WGTimerGAM,
CCPSWaveformGAM,
FHPSSetpointGAM,
FHPSRampupGAM,
FHPSStateGAM,
FHPSGainGAM,
WGProducerGAM
}
}
}
}
+WaitReady = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+EPICSThread = {
Class = RealTimeThread
Functions = {
SyncThreadConsumerGAM,
DecimateGAM,
StateGAM,
WFRecordGAM,
PreProgrammedGAM,
PXIErrorGAM,
GoWaitPermitGAM,
GoWaitStandbyFromReadyGAM,
GoErrorGAM,
ChoiceGAM,
EPICSThSyncGAM,
EPICSOutputGAM
}
CPUs = @cpus_epics
}
+SDNThread = {
Class = RealTimeThread
Functions = {
TimeSDNGAM,
SDNCommandGAM,
SDNReplyGAM
}
CPUs = @cpus_sdn
}
+RealTimeThread = {
Class = RealTimeThread
Functions = {
FastTimerGAM,
NI6528_0_ReaderGAM,
AsyncIOGAM,
HVPSsOffGAM,
NI6528_0_WriterGAM,
SyncThreadProducerGAM
}
CPUs = @cpus_rt
}
+ADCThread = {
Class = RealTimeThread
Functions = {
ReadADC,
PushADCtoDAN,
PushADCtoEpics
}
CPUs = @cpus_adc
}
+DANThread = {
Class = RealTimeThread
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+ReferenceGenerationThread = {
Class = RealTimeThread
CPUs = @cpus_wg
Functions = {
WGTimerGAM,
CCPSWaveformGAM,
FHPSSetpointGAM,
FHPSRampupGAM,
FHPSStateGAM,
FHPSGainGAM,
WGProducerGAM
}
}
}
}
+WaitPermit = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+EPICSThread = {
Class = RealTimeThread
Functions = {
SyncThreadConsumerGAM,
DecimateGAM,
StateGAM,
WFRecordGAM,
PreProgrammedGAM,
PXIErrorGAM,
GoWaitReadyFromWaitPermitGAM,
GoWaitHVONGAM,
GoWaitHVON_PREP_GAM,
GoWaitHVON_SDN_GAM,
GoWaitHVON_SDN_PREP_GAM,
GoErrorHVGAM,
ChoiceGAM,
EPICSThSyncGAM,
EPICSOutputGAM
}
CPUs = @cpus_epics
}
+SDNThread = {
Class = RealTimeThread
Functions = {
TimeSDNGAM,
SDNCommandGAM,
SDNReplyGAM
}
CPUs = @cpus_sdn
}
+RealTimeThread = {
Class = RealTimeThread
Functions = {
FastTimerGAM,
NI6528_0_ReaderGAM,
AsyncIOGAM,
HVPSsOffGAM,
NI6528_0_WriterGAM,
SyncThreadProducerGAM
}
CPUs = @cpus_rt
}
+ADCThread = {
Class = RealTimeThread
Functions = {
ReadADC,
PushADCtoDAN,
PushADCtoEpics
}
CPUs = @cpus_adc
}
+DANThread = {
Class = RealTimeThread
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+ReferenceGenerationThread = {
Class = RealTimeThread
CPUs = @cpus_wg
Functions = {
WGTimerGAM,
CCPSWaveformGAM,
FHPSSetpointGAM,
FHPSRampupGAM,
FHPSStateGAM,
FHPSGainGAM,
WGProducerGAM
}
}
}
}
// Real-Time state for HVPS sequence timing control.
+WaitHVON = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+EPICSThread = {
Class = RealTimeThread
Functions = {
SyncThreadConsumerGAM,
DecimateGAM,
StateGAM,
PXIErrorGAM,
FromWaitHVONToWaitStandby,
FromWaitHVONToWaitPermit,
GoErrorHVGAM,
ChoiceGAM,
EPICSThSyncGAM,
EPICSOutputGAM
}
CPUs = @cpus_epics
}
+SDNThread = {
Class = RealTimeThread
Functions = { TimeSDNGAM, SDNCommandGAM, SDNReplyGAM }
CPUs = @cpus_sdn
}
+RealTimeThread = {
Class = RealTimeThread
Functions = {
FastTimerGAM,
NI6528_0_ReaderGAM,
AsyncIOGAM,
FastEpicsInputGAM,
FastStopRequestGAM,
ModeLimitGAM,
GAMRealTimeStateMachine,
NI6528_0_WriterGAM,
SyncThreadProducerGAM
}
CPUs = @cpus_rt
}
+ADCThread = {
Class = RealTimeThread
Functions = {
ReadADC,
PushADCtoDAN,
PushADCtoEpics
}
CPUs = @cpus_adc
}
+DANThread = {
Class = RealTimeThread
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+ReferenceGenerationThread = {
Class = RealTimeThread
CPUs = @cpus_wg
Functions = {
WGTimerGAM,
CCPSWaveformGAM,
FHPSSetpointGAM,
FHPSRampupGAM,
FHPSStateGAM,
FHPSGainGAM,
WGProducerGAM
}
}
}
}
+WaitHVON_SDN = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+EPICSThread = {
Class = RealTimeThread
Functions = {
SyncThreadConsumerGAM,
DecimateGAM,
StateGAM,
PXIErrorGAM,
FromWaitHVONToWaitStandby,
FromWaitHVONToWaitPermit,
GoErrorHVGAM,
ChoiceGAM,
EPICSThSyncGAM,
EPICSOutputGAM
}
CPUs = @cpus_epics
}
+SDNThread = {
Class = RealTimeThread
Functions = {
TimeSDNGAM,
SDNCommandGAM,
SDNReplyGAM
}
CPUs = @cpus_sdn
}
+RealTimeThread = {
Class = RealTimeThread
Functions = {
FastTimerGAM,
NI6528_0_ReaderGAM,
AsyncIOGAM,
FastEpicsInputGAM,
FastStopRequestGAM,
ModeLimitGAM,
GAMSDNRealTimeStateMachine,
NI6528_0_WriterGAM,
SyncThreadProducerGAM
}
CPUs = @cpus_rt
}
+ADCThread = {
Class = RealTimeThread
Functions = {
ReadADC,
PushADCtoDAN,
PushADCtoEpics
}
CPUs = @cpus_adc
}
+DANThread = {
Class = RealTimeThread
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+ReferenceGenerationThread = {
Class = RealTimeThread
CPUs = @cpus_wg
Functions = {
WGTimerGAM,
CCPSWaveformGAM,
FHPSRampupGAM,
FHPSStateGAM,
FHPSGainGAM,
WGProducerGAM
}
}
}
}
+WaitHVON_PREP = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+EPICSThread = {
Class = RealTimeThread
Functions = {
SyncThreadConsumerGAM,
DecimateGAM,
StateGAM,
PreProgrammedGAM,
PXIErrorGAM,
FromWaitHVONToWaitStandby,
FromWaitHVONToWaitPermit,
GoErrorHVGAM,
ChoiceGAM,
EPICSThSyncGAM,
EPICSOutputGAM
}
CPUs = @cpus_epics
}
+SDNThread = {
Class = RealTimeThread
Functions = { TimeSDNGAM, SDNCommandGAM, SDNReplyGAM }
CPUs = @cpus_sdn
}
+RealTimeThread = {
Class = RealTimeThread
Functions = {
FastTimerGAM,
NI6528_0_ReaderGAM,
AsyncIOGAM,
FastEpicsInputGAM,
FastStopRequestGAM,
ModeLimitGAM,
GAMRealTimeStateMachine,
NI6528_0_WriterGAM,
SyncThreadProducerGAM
}
CPUs = @cpus_rt
}
+ADCThread = {
Class = RealTimeThread
Functions = { ReadADC, PushADCtoDAN, PushADCtoEpics }
CPUs = @cpus_adc
}
+DANThread = {
Class = RealTimeThread
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+ReferenceGenerationThread = {
Class = RealTimeThread
CPUs = @cpus_wg
Functions = {
WGTimerGAM,
CCPSWaveformGAM,
FHPSRampupGAM,
FHPSStateGAM,
FHPSGainGAM,
WGProducerGAM
}
}
}
}
+WaitHVON_SDN_PREP = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+EPICSThread = {
Class = RealTimeThread
Functions = {
SyncThreadConsumerGAM,
DecimateGAM,
StateGAM,
PreProgrammedGAM,
PXIErrorGAM,
FromWaitHVONToWaitStandby,
FromWaitHVONToWaitPermit,
GoErrorHVGAM,
ChoiceGAM,
EPICSThSyncGAM,
EPICSOutputGAM
}
CPUs = @cpus_epics
}
+SDNThread = {
Class = RealTimeThread
Functions = {
TimeSDNGAM,
SDNCommandGAM,
SDNReplyGAM
}
CPUs = @cpus_sdn
}
+RealTimeThread = {
Class = RealTimeThread
Functions = {
FastTimerGAM,
NI6528_0_ReaderGAM,
AsyncIOGAM,
FastEpicsInputGAM,
FastStopRequestGAM,
ModeLimitGAM,
GAMSDNRealTimeStateMachine,
SyncThreadProducerGAM
}
CPUs = @cpus_rt
}
+ADCThread = {
Class = RealTimeThread
Functions = { ReadADC, PushADCtoDAN, PushADCtoEpics }
CPUs = @cpus_adc
}
+DANThread = {
Class = RealTimeThread
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+ReferenceGenerationThread = {
Class = RealTimeThread
CPUs = @cpus_wg
Functions = {
WGTimerGAM,
CCPSWaveformGAM,
FHPSRampupGAM,
FHPSStateGAM,
FHPSGainGAM,
WGProducerGAM
}
}
}
}
+Error = {
Class = RealTimeState
+Threads = {
Class = ReferenceContainer
+EPICSThread = {
Class = RealTimeThread
Functions = {
SyncThreadConsumerGAM,
DecimateGAM,
StateGAM,
PXIErrorGAM,
ResetErrorGAM,
ChoiceGAM,
EPICSThSyncGAM,
EPICSOutputGAM
}
// REMOVED: GoErrorGAM (redundant), FHPSSetPointGAM and FHPSRumpUpGAM
// TODO: Discus about the removal
CPUs = @cpus_epics
}
+SDNThread = {
Class = RealTimeThread
Functions = {
TimeSDNGAM,
SDNCommandGAM,
SDNReplyGAM
}
CPUs = @cpus_sdn
}
+RealTimeThread = {
Class = RealTimeThread
Functions = {
FastTimerGAM,
NI6528_0_ReaderGAM,
AsyncIOGAM,
HVPSsOffGAM,
NI6528_0_WriterGAM,
SyncThreadProducerGAM
}
CPUs = @cpus_rt
}
+ADCThread = {
Class = RealTimeThread
Functions = {
ReadADC,
PushADCtoDAN,
PushADCtoEpics
}
CPUs = @cpus_adc
}
+DANThread = {
Class = RealTimeThread
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+ReferenceGenerationThread = {
Class = RealTimeThread
CPUs = @cpus_wg
Functions = {
WGTimerGAM,
CCPSWaveformGAM,
FHPSStateGAM,
FHPSGainGAM,
WGProducerGAM
}
}
}
}

View File

@@ -0,0 +1,512 @@
#package jada_gyro.RTApp.Data
+EPICSCAInput = {
Class = "EPICSCA::EPICSCAInput"
Signals = {
TRIGGER_DAN = {
PVName = (@rfid .. ":DAN_ENABLED")
Type = uint8
}
CSV_LOAD = {
PVName = (@rfid .. "-GAF:STAT-CSV-LOAD")
Type = uint32
}
CSV_NAME = {
PVName = (@rfid .. "-GAF:STAT-CSV-NAME")
Type = char8
NumberOfElements = 40
}
MIS_ITL = {
Type = uint32
PVName = (@rfid .. "-GAFP:FMC4310-YTRP")
}
RESET_FLT = {
PVName = (@rfid .. "-GPF:STAT-RST-FLT")
Type = uint32
}
PLC_SELECT = {
PVName = (@rfid .. "-GPS:PLC4110-CON-OPGY1")
Type = uint32
}
CCPS_OUTPUT_FREQ = {
PVName = (@rfid .. "-GAF-CCPS:STAT-FREQ")
Type = float32
}
CCPS_OUTPUT_AMP = {
PVName = (@rfid .. "-GAF-CCPS:STAT-AMP")
Type = float32
}
CCPS_OUTPUT_OFFS = {
PVName = (@rfid .. "-GAF-CCPS:STAT-OFFS")
Type = float32
}
GCPS_TRG_CURR_MANUAL = {
PVName = (@rfid .. "-GAF-GCPS:PSU2130-TRG-CURR-SET-MI")
Type = float32
}
MCPS_TRG_CURR_MANUAL = {
PVName = (@rfid .. "-GAF-MCPS:PSU2120-TRG-CURR-SET-MI")
Type = float32
}
MCPS_RU_COMPLETED = {
PVName = (@rfid .. "-GAF-MCPS:PSU2120-YTS-RUP")
Type = uint8
}
MCPS_RD_COMPLETED = {
PVName = (@rfid .. "-GAF-MCPS:PSU2120-YTS-RDOWN")
Type = uint8
}
BPS_MANUAL = {
PVName = (@rfid .. "-PB1F:PSU1000-EREF-MSP")
Type = float32
}
BPS_MM = {
PVName = (@rfid .. "-PB1F:STAT-MANM")
Type = uint32
}
APS_MANUAL = {
PVName = (@rfid .. "-PA1F:PSU3000-EREF-MSP")
Type = float32
}
APS_MM = {
PVName = (@rfid .. "-PA1F:STAT-MANM")
Type = uint32
}
MHVPS_MANUAL = {
PVName = (@rfid .. "-PMF:PSU0000-EREF-MSP")
Type = float32
}
MHVPS_MM = {
PVName = (@rfid .. "-PMF:STAT-MANM")
Type = uint32
}
MCPS_MM = {
PVName = (@rfid .. "-GAF-MCPS:STAT-MANM")
Type = uint32
}
GCPS_MM = {
PVName = (@rfid .. "-GAF-GCPS:STAT-MANM")
Type = uint32
}
FHPS_AUTO_TAGV = {
PVName = (@rfid .. "-GAF-FHPS:PSU2610-AUTO-TAGV")
Type = float32
}
FHPS_AUTO_TIME = {
PVName = (@rfid .. "-GAF-FHPS:PSU2610-AUTO-RU-TIME")
Type = float32
}
FHPS_AUTO_START = {
PVName = (@rfid .. "-GAF-FHPS:PSU2610-AUTO-START")
Type = uint32
}
FHPS_MANM = {
PVName = (@rfid .. "-GAF-FHPS:STAT-MANM")
Type = uint32
}
//# Guncoil state readback
GCPS_ACT_RB = {
PVName = (@rfid .. "-GAF-GCPS:PSU2130-ACT-RB")
Type = uint32
}
//# Guncoil current monitor
GCPS_CURR_MON = {
PVName = (@rfid .. "-GAF-GCPS:PSU2130-CURR-MON")
Type = float32
}
//# Main coil state readback
MCPS_ACT_RB = {
PVName = (@rfid .. "-GAF-MCPS:PSU2120-ACT-RB")
Type = uint32
}
//# Main coil current monitor
MCPS_CURR_MON = {
PVName = (@rfid .. "-GAF-MCPS:PSU2120-CURR-MON")
Type = float32
}
//# Pre-program flag
PREP_MODE = {
PVName = (@rfid .. "-GAF:STAT-PREP-MODE")
Type = uint32
}
// Timing settings
MHVPS_DT = {
PVName = (@rfid .. "-PMF:STAT-DT-HVON")
Type = uint32
}
APS_HVON_DT = {
PVName = (@rfid .. "-PA1F:STAT-DT-HVON")
Type = uint32
}
APS_SWON_DT = {
PVName = (@rfid .. "-PA1F:STAT-DT-SWON")
Type = uint32
}
BPS_HVON_DT = {
PVName = (@rfid .. "-PB1F:STAT-DT-HVON")
Type = uint32
}
BPS_SWON_DT = {
PVName = (@rfid .. "-PB1F:STAT-DT-SWON")
Type = uint32
}
SHOTLEN = {
PVName = (@rfid .. "-GAF:STAT-DT-SHOTLEN")
Type = uint32
}
PLC_MODE1 = {
PVName = (@rfid .. "-GPS:PLC4110-YTS-MD1")
Type = uint32
}
PLC_MODE2 = {
PVName = (@rfid .. "-GPS:PLC4110-YTS-MD2")
Type = uint32
}
PLC_MODE3 = {
PVName = (@rfid .. "-GPS:PLC4110-YTS-MD3")
Type = uint32
}
PLC_MODE4 = {
PVName = (@rfid .. "-GPS:PLC4110-YTS-MD4")
Type = uint32
}
MD1_SHOTLEN_LIM = {
PVName = (@rfid .. "-GPF:STAT-MD1-LIM")
Type = uint32
}
MD2_SHOTLEN_LIM = {
PVName = (@rfid .. "-GPF:STAT-MD2-LIM")
Type = uint32
}
MD3_SHOTLEN_LIM = {
PVName = (@rfid .. "-GPF:STAT-MD3-LIM")
Type = uint32
}
MD4_SHOTLEN_LIM = {
PVName = (@rfid .. "-GPF:STAT-MD4-LIM")
Type = uint32
}
GY_MCPS_CURR_MON = {
PVName = (@rfid .. "-GAF-MCPS:PSU2120-CURR-MON")
Type = float32
}
GY_GCPS_CURR_MON = {
PVName = (@rfid .. "-GAF-GCPS:PSU2130-CURR-MON")
Type = float32
}
GY_FHPS_MEAS_ACI = {
PVName = (@rfid .. "-GAF-FHPS:PSU2610-MEAS-ACI")
Type = float32
}
GY_FHPS_MEAS_ACV = {
PVName = (@rfid .. "-GAF-FHPS:PSU2610-MEAS-ACV")
Type = float32
}
GY_CCPS_MEAS_DCI = {
PVName = (@rfid .. "-GAF-CCPS:PSU2320-MEAS-DCI")
Type = float32
}
SHORT_PULSE_MODE = {
PVName = (@rfid .. "-GAF:STAT-SHORT-PULSE")
Type = uint32
}
CCPS_IN_OPERATION = {
PVName = (@rfid .. "-GAF-CCPS:PSU2320-TR")
Type = uint8
}
}
}
+EPICSCAOutput = {
Class = EPICSCAOutput
CPUMask = @cpus_epics // change from 0x200
StackSize = 10000000
NumberOfBuffers = 50
Signals = {
PCF_STATE = {
PVName = (@rfid .. "-GAF:STAT-SM")
Type = uint32
}
// Analog Output PVs in Variables-signal tab.
FHPS_REF = {
PVName = (@rfid .. "-GAF-FHPS:PSU2610-EREF")
Type = float32
}
BPS_REF = {
PVName = (@rfid .. "-PB1F:PSU1000-EREF")
Type = float32
}
APS_REF = {
PVName = (@rfid .. "-PA1F:STAT-EREF-CONV.A")
// TODO: PSU3000-YSTA
Type = float32
}
MHVPS_REF = {
PVName = (@rfid .. "-PMF:STAT-EREF-CALC.A")
Type = float32
}
// Digital Output PVs in Variables-signal tab.
APS_STOP = {
PVName = (@rfid .. "-PA1F:PSU3000-CTRP")
Type = uint32
}
BPS_STOP = {
PVName = (@rfid .. "-PB1F:PSU1000-CTRP")
Type = uint32
}
BEAM_ON_STAT = {
PVName = (@rfid .. "-GAFP:FMC4310-YSTA-GAOP")
Type = uint8
}
MHVPS_STOP = {
PVName = (@rfid .. "-PMF:PSU0000-COFF")
Type = uint32
}
PCF_FLT = {
PVName = (@rfid .. "-GPF:PCF4210-CTRP")
Type = uint8
}
PXI_FLT = {
PVName = (@rfid .. "-GPS:PLC4110-RV2")
Type = uint8
}
HVARMED = {
PVName = (@rfid .. "-GPF:PCF4210-YTS-GA1")
Type = uint8
}
HVINJECTION = {
PVName = (@rfid .. "-GPF:PCF4210-YTS-GA2")
Type = uint8
}
RFON = {
PVName = (@rfid .. "-GPF:PCF4210-YTS-GA3")
Type = uint8
}
// Output PVs in Variables-operation tab.
MHVPS_PREP_WF = {
PVName = (@rfid .. "-PMF:STAT-PREP-WF")
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
BPS_PREP_WF = {
PVName = (@rfid .. "-PB1F:STAT-PREP-WF")
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
APS_PREP_WF = {
PVName = (@rfid .. "-PA1F:STAT-PREP-WF")
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
FHPS_PREP_WF = {
PVName = (@rfid .. "-GAF-FHPS:STAT-PREP-WF")
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
MCPS_PREP_WF = {
PVName = (@rfid .. "-GAF-MCPS:STAT-PREP-WF")
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GCPS_PREP_WF = {
PVName = (@rfid .. "-GAF-GCPS:STAT-PREP-WF")
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
PREP_TIME_WF = {
PVName = (@rfid .. "-GAF:STAT-PREP-TIME-WF")
Type = int32
NumberOfElements = 8000
NumberOfDimensions = 1
}
BEAM_ON_TIME = {
PVName = (@rfid .. "-GAF:STAT-BEAMON-TIME")
Type = uint32
}
ELAPSED_TIME = {
PVName = (@rfid .. "-GAF:STAT-ELAPSED")
Type = uint32
}
SHOT_ID = {
PVName = (@rfid .. "-GAF:STAT-SHOT-ID")
Type = uint32
}
CSV_LOADED = {
PVName = (@rfid .. "-GAF:STAT-CSV-LOADED")
Type = uint32
}
CSV_ERR = {
PVName = (@rfid .. "-GAF:STAT-CSV-ERR")
Type = uint32
}
// Output PVs in Variables-jastec tab.
MCPS_TRG_CURR_SET = {
PVName = (@rfid .. "-GAF-MCPS:PSU2120-TRG-CURR-SET-MO")
Type = float32
}
MCPS_ACT_SP = {
PVName = (@rfid .. "-GAF-MCPS:PSU2120-ACT-SP-MO")
Type = uint32
}
GCPS_TRG_CURR_SET = {
PVName = (@rfid .. "-GAF-GCPS:PSU2130-TRG-CURR-SET-MO")
Type = float32
}
GCPS_ACT_SP = {
PVName = (@rfid .. "-GAF-GCPS:PSU2130-ACT-SP-MO")
Type = uint32
}
// Output PVs in Variables-kikusui tab.
CCPS_REF = {
PVName = (@rfid .. "-GAF-CCPS:PSU2320-EREF")
Type = float32
}
FHPS_AUTO_STAT = {
PVName = (@rfid .. "-GAF-FHPS:PSU2610-AUTO-STAT")
Type = uint32
}
// Add 20201117
APS_HVON = {
PVName = (@rfid .. "-PA1F:PSU3000-CON-HV")
Type = uint8
}
APS_SWON = {
PVName = (@rfid .. "-PA1F:PSU3000-CON-SW")
Type = uint8
}
BPS_HVON = {
PVName = (@rfid .. "-PB1F:PSU1000-CON-HV")
Type = uint8
}
BPS_SWON = {
PVName = (@rfid .. "-PB1F:PSU1000-CON-SW")
Type = uint8
}
MHVPS_HVON = {
PVName = (@rfid .. "-PMF:STAT-HVON-CALC.A")
Type = uint8
}
EXT_TRIGGER = {
PVName = (@rfid .. "-GAF:DIO4900-YON")
Type = uint8
}
ECPC_MHVPS_MOD = {
PVName = (@rfid .. "-GPF:PSU0000-YSTA-MOD")
Type = uint8
}
PLC_PERMIT = {
PVName = (@rfid .. "-GPS:PLC4110-CON-GY1PRM")
Type = uint8
}
PLC_OP_SELECTED = {
PVName = (@rfid .. "-GPS:PLC4110-CON-OPGY1")
Type = uint8
}
CCPS_IN_OP = {
PVName = (@rfid .. "-GPS:PLC4110-YON-CCPS1")
Type = uint8
}
PLC_SYNCMODE = {
PVName = (@rfid .. "-GPS:PLC4110-YSTA-MPSS")
Type = uint8
}
PLC_ITL = {
PVName = (@rfid .. "-GPS:PLC4110-YTRP")
Type = uint8
}
PLC_STANDBY = {
PVName = (@rfid .. "-GPS:PLC4110-YTS-ST1R")
Type = uint8
}
PLC_READY = {
PVName = (@rfid .. "-GPS:PLC4110-YTS-ST2R")
Type = uint8
}
PLC_ON = {
PVName = (@rfid .. "-GPS:PLC4110-YTS-ST3R")
Type = uint8
}
APS_FLT = {
PVName = (@rfid .. "-PA1F:PSU3000-YFLT")
Type = uint8
}
APS_READY = {
PVName = (@rfid .. "-PA1F:PSU3000-YSTA")
Type = uint8
}
BPS_FLT = {
PVName = (@rfid .. "-PB1F:PSU1000-YFLT")
Type = uint8
}
BPS_READY = {
PVName = (@rfid .. "-PB1F:PSU1000-YSTA")
Type = uint8
}
MHPS_FLT = {
PVName = (@rfid .. "-PMF:PSU0000-YFLT")
Type = uint8
}
MHPS_READY = {
PVName = (@rfid .. "-PMF:PSU0000-TYSTA")
Type = uint8
}
MHPS_OC = {
PVName = (@rfid .. "-GAFP:FMC4310-YFLT-OC")
Type = uint8
}
MHPS_OV = {
PVName = (@rfid .. "-GAFP:FMC4310-YFLT-OV")
Type = uint8
}
CRIO_RV1 = {
Type = uint8
PVName = (@rfid .. "-GAFP:FMC4310-RV1")
}
CRIO_RV2 = {
Type = uint8
PVName = (@rfid .. "-GAFP:FMC4310-RV2")
}
CRIO_RV3 = {
Type = uint8
PVName = (@rfid .. "-GAFP:FMC4310-RV3")
}
FAST_ITL = {
Type = uint8
PVName = (@rfid .. "-GAFP:FMC4310-YTRP")
}
//! unused: Not shared with th1 (TODO)
FAST_PAUSE = {
Type = uint8
PVName = (@rfid .. "-GAFP:FMC4310-YTRP2")
}
PXI_6259_STATE = {
Type = uint32
PVName = (@rfid .. "-HWCF:6259-0-STATUS")
}
//! unused: No 6683 DS (TODO)
PXI_6683_STATE = {
Type = uint8
PVName = (@rfid .. "-HWCF:6683-0-STATUS")
}
//! unused: No 6683 DS (TODO)
PXI_6683_SYNC = {
Type = uint8
PVName = (@rfid .. "-HWCF:6683-0-SYNC")
}
//! unused: No 6683 DS (TODO)
PXI_6683_SYNCLOST = {
Type = uint8
PVName = (@rfid .. "-HWCF:6683-0-SYNCLOST")
}
PXI_6528_STATE = {
Type = uint32
PVName = (@rfid .. "-HWCF:6528-0-STATUS")
}
}
}

View File

@@ -0,0 +1,580 @@
#package jada_gyro.RTApp.Data
+DDB1 = {
Signals = {
PXI6528_Status = {
Type = uint32
}
PXI6259_Status = {
Type = uint32
}
PXI6683_Status = {
Type = uint8
}
PXI6683_PtpdStatus = {
Type = uint8
}
GYA_APS_READY = {
Type = uint8
}
GYA_APS_FLT = {
Type = uint8
}
GYA_BPS_READY = {
Type = uint8
}
GYA_BPS_FLT = {
Type = uint8
}
MHVPS_OV = {
Type = uint8
}
MHVPS_OC = {
Type = uint8
}
MHVPS_FLT = {
Type = uint8
}
MHVPS_READY = {
Type = uint8
}
ECPC_MOD = {
Type = uint8
}
FAST_TRIP = {
Type = uint8
}
PLC_ITL = {
Type = uint8
}
PLC_STANDBY = {
Type = uint8
}
PLC_READY = {
Type = uint8
}
PLC_ON = {
Type = uint8
}
PLC_PERMIT = {
Type = uint8
}
PLC_OP_SELECTED = {
Type = uint8
}
PLC_CC_OP_SELECTED = {
Type = uint8
}
PLC_SYNCMODE = {
Type = uint8
}
TRIGGER = {
Type = uint8
}
APS_HVON = {
Type = uint8
}
APS_SWON = {
Type = uint8
}
BPS_HVON = {
Type = uint8
}
BPS_SWON = {
Type = uint8
}
MHVPS_HVON = {
Type = uint8
}
BEAM_ON_STAT = {
Type = uint8
}
HVARMED = {
Type = uint8
}
HVINJECTION = {
Type = uint8
}
RFON = {
Type = uint8
}
ELAPSED_TIME = {
Type = uint32
}
BEAM_ON_TIME = {
Type = uint32
}
SHOT_ID = {
Type = uint32
}
CRIO_RV1 = {
Type = uint8
}
CRIO_RV2 = {
Type = uint8
}
CRIO_RV3 = {
Type = uint8
}
PXI6259_Status_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint32
}
PXI6528_Status_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint32
}
PXI6683_Status_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
PXI6683_PtpdStatus_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
GYA_APS_READY_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
GYA_APS_FLT_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
GYA_BPS_READY_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
GYA_BPS_FLT_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
MHVPS_OV_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
MHVPS_OC_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
MHVPS_FLT_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
MHVPS_READY_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
ECPC_MOD_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
FAST_TRIP_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
PLC_ITL_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
PLC_STANDBY_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
PLC_READY_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
PLC_ON_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
PLC_PERMIT_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
PLC_OP_SELECTED_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
PLC_CC_OP_SELECTED_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
PLC_SYNCMODE_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
TRIGGER_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
BEAM_ON_STAT_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
HVARMED_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
HVINJECTION_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
RFON_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
ELAPSED_TIME_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint32
}
BEAM_ON_TIME_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint32
}
SHOT_ID_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint32
}
CRIO_RV1_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
CRIO_RV2_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
CRIO_RV3_SAMPLES = {
NumberOfElements = @fast_slow_ratio
Type = uint8
}
}
}
+DDB3 = {
Signals = {
SHOT_ID = {
Type = uint32
}
//# DI.0
GYA_APS_READY = {
Type = uint8
}
//# DI.1
GYA_APS_FLT = {
Type = uint8
}
//# DI.2
GYA_BPS_READY = {
Type = uint8
}
//# DI.3
GYA_BPS_FLT = {
Type = uint8
}
//# DI.4
MHVPS_OV = {
Type = uint8
}
//# DI.5
MHVPS_OC = {
Type = uint8
}
//# DI.6
MHVPS_FLT = {
Type = uint8
}
//# DI.7
MHVPS_READY = {
Type = uint8
}
//# DI.8
ECPC_MOD = {
Type = uint8
}
//# DI.9
FAST_TRIP = {
Type = uint8
}
//# DI 11
CRIO_RV1 = {
Type = uint8
}
//# DI 12
CRIO_RV2 = {
Type = uint8
}
//# DI 13
CRIO_RV3 = {
Type = uint8
}
//# DI.14
PLC_ITL = {
Type = uint8
}
//# DI.15
PLC_STANDBY = {
Type = uint8
}
//# DI.16
PLC_READY = {
Type = uint8
}
//# DI.17
PLC_ON = {
Type = uint8
}
//# DI.18
PLC_PERMIT = {
Type = uint8
}
//# DI.19
PLC_OP_SELECTED = {
Type = uint8
}
//# DI.20
PLC_CC_OP_SELECTED = {
Type = uint8
}
//# DI.21
PLC_SYNCMODE = {
Type = uint8
}
//# DI.22
TRIGGER = {
Type = uint8
}
//# DI.23
NONE_DI23 = {
Type = uint8
}
//# DO.0
APS_HVON = {
Type = uint8
}
//# DO.1
APS_SWON = {
Type = uint8
}
//# DO.2
APS_STOP = {
Type = uint8
}
//# DO.3
BPS_HVON = {
Type = uint8
}
//# DO.4
BPS_SWON = {
Type = uint8
}
//# DO.5
BPS_STOP = {
Type = uint8
}
//# DO.6
BEAM_ON_STAT = {
Type = uint8
}
//# DO.7 PCF -> CRIO
DO_REV5 = {
Type = uint8
}
//# DO.8 PCF -> CRIO (PROTECTION PAUSE SIGNAL)
DO_REV6 = {
Type = uint8
}
//# DO.9 PCF -> CRIO
DO_REV7 = {
Type = uint8
}
//# DO.10 PCF -> CRIO
DO_REV8 = {
Type = uint8
}
//# DO.11
MHVPS_HVON = {
Type = uint8
}
//# DO.12
MHVPS_STOP = {
Type = uint8
}
//# DO.13
MHVPS_MODSW = {
Type = uint8
}
//# DO.14
PCF_FLT = {
Type = uint8
}
//# DO.15
HVARMED = {
Type = uint8
}
//# DO.16
HVINJECTION = {
Type = uint8
}
//# DO.17
RFON = {
Type = uint8
}
//# DO.18
FHPS_RU = {
Type = uint8
}
//# DO.19
SCM_RU = {
Type = uint8
}
//# DO.20
SCM_RD = {
Type = uint8
}
//# DO.21
CCPS_IN_OPERATION = {
Type = uint8
}
//# DO.22
PXI_FLT = {
Type = uint8
}
//# Internal Fast Stop signal
FAST_STOP = {
Type = uint8
}
//# Computed Shot length flag
MODE_SHOTLEN_FLAG = {
Type = uint32
}
//# TODO: Document signal
RTSMValue = {
Type = uint32
}
}
}
//# PXI NI6528 Digital input datasource
//# TODO: configure it
+NI6528_0_DIO = {
Class = NI6528
DeviceName = "/dev/pxi6528"
BoardId = 1 // TODO: check if not 1
Signals = {
//# P0.0 I.00 APS A Ready
//# P0.1 I.01 APS A Fault
//# P0.2 I.02 BPS A Ready
//# P0.3 I.03 BPS A Fault
//# P0.4 I.04 MHVPS Over volage
//# P0.5 I.05 MHVPS Over current
//# P0.6 I.06 MHVPS Trip
//# P0.7 I.07 MHVPS Ready
DI0 = {
Type = uint8
PortId = 0
InversionMask = 0x40
}
//# P1.0 I.08 ECPC Modulation
//# P1.1 I.09 Fast Protection Trip
//# P1.2 I.10
//# P1.3 I.11 CRIO RV1
//# P1.4 I.12 CRIO RV2
//# P1.5 I.13 CRIO RV3
//# P1.6 I.14 LV1 Alarm
//# P1.7 I.15 PLC STANDBY
DI1 = {
Type = uint8
PortId = 1
}
//# P2.0 I.16 PLC READY
//# P2.1 I.17 PLC ON
//# P2.2 I.18 PLC Gyrotron A Operation permitted
//# P2.3 I.19 Gyrotron A Operation Selected
//# P2.4 I.20 Gyrotron A Collector Coil Operation
//# P2.5 I.21 Sync Mode Selected
//# P2.6 I.22 Trigger
//# P2.7 I.23
DI2 = {
Type = uint8
PortId = 2
}
//# P3.0 O.00 APS_HVON
//# P3.1 O.01 APS_SWON
//# P3.2 O.02 APS_Shutdown
//# P3.3 O.03 BPS_HVON
//# P3.4 O.04 BPS_SWON
//# P3.5 O.05 BPS_Shutdown
//# P3.6 O.06 GY1_Beam_ON_status
//# P3.7 O.07 RV5 _cRIO
DO3 = {
Type = uint8
PortId = 3
InversionMask = 0xFF
}
//# P4.0 O.08 RV6 _cRIO
//# P4.1 O.09 RV7 _cRIO
//# P4.2 O.10 RV8 _cRIO
//# P4.3 O.11 MHVPS_HVON
//# P4.4 O.12 MHVPS_Shutdown
//# P4.5 O.13 MHVPS_MOD
//# P4.6 O.14 PCF_FLT
//# P4.7 O.15 HVArmed
DO4 = {
Type = uint8
PortId = 4
InversionMask = 0xFF
}
//# P5.0 O.16 HVInjection
//# P5.1 O.17 RFON
//# P5.2 O.18 FHPS_Rampup_complete
//# P5.3 O.19 SCM_RU_Complete
//# P5.4 O.20 SCM_RD_Complete
//# P5.5 O.21 CCPS_IN_OPERATION
//# P5.6 O.22 PXI_FLT
//# P5.7 O.23
DO5 = {
Type = uint8
PortId = 5
InversionMask = 0xFF
}
}
}
//# PXI NI6528 Digital input datasource
//# TODO: configure it
+NI6528_1_DIO = {
Class = NI6528
DeviceName = "/dev/pxi6528"
BoardId = 0 // TODO: check if not 1
Signals = {
//# P5.6 O.22 PXI_FLT
DO5 = {
Type = uint8
PortId = 5
InversionMask = 0xFF
}
}
}
//# Direct HW accesses. Follwing device/port assignment must be consistent with actual wiring.
//# NI6259.0
//# APS_SWON BoardId=0, PortId=3.0
+NI6259_DIO_P0 = {
Class = "NI6259::NI6259DIO"
DeviceName = "/dev/pxi6259"
BoardId = 1
Signals = {
Status = {
Type = uint32
}
NI6259Value = {
Type = uint32
Mask = 0xFF
PortId = 0
}
}
}

View File

@@ -0,0 +1,64 @@
#package jada_gyro.StateMachine
+INITIAL = {
Class = ReferenceContainer
+Start = {
Class = StateMachineEvent
NextState = "WAITSTANDBY"
NextStateError = "ERROR"
+StartHttpServer = {
Class = Message
Destination = WebServer
Function = "Start"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_standby
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
+OpenDANWriterDIO = {
Class = Message
Destination = RTApp.Data.DANDIODataSource
Function = "OpenStream"
Mode = "ExpectsReply"
}
+OpenDANWriterAI = {
Class = Message
Destination = RTApp.Data.FastAnalogDAN
Function = "OpenStream"
Mode = "ExpectsReply"
}
}
}

View File

@@ -0,0 +1,146 @@
#package jada_gyro.StateMachine
+WAITSTANDBY = {
Class = ReferenceContainer
+GoWaitReady = {
Class = StateMachineEvent
NextState = WAITREADY
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitReady
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_ready
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoDisabled = {
Class = StateMachineEvent
NextState = DISABLED
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = Disabled
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_disabled
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoError = {
Class = StateMachineEvent
NextState = ERROR
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_error
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 1
}
}
}
}

View File

@@ -0,0 +1,146 @@
#package jada_gyro.StateMachine
+WAITREADY = {
Class = ReferenceContainer
+GoWaitStandby = {
Class = StateMachineEvent
NextState = WAITSTANDBY
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_standby
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoWaitPermit = {
Class = StateMachineEvent
NextState = WAITPERMIT
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitPermit
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_permit
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoError = {
Class = StateMachineEvent
NextState = ERROR
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_error
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 1
}
}
}
}

View File

@@ -0,0 +1,287 @@
#package jada_gyro.StateMachine
+WAITPERMIT = {
Class = ReferenceContainer
+GoWaitReady = {
Class = StateMachineEvent
NextState = WAITREADY
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitReady
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_ready
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoWaitHVON = {
Class = StateMachineEvent
NextState = WAITHVON
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitHVON
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_hvon
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoWaitHVON_SDN = {
Class = StateMachineEvent
NextState = WAITHVON_SDN
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitHVON_SDN
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_hvon_sdn
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoWaitHVON_PREP = {
Class = StateMachineEvent
NextState = WAITHVON_PREP
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitHVON_PREP
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_hvon_prep
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoWaitHVON_SDN_PREP = {
Class = StateMachineEvent
NextState = WAITHVON_SDN_PREP
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitHVON_SDN_PREP
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_hvon_sdn_prep
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoError = {
Class = StateMachineEvent
NextState = ERROR
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_error
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 1
}
}
}
}

View File

@@ -0,0 +1,146 @@
#package jada_gyro.StateMachine
+WAITHVON = {
Class = ReferenceContainer
+GoWaitStandby = {
Class = StateMachineEvent
NextState = WAITSTANDBY
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_standby
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoWaitPermit = {
Class = StateMachineEvent
NextState = WAITPERMIT
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitPermit
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_permit
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoError = {
Class = StateMachineEvent
NextState = ERROR
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_error
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 1
}
}
}
}

View File

@@ -0,0 +1,146 @@
#package jada_gyro.StateMachine
+WAITHVON_PREP = {
Class = ReferenceContainer
+GoWaitStandby = {
Class = StateMachineEvent
NextState = WAITSTANDBY
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_standby
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoWaitPermit = {
Class = StateMachineEvent
NextState = WAITPERMIT
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitPermit
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_permit
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoError = {
Class = StateMachineEvent
NextState = ERROR
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_error
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 1
}
}
}
}

View File

@@ -0,0 +1,146 @@
#package jada_gyro.StateMachine
+WAITHVON_SDN = {
Class = ReferenceContainer
+GoWaitStandby = {
Class = StateMachineEvent
NextState = WAITSTANDBY
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_standby
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoWaitPermit = {
Class = StateMachineEvent
NextState = WAITPERMIT
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitPermit
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_permit
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoError = {
Class = StateMachineEvent
NextState = ERROR
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_error
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 1
}
}
}
}

View File

@@ -0,0 +1,146 @@
#package jada_gyro.StateMachine
+WAITHVON_SDN_PREP = {
Class = ReferenceContainer
+GoWaitStandby = {
Class = StateMachineEvent
NextState = WAITSTANDBY
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_standby
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoWaitPermit = {
Class = StateMachineEvent
NextState = WAITPERMIT
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitPermit
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_permit
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoError = {
Class = StateMachineEvent
NextState = ERROR
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_error
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 1
}
}
}
}

View File

@@ -0,0 +1,53 @@
#package jada_gyro.StateMachine
//# Error State (Enter by HVPS errors)
+ERROR = {
Class = ReferenceContainer
+GoWaitStandby = {
Class = StateMachineEvent
NextState = WAITSTANDBY
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_standby
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
}

View File

@@ -0,0 +1,99 @@
#package jada_gyro.StateMachine
+DISABLED = {
Class = ReferenceContainer
+GoWaitStandby = {
Class = StateMachineEvent
NextState = WAITSTANDBY
NextStateError = ERROR
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = WaitStandby
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_standby
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 0
}
}
}
+GoError = {
Class = StateMachineEvent
NextState = "ERROR"
NextStateError = "ERROR"
+StopCurrentStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StopCurrentStateExecution"
Mode = "ExpectsReply"
}
+PrepareNextStateMsg = {
Class = Message
Destination = RTApp
Mode = "ExpectsReply"
Function = "PrepareNextState"
+Parameters = {
Class = ConfigurationDatabase
param1 = Error
}
}
+StartNextStateExecutionMsg = {
Class = Message
Destination = RTApp
Function = "StartNextStateExecution"
Mode = "ExpectsReply"
}
+SetState = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_STATE
SignalValue = @state_error
}
}
+SetFault = {
Class = Message
Destination = RTApp.Functions.StateGAM
Function = "SetOutput"
+Parameters = {
Class = ConfigurationDatabase
SignalName = PCF_FAULT
SignalValue = 1
}
}
}
}

View File

@@ -0,0 +1,135 @@
#package jada_gyro.RTApp.Data
+DDB1 = {
Signals = {
FAST_STOP = {
Type = uint32
}
PREP_TIME_WF = {
Type = int32
NumberOfElements = 8000
NumberOfDimensions = 1
}
MHVPS_PREP_WF = {
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
BPS_PREP_WF = {
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
APS_PREP_WF = {
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
MCPS_PREP_WF = {
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GCPS_PREP_WF = {
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
FHPS_PREP_WF = {
Type = float32
NumberOfElements = 8000
NumberOfDimensions = 1
}
GYA_PREPRO_TIME = {
Type = int32
}
FHPS_PrePro = {
Type = float32
}
CSV_LOADED = {
Type = uint32
}
CSV_ERR = {
Type = uint32
}
GCPS_TRG_CURR_SET = {
Type = float32
}
MCPS_TRG_CURR_SET = {
Type = float32
}
BPS_OUT = {
Type = float32
}
APS_OUT = {
Type = float32
}
MHVPS_OUT = {
Type = float32
}
MCPS_OUT = {
Type = float32
}
GCPS_OUT = {
Type = float32
}
BPS_REF = {
Type = float32
}
APS_REF = {
Type = float32
}
MHVPS_REF = {
Type = float32
}
//# FHPS Rump Up completed
FHPS_RU = {
Type = uint8
}
PXI_FAULT = {
Type = uint8
}
PCF_FAULT = {
Type = uint8
}
}
}
+Th1Bridge = {
Class = RealTimeThreadAsyncBridge
NumberOfBuffers = 20
Signals = {
APS_OUT = {
Type = float32
}
BPS_OUT = {
Type = float32
}
MHVPS_OUT = {
Type = float32
}
PLC_STANDBY = {
Type = uint8
}
FHPS_PrePro = {
Type = float32
}
PXI_FAULT = {
Type = uint8
}
PCF_FAULT = {
Type = uint8
}
MCPS_RU_COMPLETED = {
Type = uint8
}
MCPS_RD_COMPLETED = {
Type = uint8
}
CCPS_IN_OPERATION = {
Type = uint8
}
}
}

View File

@@ -0,0 +1,454 @@
#package jada_gyro.RTApp.Functions
//# Copy data from DDB1 to EPICSCAOutput DataSource.
+EPICSOutputGAM = {
Class = IOGAM
InputSignals = {
PCF_STATE = {
DataSource = DDB1
}
//! implicit: unkown signal
MCPS_ACT_SP = { // TODO what the fuck it is?
DataSource = DDB1
Type = uint32
Value = 0
}
//! implicit: unkown signal
GCPS_ACT_SP = { // TODO what the fuck it is?
DataSource = DDB1
Type = uint32
Value = 0
}
BPS_OUT = {
DataSource = DDB1
}
APS_OUT = {
DataSource = DDB1
}
MCPS_OUT = {
DataSource = DDB1
}
GCPS_OUT = {
DataSource = DDB1
}
FHPS_REF = {
DataSource = WGAsyncBridge
}
CSV_LOADED = {
DataSource = DDB1
Type = uint32
}
CSV_ERR = {
DataSource = DDB1
Type = uint32
}
ELAPSED_TIME = {
DataSource = DDB1
Type = uint32
}
HVARMED = {
DataSource = DDB1
Type = uint8
}
HVINJECTION = {
DataSource = DDB1
Type = uint8
}
RFON = {
DataSource = DDB1
}
MHVPS_OUT = {
DataSource = DDB1
}
PREP_TIME_WF = {
DataSource = DDB1
}
MHVPS_PREP_WF = {
DataSource = DDB1
}
BPS_PREP_WF = {
DataSource = DDB1
}
APS_PREP_WF = {
DataSource = DDB1
}
MCPS_PREP_WF = {
DataSource = DDB1
}
GCPS_PREP_WF = {
DataSource = DDB1
}
FHPS_PREP_WF = {
DataSource = DDB1
}
CCPS_REF = {
DataSource = WGAsyncBridge
}
MHVPS_STOP = {
Alias = FAST_STOP
DataSource = DDB1
Type = uint32
}
APS_STOP = {
Alias = FAST_STOP
DataSource = DDB1
Type = uint32
}
BPS_STOP = {
Alias = FAST_STOP
DataSource = DDB1
Type = uint32
}
BEAM_ON_TIME = {
DataSource = DDB1
Type = uint32
}
// MARTe Internal PCF_FLT
PCF_FAULT = {
DataSource = DDB1
}
PCF_FAULT_Sync = {
Alias = PCF_FAULT
DataSource = DDB1
}
PXI_FAULT = {
DataSource = DDB1
}
PXI_FAULT_Sync = {
Alias = PXI_FAULT
DataSource = DDB1
}
BEAM_ON_STAT = {
DataSource = DDB1
Type = uint8
}
SHOT_ID = {
DataSource = DDB1
}
FHPS_AUTO_STAT = {
DataSource = WGAsyncBridge
}
APS_HVON = {
DataSource = DDB1
}
APS_SWON = {
DataSource = DDB1
}
BPS_HVON = {
DataSource = DDB1
}
BPS_SWON = {
DataSource = DDB1
}
MHVPS_HVON = {
DataSource = DDB1
}
TRIGGER = {
DataSource = DDB1
}
ECPC_MOD = {
DataSource = DDB1
}
PLC_PERMIT = {
DataSource = DDB1
}
PLC_OP_SELECTED = {
DataSource = DDB1
}
PLC_CC_OP_SELECTED = {
DataSource = DDB1
}
PLC_SYNCMODE = {
DataSource = DDB1
}
PLC_ITL = {
DataSource = DDB1
}
PLC_STANDBY = {
DataSource = DDB1
}
PLC_READY = {
DataSource = DDB1
}
PLC_ON = {
DataSource = DDB1
}
GYA_APS_FLT = {
DataSource = DDB1
}
GYA_APS_READY = {
DataSource = DDB1
}
GYA_BPS_FLT = {
DataSource = DDB1
}
GYA_BPS_READY = {
DataSource = DDB1
}
MHVPS_FLT = {
DataSource = DDB1
}
MHVPS_READY = {
DataSource = DDB1
}
MHVPS_OC = {
DataSource = DDB1
}
MHVPS_OV = {
DataSource = DDB1
}
CRIO_RV1 = {
DataSource = DDB1
}
CRIO_RV2 = {
DataSource = DDB1
}
CRIO_RV3 = {
DataSource = DDB1
}
FAST_TRIP = {
DataSource = DDB1
}
// DO_REV6 = {
// DataSource = DDB1
// }
PXI6259_Status = {
DataSource = DDB1
}
PXI6683_Status = {
DataSource = DDB1
}
PXI6683_PtpdStatus = {
DataSource = DDB1
}
// PXI_6683_SYNCLOST = {
// DataSource = DDB1
// }
PXI6528_Status = {
DataSource = DDB1
}
}
OutputSignals = {
PCF_STATE = {
DataSource = EPICSCAOutput
Type = uint32
}
MCPS_ACT_SP = {
DataSource = EPICSCAOutput
Type = uint32
}
GCPS_ACT_SP = {
DataSource = EPICSCAOutput
Type = uint32
}
BPS_REF = {
DataSource = EPICSCAOutput
Type = float32
}
APS_REF = {
DataSource = EPICSCAOutput
Type = float32
}
MCPS_TRG_CURR_SET = {
DataSource = EPICSCAOutput
Type = float32
}
GCPS_TRG_CURR_SET = {
DataSource = EPICSCAOutput
Type = float32
}
FHPS_REF = {
DataSource = EPICSCAOutput
Type = float32
}
CSV_LOADED = {
DataSource = EPICSCAOutput
Type = uint32
}
CSV_ERR = {
DataSource = EPICSCAOutput
Type = uint32
}
ELAPSED_TIME = {
DataSource = EPICSCAOutput
Type = uint32
}
HVARMED = {
DataSource = EPICSCAOutput
}
HVINJECTION = {
DataSource = EPICSCAOutput
}
RFON = {
DataSource = EPICSCAOutput
}
MHVPS_REF = {
DataSource = EPICSCAOutput
Type = float32
}
PREP_TIME_WF = {
DataSource = EPICSCAOutput
}
MHVPS_PREP_WF = {
DataSource = EPICSCAOutput
}
BPS_PREP_WF = {
DataSource = EPICSCAOutput
}
APS_PREP_WF = {
DataSource = EPICSCAOutput
}
MCPS_PREP_WF = {
DataSource = EPICSCAOutput
}
GCPS_PREP_WF = {
DataSource = EPICSCAOutput
}
FHPS_PREP_WF = {
DataSource = EPICSCAOutput
}
CCPS_REF = {
DataSource = EPICSCAOutput
}
MHVPS_STOP = {
DataSource = EPICSCAOutput
Type = uint32
}
APS_STOP = {
DataSource = EPICSCAOutput
Type = uint32
}
BPS_STOP = {
DataSource = EPICSCAOutput
Type = uint32
}
BEAM_ON_TIME = {
DataSource = EPICSCAOutput
Type = uint32
}
PCF_FLT = {
DataSource = EPICSCAOutput
}
PCF_FAULT_Sync = {
Alias = PCF_FAULT
DataSource = Th1Bridge
}
PXI_FLT = {
DataSource = EPICSCAOutput
}
PXI_FAULT_Sync = {
Alias = PXI_FAULT
DataSource = Th1Bridge
}
BEAM_ON_STAT = {
DataSource = EPICSCAOutput
}
SHOT_ID = {
DataSource = EPICSCAOutput
}
FHPS_AUTO_STAT = {
DataSource = EPICSCAOutput
}
APS_HVON = {
DataSource = EPICSCAOutput
}
APS_SWON = {
DataSource = EPICSCAOutput
}
BPS_HVON = {
DataSource = EPICSCAOutput
}
BPS_SWON = {
DataSource = EPICSCAOutput
}
MHVPS_HVON = {
DataSource = EPICSCAOutput
}
EXT_TRIGGER = {
DataSource = EPICSCAOutput
}
ECPC_MHVPS_MOD = {
DataSource = EPICSCAOutput
}
PLC_PERMIT = {
DataSource = EPICSCAOutput
}
PLC_OP_SELECTED = {
DataSource = EPICSCAOutput
}
CCPS_IN_OP = {
DataSource = EPICSCAOutput
}
PLC_SYNCMODE = {
DataSource = EPICSCAOutput
}
PLC_ITL = {
DataSource = EPICSCAOutput
}
PLC_STANDBY = {
DataSource = EPICSCAOutput
}
PLC_READY = {
DataSource = EPICSCAOutput
}
PLC_ON = {
DataSource = EPICSCAOutput
}
APS_FLT = {
DataSource = EPICSCAOutput
}
APS_READY = {
DataSource = EPICSCAOutput
}
BPS_FLT = {
DataSource = EPICSCAOutput
}
BPS_READY = {
DataSource = EPICSCAOutput
}
MHPS_FLT = {
DataSource = EPICSCAOutput
}
MHPS_READY = {
DataSource = EPICSCAOutput
}
MHPS_OC = {
DataSource = EPICSCAOutput
}
MHPS_OV = {
DataSource = EPICSCAOutput
}
CRIO_RV1 = {
DataSource = EPICSCAOutput
}
CRIO_RV2 = {
DataSource = EPICSCAOutput
}
CRIO_RV3 = {
DataSource = EPICSCAOutput
}
FAST_ITL = {
DataSource = EPICSCAOutput
}
// FAST_PAUSE = {
// DataSource = EPICSCAOutput
// }
PXI_6259_STATE = {
DataSource = EPICSCAOutput
}
PXI_6683_STATE = {
DataSource = EPICSCAOutput
}
PXI_6683_SYNC = {
DataSource = EPICSCAOutput
}
// PXI_6683_SYNCLOST = {
// DataSource = EPICSCAOutput
// }
PXI_6528_STATE = {
DataSource = EPICSCAOutput
}
}
}

View File

@@ -0,0 +1,99 @@
#package jada_gyro.RTApp.Functions
// GAM for prepro
+WFRecordGAM = {
Class = JAWFRecordGAM
Directory = "../Configurations" // TODO: Enter directory path for prepro files.
InputSignals = {
CSV_LOAD = {
DataSource = EPICSCAInput
}
Filename = {
Alias = CSV_NAME
DataSource = EPICSCAInput
}
}
OutputSignals = {
PREP_TIME_WF = {
DataSource = DDB1
}
MHVPS_PREP_WF = {
DataSource = DDB1
}
BPS_PREP_WF = {
DataSource = DDB1
}
APS_PREP_WF = {
DataSource = DDB1
}
MCPS_PREP_WF = {
DataSource = DDB1
}
GCPS_PREP_WF = {
DataSource = DDB1
}
FHPS_PREP_WF = {
DataSource = DDB1
}
}
}
+PreProgrammedGAM = {
Class = JAPreProgrammedGAM
Directory = "../Configurations" // TODO: Enter the directory path for prepro files.
PreProgrammedPeriodMs = 1 // Parameter update periods in ms.
InputSignals = {
CSV_LOAD = {
DataSource = EPICSCAInput
}
Filename = {
Alias = CSV_NAME
DataSource = EPICSCAInput
}
FHPS_REF = {
Alias = FHPS_AUTO_TAGV
DataSource = EPICSCAInput
Type = float32
}
RFON = {
DataSource = DDB1
}
}
OutputSignals = {
GYA_PREPRO_TIME = {
DataSource = DDB1
Type = int32
}
MHVPS_REF = {
DataSource = DDB1
Type = float32
}
BPS_REF = {
DataSource = DDB1
Type = float32
}
APS_REF = {
DataSource = DDB1
Type = float32
}
MCPS_TRG_CURR_SET = {
DataSource = DDB1
Type = float32
}
GCPS_TRG_CURR_SET = {
DataSource = DDB1
Type = float32
}
FHPS_PrePro = {
DataSource = DDB1
Type = float32
}
CSV_LOADED = {
DataSource = DDB1
Type = uint32
}
CSV_ERR = {
DataSource = DDB1
Type = uint32
}
}
}

View File

@@ -0,0 +1,43 @@
#package jada_gyro.RTApp.Functions
+PXIErrorGAM = {
Class = JAConditionalSignalUpdateGAM
Operation = "OR"
InputSignals = {
PXI6368_Status_3 = {
Alias = PXI6368_Status
DataSource = Th4Bridge
Comparator = "EQUALS"
Type = uint32
Value = 3
}
PXI6368_Status_4 = {
Alias = PXI6368_Status
DataSource = Th4Bridge
Comparator = "EQUALS"
Type = uint32
Value = 4
}
PXI6528_Status = {
DataSource = DDB1
Comparator = "GREATER"
Type = uint32
Value = 0
}
PXI6259_Status = {
DataSource = DDB1
Comparator = "GREATER"
Type = uint32
Value = 0
}
}
OutputSignals = {
PXI_FAULT = {
DataSource = DDB1
Type = uint8
DefaultValue = 0
Value = 1
}
}
}

View File

@@ -0,0 +1,115 @@
#package jada_gyro.RTApp.Functions
//# MCPS, GCPS PV to DDB1
+MCPSGAM = {
Class = IOGAM
InputSignals = {
MCPS_TRG_CURR_MANUAL = {
DataSource = EPICSCAInput
Type = float32
}
GCPS_TRG_CURR_MANUAL = {
DataSource = EPICSCAInput
Type = float32
}
}
OutputSignals = {
MCPS_TRG_CURR_SET = {
DataSource = DDB1
Type = float32
}
GCPS_TRG_CURR_SET = {
DataSource = DDB1
Type = float32
}
}
}
//# Switching AO port source between internal variable and EPICS PV.
+ChoiceGAM = {
Class = JASourceChoiceGAM
numberOfPVs = 5
InputSignals = {
BPS_REF = {
DataSource = DDB1
Type = float32
}
BPS_MANUAL = {
DataSource = EPICSCAInput
Type = float32
}
BPS_MM = {
DataSource = EPICSCAInput
Type = uint32
}
APS_REF = {
DataSource = DDB1
Type = float32
}
APS_MANUAL = {
DataSource = EPICSCAInput
Type = float32
}
APS_MM = {
DataSource = EPICSCAInput
Type = uint32
}
MHVPS_REF = {
DataSource = DDB1
Type = float32
}
MHVPS_MANUAL = {
DataSource = EPICSCAInput
Type = float32
}
MHVPS_MM = {
DataSource = EPICSCAInput
Type = uint32
}
MCPS_TRG_CURR_SET = {
DataSource = DDB1
Type = float32
}
MCPS_TRG_CURR_MANUAL = {
DataSource = EPICSCAInput
Type = float32
}
MCPS_MM = {
DataSource = EPICSCAInput
Type = uint32
}
GCPS_TRG_CURR_SET = {
DataSource = DDB1
Type = float32
}
GCPS_TRG_CURR_MANUAL = {
DataSource = EPICSCAInput
Type = float32
}
GCPS_MM = {
DataSource = EPICSCAInput
Type = uint32
}
}
OutputSignals = {
BPS_OUT = {
DataSource = DDB1
Type = float32
}
APS_OUT = {
DataSource = DDB1
Type = float32
}
MHVPS_OUT = {
DataSource = DDB1
Type = float32
}
MCPS_OUT = {
DataSource = DDB1
Type = float32
}
GCPS_OUT = {
DataSource = DDB1
Type = float32
}
}
}

View File

@@ -0,0 +1,530 @@
#package jada_gyro.RTApp
+Data = {
+DDB1 = {
Signals = {
//# Fast controller state variable
//# - 0: Init
//# - 1: Error
//# - 3: Wait Standby
//# - 4: Wait Ready
//# - 5: Wait Permit
//# - 6: Wait HVON
//# - 7: Wait HVON PREP
//# - 8: Wait HVON SDN
//# - 9: Wait HVON SDN PREP
PCF_STATE = {
Type = uint32
}
}
}
}
+Functions = {
//# GAM That publish state of the system
//# The values will be updated by messages coming from
//# the statemachine
+StateGAM = {
Class = ConstantGAM
OutputSignals = {
PCF_STATE = {
DataSource = DDB1
Default = @state_none
}
PCF_FAULT = {
DataSource = DDB1
Default = 1
}
}
}
//# From any state to Error state.
+GoErrorGAM = {
Class = JAMessageGAM
Operation = "OR"
InputSignals = {
PXI_FAULT = {
DataSoruce = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
// PLC_ITL = {
// DataSource = DDB1
// Type = uint8
// Comparator = "EQUALS"
// Value = 1
// }
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoError
}
}
//# From any state to Error state.
+GoErrorHVGAM = {
Class = JAMessageGAM
Operation = "OR"
InputSignals = {
GYA_APS_FLT = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
GYA_BPS_FLT = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
MHVPS_OV = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
MHVPS_OC = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
MHVPS_FLT = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
PXI_FAULT = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
MIS_ITL = {
DataSource = EPICSCAInput
Type = uint32
Comparator = "EQUALS"
Value = 1
}
PLC_ITL = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoError
}
}
//# Reset Error GAM
+ResetErrorGAM = {
Class = JAMessageGAM
Operation = "AND"
InputSignals = {
RESET_FLT = {
DataSource = EPICSCAInput
Type = uint32
Comparator = "EQUALS"
Value = 1
}
PXI_FAULT = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
// PLC_ITL = {
// DataSource = DDB1
// Type = uint8
// Comparator = "EQUALS"
// Value = 0
// }
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoWaitStandby
}
}
//# Go to wait standby
+GoWaitStandbyGAM = {
Class = JAMessageGAM
Operation = "AND"
InputSignals = {
PLC_SELECT = {
DataSource = EPICSCAInput
Comparator = "EQUALS"
Type = uint32
Value = 1
}
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoWaitStandby
}
}
+GoDisabledGAM = {
Class = JAMessageGAM
Operation = "AND"
InputSignals = {
PLC_SELECT = {
DataSource = EPICSCAInput
Type = uint32
Comparator = "EQUALS"
Value = 0
}
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoDisabled
}
}
//# GAM in WaitReady state. Check MCPS,GCPS,FHPS state for state transition.
+GoWaitReadyGAM = {
Class = JAMessageGAM
Operation = "AND"
InputSignals = {
MCPS_ACT_RB = {
DataSource = EPICSCAInput
Type = uint32
Comparator = "EQUALS"
Value = 3
}
MCPS_CURR_MON = {
DataSource = EPICSCAInput
Type = float32
Comparator = "GREATER"
Value = 0.0
}
GCPS_ACT_RB = {
DataSource = EPICSCAInput
Type = uint32
Comparator = "EQUALS"
Value = 3
}
GCPS_CURR_MON = {
DataSource = EPICSCAInput
Type = float32
Comparator = "GREATER"
Value = 0.0
}
FHPS_RU = {
DataSource = DDB1
Comparator = "EQUALS"
Type = uint8
Value = 1
}
GY_FHPS_MEAS_ACV = {
DataSource = EPICSCAInput
Type = float32
Comparator = "GREATER"
Value = 0.0
}
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoWaitReady
}
}
//# GAM in WaitReady state. Check PLC_READY and CCPS_IN_OPERATION status.
+GoWaitPermitGAM = {
Class = JAMessageGAM
Operation = "AND"
InputSignals = {
PLC_CC_OP_SELECTED = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
PLC_READY = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
MIS_ITL = {
DataSource = EPICSCAInput
Type = uint32
Comparator = "EQUALS"
Value = 0
}
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoWaitPermit
}
}
+GoWaitStandbyFromReadyGAM = {
Class = JAMessageGAM
Operation = "AND"
InputSignals = {
PLC_STANDBY = {
DataSource = DDB1
Type = uint8
Value = 0
Comparator = "EQUALS"
}
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoWaitStandby
}
}
//# GAM in WaitPermit state. Check Permit and States of Operation Modes.
+GoWaitReadyFromWaitPermitGAM = {
Class = JAMessageGAM
Operation = "OR"
InputSignals = {
PLC_STANDBY = {
DataSource = DDB1
Type = uint8
Value = 0
Comparator = "EQUALS"
}
PLC_READY = {
DataSource = DDB1
Type = uint8
Value = 0
Comparator = "EQUALS"
}
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoWaitReady
}
}
+GoWaitHVONGAM = {
Class = JAMessageGAM
Operation = "AND"
InputSignals = {
PLC_SYNCMODE = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 0
}
PREP_MODE = {
DataSource = EPICSCAInput
Type = uint32
Comparator = "EQUALS"
Value = 0
}
PLC_PERMIT = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
MIS_ITL = {
DataSource = EPICSCAInput
Type = uint32
Comparator = "EQUALS"
Value = 0
}
PLC_ITL = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 0
}
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoWaitHVON
}
}
+GoWaitHVON_PREP_GAM = {
Class = JAMessageGAM
Operation = "AND"
InputSignals = {
PLC_SYNCMODE = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 0
}
PREP_MODE = {
DataSource = EPICSCAInput
Type = uint32
Comparator = "EQUALS"
Value = 1
}
PLC_PERMIT = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoWaitHVON_PREP
}
}
+GoWaitHVON_SDN_GAM = {
Class = JAMessageGAM
Operation = "AND"
InputSignals = {
PLC_SYNCMODE = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
PREP_MODE = {
DataSource = EPICSCAInput
Type = uint32
Comparator = "EQUALS"
Value = 0
}
PLC_PERMIT = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
MIS_ITL = {
DataSource = EPICSCAInput
Type = uint32
Comparator = "EQUALS"
Value = 0
}
PLC_ITL = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 0
}
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoWaitHVON_SDN
}
}
+GoWaitHVON_SDN_PREP_GAM = {
Class = JAMessageGAM
Operation = "AND"
InputSignals = {
PLC_SYNCMODE = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
PREP_MODE = {
DataSource = EPICSCAInput
Type = uint32
Comparator = "EQUALS"
Value = 1
}
PLC_PERMIT = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 1
}
MIS_ITL = {
DataSource = EPICSCAInput
Type = uint32
Comparator = "EQUALS"
Value = 0
}
PLC_ITL = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 0
}
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoWaitHVON_SDN_PREP
}
}
//# GAM in WaitHVON_xx states. If PLC_READY is zero, goto WaitStandby.
+FromWaitHVONToWaitStandby = {
Class = JAMessageGAM
Operation = "AND"
InputSignals = {
PLC_READY = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 0
}
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoWaitStandby
}
}
//# GAM in WaitHVON_xx states. If PLC_PERMIT is zero, goto WaitPermit.
+FromWaitHVONToWaitPermit = {
Class = JAMessageGAM
Operation = "AND"
InputSignals = {
PLC_PERMIT = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 0
}
APS_HVON = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 0
}
BPS_HVON = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 0
}
MHVPS_HVON = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 0
}
BPS_SWON = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 0
}
APS_SWON = {
DataSource = DDB1
Type = uint8
Comparator = "EQUALS"
Value = 0
}
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoWaitPermit
}
}
}

View File

@@ -0,0 +1,539 @@
#package jada_gyro.RTApp.Functions
//# Synchronise Thread 1 to Thread 3 using SynchTread data source
//# Thread 1 will be executed every @fast_slow_ratio cycles of Thread 3
+SyncThreadConsumerGAM = {
Class = IOGAM
InputSignals = {
PXI6259_Status = {
DataSource = SynchThread
Samples = @fast_slow_ratio
Frequency = 1
}
PXI6528_Status = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
PXI6683_Status = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
PXI6683_PtpdStatus = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
GYA_APS_READY = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
GYA_APS_FLT = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
GYA_BPS_READY = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
GYA_BPS_FLT = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
MHVPS_OV = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
MHVPS_OC = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
MHVPS_FLT = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
MHVPS_READY = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
ECPC_MOD = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
FAST_TRIP = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
PLC_ITL = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
PLC_STANDBY = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
PLC_READY = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
PLC_ON = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
PLC_PERMIT = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
PLC_OP_SELECTED = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
PLC_CC_OP_SELECTED = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
PLC_SYNCMODE = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
TRIGGER = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
BEAM_ON_STAT = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
HVARMED = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
HVINJECTION = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
RFON = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
BEAM_ON_TIME = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
RFON_TIME = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
SHOT_ID = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
CRIO_RV1 = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
CRIO_RV2 = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
CRIO_RV3 = {
DataSource = SynchThread
Samples = @fast_slow_ratio
}
}
OutputSignals = {
PXI6259_Status_SAMPLES = {
DataSource = DDB1
}
PXI6528_Status_SAMPLES = {
DataSource = DDB1
}
PXI6683_Status_SAMPLES = {
DataSource = DDB1
}
PXI6683_PtpdStatus_SAMPLES = {
DataSource = DDB1
}
GYA_APS_READY_SAMPLES = {
DataSource = DDB1
}
GYA_APS_FLT_SAMPLES = {
DataSource = DDB1
}
GYA_BPS_READY_SAMPLES = {
DataSource = DDB1
}
GYA_BPS_FLT_SAMPLES = {
DataSource = DDB1
}
MHVPS_OV_SAMPLES = {
DataSource = DDB1
}
MHVPS_OC_SAMPLES = {
DataSource = DDB1
}
MHVPS_FLT_SAMPLES = {
DataSource = DDB1
}
MHVPS_READY_SAMPLES = {
DataSource = DDB1
}
ECPC_MOD_SAMPLES = {
DataSource = DDB1
}
FAST_TRIP_SAMPLES = {
DataSource = DDB1
}
PLC_ITL_SAMPLES = {
DataSource = DDB1
}
PLC_STANDBY_SAMPLES = {
DataSource = DDB1
}
PLC_READY_SAMPLES = {
DataSource = DDB1
}
PLC_ON_SAMPLES = {
DataSource = DDB1
}
PLC_PERMIT_SAMPLES = {
DataSource = DDB1
}
PLC_OP_SELECTED_SAMPLES = {
DataSource = DDB1
}
PLC_CC_OP_SELECTED_SAMPLES = {
DataSource = DDB1
}
PLC_SYNCMODE_SAMPLES = {
DataSource = DDB1
}
TRIGGER_SAMPLES = {
DataSource = DDB1
}
BEAM_ON_STAT_SAMPLES = {
DataSource = DDB1
}
HVARMED_SAMPLES = {
DataSource = DDB1
}
HVINJECTION_SAMPLES = {
DataSource = DDB1
}
RFON_SAMPLES = {
DataSource = DDB1
}
ELAPSED_TIME_SAMPLES = {
DataSource = DDB1
}
BEAM_ON_TIME_SAMPLES = {
DataSource = DDB1
}
SHOT_ID_SAMPLES = {
DataSource = DDB1
}
CRIO_RV1_SAMPLES = {
DataSource = DDB1
}
CRIO_RV2_SAMPLES = {
DataSource = DDB1
}
CRIO_RV3_SAMPLES = {
DataSource = DDB1
}
}
}
+DecimateGAM = {
Class = IOGAM
InputSignals = {
PXI6259_Status_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
PXI6528_Status_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
PXI6683_Status_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
PXI6683_PtpdStatus_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
GYA_APS_READY_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
GYA_APS_FLT_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
GYA_BPS_READY_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
GYA_BPS_FLT_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
MHVPS_OV_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
MHVPS_OC_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
MHVPS_FLT_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
MHVPS_READY_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
ECPC_MOD_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
FAST_TRIP_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
PLC_ITL_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
PLC_STANDBY_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
PLC_READY_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
PLC_ON_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
PLC_PERMIT_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
PLC_OP_SELECTED_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
PLC_CC_OP_SELECTED_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
PLC_SYNCMODE_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
TRIGGER_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
BEAM_ON_STAT_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
HVARMED_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
HVINJECTION_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
RFON_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
ELAPSED_TIME_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
BEAM_ON_TIME_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
SHOT_ID_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
CRIO_RV1_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
CRIO_RV2_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
CRIO_RV3_SAMPLES = {
DataSource = DDB1
Ranges = { { @dec_index, @dec_index } }
}
}
OutputSignals = {
PXI6259_Status = {
DataSource = DDB1
}
PXI6528_Status = {
DataSource = DDB1
}
PXI6683_Status = {
DataSource = DDB1
}
PXI6683_PtpdStatus = {
DataSource = DDB1
}
GYA_APS_READY = {
DataSource = DDB1
}
GYA_APS_FLT = {
DataSource = DDB1
}
GYA_BPS_READY = {
DataSource = DDB1
}
GYA_BPS_FLT = {
DataSource = DDB1
}
MHVPS_OV = {
DataSource = DDB1
}
MHVPS_OC = {
DataSource = DDB1
}
MHVPS_FLT = {
DataSource = DDB1
}
MHVPS_READY = {
DataSource = DDB1
}
ECPC_MOD = {
DataSource = DDB1
}
FAST_TRIP = {
DataSource = DDB1
}
PLC_ITL = {
DataSource = DDB1
}
PLC_STANDBY = {
DataSource = DDB1
}
PLC_READY = {
DataSource = DDB1
}
PLC_ON = {
DataSource = DDB1
}
PLC_PERMIT = {
DataSource = DDB1
}
PLC_OP_SELECTED = {
DataSource = DDB1
}
PLC_CC_OP_SELECTED = {
DataSource = DDB1
}
PLC_SYNCMODE = {
DataSource = DDB1
}
TRIGGER = {
DataSource = DDB1
}
BEAM_ON_STAT = {
DataSource = DDB1
}
HVARMED = {
DataSource = DDB1
}
HVINJECTION = {
DataSource = DDB1
}
RFON = {
DataSource = DDB1
}
ELAPSED_TIME = {
DataSource = DDB1
}
BEAM_ON_TIME = {
DataSource = DDB1
}
SHOT_ID = {
DataSource = DDB1
}
CRIO_RV1 = {
DataSource = DDB1
}
CRIO_RV2 = {
DataSource = DDB1
}
CRIO_RV3 = {
DataSource = DDB1
}
}
}
+EPICSThSyncGAM = {
Class = IOGAM
InputSignals = {
BPS_OUT = {
DataSource = DDB1
}
APS_OUT = {
DataSource = DDB1
}
MHVPS_OUT = {
DataSource = DDB1
}
PLC_STANDBY = {
DataSource = DDB1
}
FHPS_PrePro = {
DataSource = DDB1
}
MCPS_RU_COMPLETED = {
DataSource = EPICSCAInput
}
MCPS_RD_COMPLETED = {
DataSource = EPICSCAInput
}
CCPS_IN_OPERATION = {
DataSource = EPICSCAInput
}
}
OutputSignals = {
BPS_OUT = {
DataSource = Th1Bridge
}
APS_OUT = {
DataSource = Th1Bridge
}
MHVPS_OUT = {
DataSource = Th1Bridge
}
PLC_STANDBY = {
DataSource = Th1Bridge
}
FHPS_PrePro = {
DataSource = Th1Bridge
}
MCPS_RU_COMPLETED = {
DataSource = Th1Bridge
}
MCPS_RD_COMPLETED = {
DataSource = Th1Bridge
}
CCPS_IN_OPERATION = {
DataSource = Th1Bridge
}
}
}

View File

@@ -0,0 +1,260 @@
#package jada_gyro.RTApp
+Data = {
//# SDN subscriber
+SDNCommands = {
Class = "SDN::SDNSubscriber"
Topic = "ECPC2SCUJA"
Interface = "enp35s0f1"
CPUs = 0x200
Locked = 1
Timeout = 2
Signals = {
//! unused: SDN header has no use in this appliation
Header = {
Type = uint8
NumberOfElements = 48
}
//! unused: not used for nothing
Dummy = {
Type = uint8
NumberOfElements = 4
}
ESDNTime = {
Type = uint32
NumberOfElements = 1
}
Command = {
Type = uint16
NumberOfDimensions = 1
NumberOfElements = 64
}
}
}
+Th2Bridge = {
Class = RealTimeThreadAsyncBridge
NumberOfBuffers = 20
Signals = {
Command = {
Type = uint16
}
RFON = {
Type = uint32
}
Time = {
Type = uint32
}
HVInjection = {
Type = uint32
}
}
}
+DDB2 = {
Signals = {
WaveformPacketID = {
Type = uint16
}
ESDNTime = {
Type = uint32
}
}
}
+SDNReply = {
Class = "SDN::SDNPublisher"
Topic = "SCUJA2ECPC"
Interface = "enp35s0f1"
CPUs = 0x200 // changed from 0x100
Address = "192.195.1.1"
Port = 2000
Locked = 1
Signals = {
//! unused: SDN header not used
Header = {
Type = uint8
NumberOfElements = 48
}
//! unused: not used anywhere
Dummy = {
Type = uint8
NumberOfElements = 4
}
ESDNTime = {
Type = uint32
}
//! unused: why?
ReplyStatus = {
Type = uint16
}
ReplyWaveformAck = {
Type = uint16
}
// Status (26Bytes?) is not assigned
// GyrotronA measurements
// 56Bytes are used as Gyrotron1 Measurements (verified on 2020/10/22)
GYA_MHVPS_MESVOLT = {
Type = float32
}
GYA_MHVPS_MESCURR = {
Type = float32
}
GYA_BPS_MESVOLT = {
Type = float32
}
GYA_BPS_MESCURR = {
Type = float32
}
GYA_APS_MESVOLT = {
Type = float32
}
GYA_APS_MESCURR = {
Type = float32
}
GYA_ARC1_MESVOLT = {
Type = float32
}
GYA_ARC2_MESVOLT = {
Type = float32
}
GYA_ARC3_MESVOLT = {
Type = float32
}
GYA_MCPS_CURR_MON = {
Type = float32
}
GYA_GCPS_CURR_MON = {
Type = float32
}
GYA_FHPS_MEAS_ACI = {
Type = float32
}
GYA_CCPS_MEAS_DCI = {
Type = float32
}
}
}
}
+Functions = {
+SDNCommandGAM = {
Class = IOGAM
InputSignals = {
Command = {
DataSource = SDNCommands
NumberOfDimensions = 1
NumberOfElements = 64
Ranges = { { 0, 0 } }
}
ESDNTime = {
DataSource = SDNCommands
NumberOfDimensions = 1
NumberOfElements = 1
}
}
OutputSignals = {
Command = {
DataSource = Th2Bridge
}
ESDNTime = {
DataSource = DDB2
}
}
}
+SDNReplyGAM = {
Class = IOGAM
InputSignals = {
ESDNTime = {
DataSource = DDB2
}
WaveformPacketID = {
DataSource = DDB2
}
GY_BPS_V_MEAS = {
DataSource = Th4Bridge
}
GY_BPS_I_MEAS = {
DataSource = Th4Bridge
}
GY_APS_V_MEAS = {
DataSource = Th4Bridge
}
GY_APS_I_MEAS = {
DataSource = Th4Bridge
}
GY_ARC1_V_MEAS = {
DataSource = Th4Bridge
}
GY_ARC2_V_MEAS = {
DataSource = Th4Bridge
}
GY_ARC3_V_MEAS = {
DataSource = Th4Bridge
}
GY_MHV_V_MEAS = {
DataSource = Th4Bridge
}
GY_MHV_I_MEAS = {
DataSource = Th4Bridge
}
GY_MCPS_CURR_MON = {
DataSource = EPICSCAInput
}
GY_GCPS_CURR_MON = {
DataSource = EPICSCAInput
}
GY_FHPS_MEAS_ACI = {
DataSource = EPICSCAInput
}
GY_CCPS_MEAS_DCI = {
DataSource = EPICSCAInput
}
}
OutputSignals = {
ESDNTime = {
DataSource = SDNReply
}
ReplyWaveformAck = {
DataSource = SDNReply
}
GYA_BPS_MESVOLT = {
DataSource = SDNReply
}
GYA_BPS_MESCURR = {
DataSource = SDNReply
}
GYA_APS_MESVOLT = {
DataSource = SDNReply
}
GYA_APS_MESCURR = {
DataSource = SDNReply
}
GYA_ARC1_MESVOLT = {
DataSource = SDNReply
}
GYA_ARC2_MESVOLT = {
DataSource = SDNReply
}
GYA_ARC3_MESVOLT = {
DataSource = SDNReply
}
GYA_MHVPS_MESVOLT = {
DataSource = SDNReply
}
GYA_MHVPS_MESCURR = {
DataSource = SDNReply
}
GYA_MCPS_CURR_MON = {
DataSource = SDNReply
}
GYA_GCPS_CURR_MON = {
DataSource = SDNReply
}
GYA_FHPS_MEAS_ACI = {
DataSource = SDNReply
}
GYA_CCPS_MEAS_DCI = {
DataSource = SDNReply
Trigger = 1
}
}
}
}

View File

@@ -0,0 +1,395 @@
#package jada_gyro.RTApp
+Data = {
+SynchThread = {
Class = RealTimeThreadSynchronisation
Timeout = 100
Signals = {
DiTime = {
Type = uint32
}
PXI6259_Status = {
Type = uint32
}
PXI6528_Status = {
Type = uint32
}
PXI6683_Status = {
Type = uint8
}
PXI6683_PtpdStatus = {
Type = uint8
}
GYA_APS_READY = {
Type = uint8
}
GYA_APS_FLT = {
Type = uint8
}
GYA_BPS_READY = {
Type = uint8
}
GYA_BPS_FLT = {
Type = uint8
}
MHVPS_OV = {
Type = uint8
}
MHVPS_OC = {
Type = uint8
}
MHVPS_FLT = {
Type = uint8
}
MHVPS_READY = {
Type = uint8
}
ECPC_MOD = {
Type = uint8
}
FAST_TRIP = {
Type = uint8
}
CRIO_RV1 = {
Type = uint8
}
CRIO_RV2 = {
Type = uint8
}
CRIO_RV3 = {
Type = uint8
}
PLC_ITL = {
Type = uint8
}
PLC_STANDBY = {
Type = uint8
}
PLC_READY = {
Type = uint8
}
PLC_ON = {
Type = uint8
}
PLC_PERMIT = {
Type = uint8
}
PLC_OP_SELECTED = {
Type = uint8
}
PLC_CC_OP_SELECTED = {
Type = uint8
}
PLC_SYNCMODE = {
Type = uint8
}
TRIGGER = {
Type = uint8
}
BEAM_ON_STAT = {
Type = uint8
}
HVARMED = {
Type = uint8
}
HVINJECTION = {
Type = uint8
}
RFON = {
Type = uint8
}
BEAM_ON_TIME = {
Type = uint32
}
RFON_TIME = {
Type = uint32
}
SHOT_ID = {
Type = uint32
}
}
}
+DDB3 = {
Signals = {
BEAM_ON_TIME = {
Type = uint32
}
RFON_TIME = {
Type = uint32
}
PXI6528_Status = {
Type = uint32
}
MHVPS_DT = {
Type = uint32
}
APS_HVON_DT = {
Type = uint32
}
APS_SWON_DT = {
Type = uint32
}
BPS_HVON_DT = {
Type = uint32
}
BPS_SWON_DT = {
Type = uint32
}
SHOTLEN = {
Type = uint32
}
SHORT_PULSE_MODE = {
Type = uint32
}
}
}
}
+Functions = {
+SyncThreadProducerGAM = {
Class = IOGAM
InputSignals = {
Time = {
DataSource = DDB3
}
PXI6259_Status = {
Alias = Status
DataSource = NI6259_DIO_P0
}
PXI6528_Status = {
DataSource = DDB3
Value = 0
}
PXI6683_Status = {
DataSource = TimingBoard
Alias = Status
}
PXI6683_PtpdStatus = {
DataSource = TimingBoard
Alias = PtpdStatus
}
GYA_APS_READY = {
DataSource = DDB3
}
GYA_APS_FLT = {
DataSource = DDB3
}
GYA_BPS_READY = {
DataSource = DDB3
}
GYA_BPS_FLT = {
DataSource = DDB3
}
MHVPS_OV = {
DataSource = DDB3
}
MHVPS_OC = {
DataSource = DDB3
}
MHVPS_FLT = {
DataSource = DDB3
}
MHVPS_READY = {
DataSource = DDB3
}
ECPC_MOD = {
DataSource = DDB3
}
FAST_TRIP = {
DataSource = DDB3
}
CRIO_RV1 = {
DataSource = DDB3
}
CRIO_RV2 = {
DataSource = DDB3
}
CRIO_RV3 = {
DataSource = DDB3
}
PLC_ITL = {
DataSource = DDB3
}
PLC_STANDBY = {
DataSource = DDB3
}
PLC_READY = {
DataSource = DDB3
}
PLC_ON = {
DataSource = DDB3
}
PLC_PERMIT = {
DataSource = DDB3
}
PLC_OP_SELECTED = {
DataSource = DDB3
}
PLC_CC_OP_SELECTED = {
DataSource = DDB3
}
PLC_SYNCMODE = {
DataSource = DDB3
}
TRIGGER = {
DataSource = DDB3
}
BEAM_ON_STAT = {
DataSource = DDB3
}
HVARMED = {
DataSource = DDB3
}
HVINJECTION = {
DataSource = DDB3
}
RFON = {
DataSource = DDB3
}
BEAM_ON_TIME = {
DataSource = DDB3
}
RFON_TIME = {
DataSource = DDB3
}
SHOT_ID = {
DataSource = DDB3
}
}
OutputSignals = {
DiTime = {
DataSource = SynchThread
}
PXI6259_Status = {
DataSource = SynchThread
}
PXI6528_Status = {
DataSource = SynchThread
}
PXI6683_Status = {
DataSource = SynchThread
}
PXI6683_PtpdStatus = {
DataSource = SynchThread
}
GYA_APS_READY = {
DataSource = SynchThread
}
GYA_APS_FLT = {
DataSource = SynchThread
}
GYA_BPS_READY = {
DataSource = SynchThread
}
GYA_BPS_FLT = {
DataSource = SynchThread
}
MHVPS_OV = {
DataSource = SynchThread
}
MHVPS_OC = {
DataSource = SynchThread
}
MHVPS_FLT = {
DataSource = SynchThread
}
MHVPS_READY = {
DataSource = SynchThread
}
ECPC_MOD = {
DataSource = SynchThread
}
FAST_TRIP = {
DataSource = SynchThread
}
CRIO_RV1 = {
DataSource = SynchThread
}
CRIO_RV2 = {
DataSource = SynchThread
}
CRIO_RV3 = {
DataSource = SynchThread
}
PLC_ITL = {
DataSource = SynchThread
}
PLC_STANDBY = {
DataSource = SynchThread
}
PLC_READY = {
DataSource = SynchThread
}
PLC_ON = {
DataSource = SynchThread
}
PLC_PERMIT = {
DataSource = SynchThread
}
PLC_OP_SELECTED = {
DataSource = SynchThread
}
PLC_CC_OP_SELECTED = {
DataSource = SynchThread
}
PLC_SYNCMODE = {
DataSource = SynchThread
}
TRIGGER = {
DataSource = SynchThread
}
BEAM_ON_STAT = {
DataSource = SynchThread
}
HVARMED = {
DataSource = SynchThread
}
HVINJECTION = {
DataSource = SynchThread
}
RFON = {
DataSource = SynchThread
}
BEAM_ON_TIME = {
DataSource = SynchThread
}
RFON_TIME = {
DataSource = SynchThread
}
SHOT_ID = {
DataSource = SynchThread
}
}
}
+AsyncIOGAM = {
Class = IOGAM
InputSignals = {
FHPS_RU = {
DataSource = WGAsyncBridge
}
CCPS_IN_OPERATION = {
DataSource = Th1Bridge
}
MCPS_RU_COMPLETED = {
DataSource = Th1Bridge
}
MCPS_RD_COMPLETED = {
DataSource = Th1Bridge
}
}
OutputSignals = {
FHPS_RU = {
DataSource = DDB3
}
CCPS_IN_OPERATION = {
DataSource = DDB3
}
SCM_RU = {
DataSource = DDB3
}
SCM_RD = {
DataSource = DDB3
}
}
}
}

View File

@@ -0,0 +1,61 @@
#package jada_gyro.RTApp
+Functions = {
//# Thread3 pulse parameter EPICS PVs read.
//# TODO: Should be better to read it in thread 1 and use a async bridge to copy to 3?
+FastEpicsInputGAM = {
Class = IOGAM
InputSignals = {
MHVPS_DT = {
DataSource = EPICSCAInput
Type = uint32
}
APS_HVON_DT = {
DataSource = EPICSCAInput
Type = uint32
}
APS_SWON_DT = {
DataSource = EPICSCAInput
Type = uint32
}
BPS_HVON_DT = {
DataSource = EPICSCAInput
Type = uint32
}
BPS_SWON_DT = {
DataSource = EPICSCAInput
Type = uint32
}
SHOTLEN = {
DataSource = EPICSCAInput
Type = uint32
}
SHORT_PULSE_MODE = {
DataSource = EPICSCAInput
}
}
OutputSignals = {
MHVPS_DT = {
DataSource = DDB3
}
APS_HVON_DT = {
DataSource = DDB3
}
APS_SWON_DT = {
DataSource = DDB3
}
BPS_HVON_DT = {
DataSource = DDB3
}
BPS_SWON_DT = {
DataSource = DDB3
}
SHOTLEN = {
DataSource = DDB3
}
SHORT_PULSE_MODE = {
DataSource = DDB3
}
}
}
}

View File

@@ -0,0 +1,44 @@
#package jada_gyro.RTApp.Functions
//# Reset HVPS outputs. ToDo: Fix to access NI d.s.
+HVPSsOffGAM = {
Class = ConstantGAM
OutputSignals = {
MHVPS_HVON = {
DataSource = DDB3
Default = 0
}
BPS_HVON = {
DataSource = DDB3
Default = 0
}
BPS_SWON = {
DataSource = DDB3
Default = 0
}
APS_HVON = {
DataSource = DDB3
Default = 0
}
APS_SWON = {
DataSource = DDB3
Default = 0
}
HVARMED = {
DataSource = DDB3
Default = 0
}
HVINJECTION = {
DataSource = DDB3
Default = 0
}
RFON = {
DataSource = DDB3
Default = 0
}
BEAM_ON_STAT = {
DataSource = DDB3
Default = 0
}
}
}

View File

@@ -0,0 +1,102 @@
#package jada_gyro.RTApp.Functions
+FastStopRequestGAM = {
Class = JAConditionalSignalUpdateGAM
Operation = "OR"
InputSignals = {
GYA_APS_FLT = {
DataSource = DDB3
Type = uint8
Comparator = "EQUALS"
Value = 1
}
GYA_BPS_FLT = {
DataSource = DDB3
Type = uint8
Comparator = "EQUALS"
Value = 1
}
MHVPS_OV = {
DataSource = DDB3
Type = uint8
Comparator = "EQUALS"
Value = 1
}
MHVPS_OC = {
DataSource = DDB3
Type = uint8
Comparator = "EQUALS"
Value = 1
}
MHVPS_FLT = {
DataSource = DDB3
Type = uint8
Comparator = "EQUALS"
Value = 1
}
MIS_ITL = {
DataSource = EPICSCAInput
Type = uint32
Comparator = "EQUALS"
Value = 1
}
PLC_ITL = {
DataSource = DDB3
Type = uint8
Comparator = "EQUALS"
Value = 1
}
}
OutputSignals = {
FAST_STOP = {
DataSource = DDB3
Type = uint8
DefaultValue = 0
Value = 1
}
}
}
//# Check the selected mode, and check maximum pulse length. Use with a StateMachineGAM
+ModeLimitGAM = {
Class = JAModeControlGAM
InputSignals = {
PLC_MODE1 = {
DataSource = EPICSCAInput
}
MD1_SHOTLEN_LIM = {
DataSource = EPICSCAInput
}
PLC_MODE2 = {
DataSource = EPICSCAInput
}
MD2_SHOTLEN_LIM = {
DataSource = EPICSCAInput
}
PLC_MODE3 = {
DataSource = EPICSCAInput
}
MD3_SHOTLEN_LIM = {
DataSource = EPICSCAInput
}
PLC_MODE4 = {
DataSource = EPICSCAInput
}
MD4_SHOTLEN_LIM = {
DataSource = EPICSCAInput
}
RFON = {
DataSource = Th2Bridge
}
Time = {
DataSource = Th2Bridge
}
HVInjection = {
DataSource = Th2Bridge
}
}
OutputSignals = {
MODE_SHOTLEN_FLAG = {
DataSource = DDB3
}
}
}

View File

@@ -0,0 +1,250 @@
#package jada_gyro.RTApp.Functions
+NI6528_0_ReaderGAM = {
Class = "IOExt::ExtractBitGAM"
InputSignals = {
DI0 = {
Trigger = 1
DataSource = NI6528_0_DIO
}
DI1 = {
DataSource = NI6528_0_DIO
}
DI2 = {
DataSource = NI6528_0_DIO
}
}
OutputSignals = {
GYA_APS_READY = {
DataSource = DDB3
}
GYA_APS_FLT = {
DataSource = DDB3
}
GYA_BPS_READY = {
DataSource = DDB3
}
GYA_BPS_FLT = {
DataSource = DDB3
}
MHVPS_OV = {
DataSource = DDB3
}
MHVPS_OC = {
DataSource = DDB3
}
MHVPS_FLT = {
DataSource = DDB3
}
MHVPS_READY = {
DataSource = DDB3
}
ECPC_MOD = {
DataSource = DDB3
}
FAST_TRIP = {
DataSource = DDB3
}
//! implicit: placeholder for spare
NONE_DI10 = {
DataSource = DDB3
Type = uint8
}
CRIO_RV1 = {
DataSource = DDB3
}
CRIO_RV2 = {
DataSource = DDB3
}
CRIO_RV3 = {
DataSource = DDB3
}
PLC_ITL = {
DataSource = DDB3
}
PLC_STANDBY = {
DataSource = DDB3
}
PLC_READY = {
DataSource = DDB3
}
PLC_ON = {
DataSource = DDB3
}
PLC_PERMIT = {
DataSource = DDB3
}
PLC_OP_SELECTED = {
DataSource = DDB3
}
PLC_CC_OP_SELECTED = {
DataSource = DDB3
}
PLC_SYNCMODE = {
DataSource = DDB3
}
TRIGGER = {
DataSource = DDB3
}
NONE_DI23 = {
DataSource = DDB3
}
}
}
// Digital Output port access.
// EPICS PV to one uint8 variable
+NI6528_0_WriterGAM = {
Class = "IOExt::CompactBitGAM"
InputSignals = {
APS_HVON = {
DataSource = DDB3
}
APS_SWON = {
DataSource = DDB3
}
APS_STOP = {
DataSource = DDB3
}
BPS_HVON = {
DataSource = DDB3
}
BPS_SWON = {
DataSource = DDB3
}
BPS_STOP = {
DataSource = DDB3
}
BEAM_ON_STAT = {
DataSource = DDB3
}
DO_REV5 = {
DataSource = DDB3
}
DO_REV6 = {
DataSource = DDB3
}
DO_REV7 = {
DataSource = DDB3
}
DO_REV8 = {
DataSource = DDB3
}
MHVPS_HVON = {
DataSource = DDB3
}
MHVPS_STOP = {
DataSource = DDB3
}
MHVPS_MODSW = {
DataSource = DDB3
}
PCF_FLT = {
DataSource = DDB3
}
HVARMED = {
DataSource = DDB3
}
HVINJECTION = {
DataSource = DDB3
}
RFON = {
DataSource = DDB3
}
FHPS_RU = {
DataSource = DDB3
}
SCM_RU = {
DataSource = DDB3
}
SCM_RD = {
DataSource = DDB3
}
CCPS_IN_OPERATION = {
DataSource = DDB3
}
//! implicit: Placeholder for spare output
NONE_DO23 = {
DataSource = DDB3
Type = uint8
NumberOfElements = 2
NumberOfDimensions = 1
Default = { 0, 0 }
}
NONE_DO5_1_Before = {
DataSource = DDB3
Type = uint8
NumberOfElements = 6
NumberOfDimensions = 1
Default = { 0, 0, 0, 0, 0, 0 }
}
PXI_FLT = {
DataSource = DDB3
}
//! implicit: Placeholder for spare output
NONE_DO5_1_After = {
DataSource = DDB3
Type = uint8
Default = 0
}
}
OutputSignals = {
DO3 = {
DataSource = NI6528_0_DIO
}
DO4 = {
DataSource = NI6528_0_DIO
}
DO5 = {
DataSource = NI6528_0_DIO
}
DO5_B1 = {
Alias = DO5
DataSource = NI6528_1_DIO
Trigger = 1
}
}
}
// //# INPUTs: StateMahine Value, NI6528P3Value and NI6528P4Value
// //# OUTPUTs: Each NIxxx data sources.
// //# TODO: name is very ambiguos
// +TerminalInterfaceGAM = {
// Class = JATerminalInterfaceGAM
// mhvps_hvon_term = 4
// aps_hvon_term = 1
// aps_swon_term = 16
// bps_hvon_term = 2
// bps_swon_term = 8
// InputSignals = {
// MHVPS_HVON = {
// DataSource = DDB3
// }
// APS_HVON = {
// DataSource = DDB3
// }
// APS_SWON = {
// DataSource = DDB3
// }
// BPS_HVON = {
// DataSource = DDB3
// }
// BPS_SWON = {
// DataSource = DDB3
// }
// SHORT_PULSE_MODE = {
// DataSource = EPICSCAInput
// Type = uint32
// }
// // Input signals about HW terminal.
// RTSMValue = {
// DataSource = DDB3
// Type = uint32
// }
// }
// OutputSignals = {
// NI6259Value = {
// DataSource = NI6259_DIO_P0
// Type = uint32
// Trigger = 1
// }
// }
// }

View File

@@ -0,0 +1,197 @@
#package jada_gyro.RTApp.Functions
+GAMRealTimeStateMachine = {
Class = JARTStateMachineGAM
ConditionTrigger = 1
mhvps_hvon = 4
aps_hvon = 1
aps_swon = 16
bps_hvon = 2
bps_swon = 8
InputSignals = {
Time = {
DataSource = DDB3
Type = uint32
}
PLC_ON = {
DataSource = DDB3
}
MHVPS_DT = {
DataSource = DDB3
Type = uint32
}
APS_HVON_DT = {
DataSource = DDB3
Type = uint32
}
APS_SWON_DT = {
DataSource = DDB3
Type = uint32
}
BPS_HVON_DT = {
DataSource = DDB3
Type = uint32
}
BPS_SWON_DT = {
DataSource = DDB3
Type = uint32
}
SHOTLEN = {
DataSource = DDB3
Type = uint32
}
FAST_STOP = {
DataSource = DDB3
}
MODE_SHOTLEN_FLAG = {
DataSource = DDB3
}
SHORT_PULSE_MODE = {
DataSource = DDB3
}
MHVPS_MODSW = {
DataSource = DDB3
}
// Add 20210121
DO_REV6 = {
DataSource = DDB3
}
}
OutputSignals = {
RTSMValue = {
DataSource = DDB3
Type = uint32
Trigger = 1
}
BEAM_ON_STAT = {
DataSource = DDB3
}
HVARMED = {
DataSource = DDB3
}
HVINJECTION = {
DataSource = DDB3
}
RFON = {
DataSource = DDB3
}
BeamONTime = {
Alias = BEAM_ON_TIME
DataSource = DDB3
}
RFONTime = {
Alias = RFON_TIME
DataSource = DDB3
Type = uint32
}
SHOT_ID = {
DataSource = DDB3
}
APS_HVON = {
DataSource = DDB3
}
APS_SWON = {
DataSource = DDB3
}
BPS_HVON = {
DataSource = DDB3
}
BPS_SWON = {
DataSource = DDB3
}
MHVPS_HVON = {
DataSource = DDB3
}
NI6259Value = {
DataSource = NI6259_DIO_P0
Type = uint32
Trigger = 1
}
}
}
+GAMSDNRealTimeStateMachine = {
Class = JASDNRTStateMachineGAM
ConditionTrigger = 1
mhvps_hvon = 4
aps_hvon = 1
aps_swon = 16
bps_hvon = 2
bps_swon = 8
InputSignals = {
Time = {
DataSource = DDB3
Type = uint32
}
PLC_ON = {
DataSource = DDB3
}
MHVPS_DT = {
DataSource = DDB3
Type = uint32
}
APS_HVON_DT = {
DataSource = DDB3
Type = uint32
}
APS_SWON_DT = {
DataSource = DDB3
Type = uint32
}
BPS_HVON_DT = {
DataSource = DDB3
Type = uint32
}
BPS_SWON_DT = {
DataSource = DDB3
Type = uint32
}
SHOTLEN = {
DataSource = DDB3
Type = uint32
}
FAST_STOP = {
DataSource = DDB3
}
MODE_SHOTLEN_FLAG = {
DataSource = DDB3
}
Command = {
DataSource = Th2Bridge
Type = uint16
}
}
OutputSignals = {
RTSMValue = {
DataSource = DDB3
Trigger = 1
}
BeamON = {
Alias = BEAM_ON_STAT
DataSource = DDB3
Type = uint8
}
HVARMED = {
DataSource = DDB3
}
HVINJECTION = {
DataSource = DDB3
}
RFON = {
DataSource = DDB3
}
BeamONTime = {
Alias = BEAM_ON_TIME
DataSource = DDB3
Type = uint32
}
RFONTime = {
Alias = RFON_TIME
DataSource = DDB3
Type = uint32
}
SHOT_ID = {
DataSource = DDB3
}
}
}

View File

@@ -0,0 +1,652 @@
#package jada_gyro.RTApp
+Data = {
+FastADC = {
Class = "NI6368::NI6368ADC"
// The divisor is computed on BaseSampleClockFrequency.
SamplingFrequency = @sampling_freq
DeviceName = "/dev/pxie-6368"
IsMultiplexed = 0 // Default is 0 for 6368. Set to 1 if using 6363.
BoardId = 0 // Mandatory
ExecutionMode = "RealTimeThread" // Optional (default is IndepenentThread). Possible values:IndependentThread, RealTimeThread
Calibrate = 1 // Optional (default is 0). If disabled the signals show raw acquired value (signal type must be int16). If enabled the samples already converted accordingly to the declared InputRange. In this case the signal type must be float32
Signals = {
Counter = {
Type = uint64
ResetOnBufferChange = 1
}
Time = {
Type = uint64
}
Status = {
Type = uint32
}
GY_APS_V_MEAS = {
Type = float32
ChannelId = 0
}
GY_APS_I_MEAS = {
Type = float32
ChannelId = 1
}
GY_BPS_V_MEAS = {
Type = float32
ChannelId = 2
}
GY_BPS_I_MEAS = {
Type = float32
ChannelId = 3
}
GY_MHV_V_MEAS = {
Type = float32
ChannelId = 4
}
GY_MHV_I_MEAS = {
Type = float32
ChannelId = 5
}
GY_ARC1_V_MEAS = {
Type = float32
ChannelId = 6
}
GY_ARC2_V_MEAS = {
Type = float32
ChannelId = 7
}
GY_ARC3_V_MEAS = {
Type = float32
ChannelId = 8
}
GY_RF_V_MEAS = {
Type = float32
ChannelId = 9
}
}
}
+TimingBoard = {
Class = NI6683H
BoardId = 0
Signals = {
Status = {
Type = uint8
}
PtpdStatus = {
Type = uint8
}
Time = {
Type = uint64
}
}
}
+DDB4 = {
Class = GAMDataSource
Signals = {
PXI6368_Status = {
Type = uint32
}
GY_APS_V_MEAS = {
Type = float32
NumberOfElements = @slow_clock
}
GY_APS_I_MEAS = {
Type = float32
NumberOfElements = @slow_clock
}
GY_BPS_V_MEAS = {
Type = float32
NumberOfElements = @slow_clock
}
GY_BPS_I_MEAS = {
Type = float32
NumberOfElements = @slow_clock
}
GY_MHV_V_MEAS = {
Type = float32
NumberOfElements = @slow_clock
}
GY_MHV_I_MEAS = {
Type = float32
NumberOfElements = @slow_clock
}
GY_ARC1_V_MEAS = {
Type = float32
NumberOfElements = @slow_clock
}
GY_ARC2_V_MEAS = {
Type = float32
NumberOfElements = @slow_clock
}
GY_ARC3_V_MEAS = {
Type = float32
NumberOfElements = @slow_clock
}
GY_RF_V_MEAS = {
Type = float32
NumberOfElements = @slow_clock
}
}
}
+FastAnalogDAN = {
Class = "DAN::DANSource"
NumberOfBuffers = 100
CPUMask = @cpus_fdan
StackSize = 10000000
DanBufferMultiplier = 10000 //10s at 1kHz loop (1M with 1k samples)
StoreOnTrigger = 1
ICProgName = @app_name
NumberOfPreTriggers = 0
NumberOfPostTriggers = 0
Signals = {
Trigger = {
Type = uint8
}
AI_Time = {
Type = uint64
TimeSignal = 1
AbsoluteTime = 1
TimeSignalMultiplier = 1e-9
}
GY_APS_V_MEAS = {
Type = float32
NumberOfElements = @slow_clock
SamplingFrequency = @sampling_freq
NodeName = (@rfid .. ":GY_APS_V_MEAS")
}
GY_APS_I_MEAS = {
Type = float32
NumberOfElements = @slow_clock
SamplingFrequency = @sampling_freq
NodeName = (@rfid .. ":GY_APS_I_MEAS")
}
GY_BPS_V_MEAS = {
Type = float32
NumberOfElements = @slow_clock
SamplingFrequency = @sampling_freq
NodeName = (@rfid .. ":GY_BPS_V_MEAS")
}
GY_BPS_I_MEAS = {
Type = float32
NumberOfElements = @slow_clock
SamplingFrequency = @sampling_freq
NodeName = (@rfid .. ":GY_BPS_I_MEAS")
}
GY_MHV_V_MEAS = {
Type = float32
NumberOfElements = @slow_clock
SamplingFrequency = @sampling_freq
NodeName = (@rfid .. ":GY_MHV_V_MEAS")
}
GY_MHV_I_MEAS = {
Type = float32
NumberOfElements = @slow_clock
SamplingFrequency = @sampling_freq
NodeName = (@rfid .. ":GY_MHV_I_MEAS")
}
GY_ARC1_V_MEAS = {
Type = float32
NumberOfElements = @slow_clock
SamplingFrequency = @sampling_freq
NodeName = (@rfid .. ":GY_ARC1_V_MEAS")
}
GY_ARC2_V_MEAS = {
Type = float32
NumberOfElements = @slow_clock
SamplingFrequency = @sampling_freq
NodeName = (@rfid .. ":GY_ARC2_V_MEAS")
}
GY_ARC3_V_MEAS = {
Type = float32
NumberOfElements = @slow_clock
SamplingFrequency = @sampling_freq
NodeName = (@rfid .. ":GY_ARC3_V_MEAS")
}
GY_RF_V_MEAS = {
Type = float32
NumberOfElements = @slow_clock
SamplingFrequency = @sampling_freq
NodeName = (@rfid .. ":GY_RF_V_MEAS")
}
}
}
+AnalogEpicsOutput = {
Class = "EPICSCA::EPICSCAOutput"
CPUMask = @cpus_epics // change from 0x200
StackSize = 10000000
NumberOfBuffers = 50
Signals = {
PXI6368_Status = {
Type = uint32
PVName = (@rfid .. "-HWCF:6368-0-STATUS")
}
GY_APS_V_MEAS = {
Type = float32
PVName = (@rfid .. "-PA1F:PSU3000-ET")
}
GY_APS_I_MEAS = {
Type = float32
PVName = (@rfid .. "-PA1F:PSU3000-IT")
}
GY_BPS_V_MEAS = {
Type = float32
PVName = (@rfid .. "-PB1F:PSU1000-ET")
}
GY_BPS_I_MEAS = {
Type = float32
PVName = (@rfid .. "-PB1F:PSU1000-IT")
}
GY_MHV_V_MEAS = {
Type = float32
PVName = (@rfid .. "-PMF:PSU0000-ET-GA")
}
GY_MHV_I_MEAS = {
Type = float32
PVName = (@rfid .. "-PMF:PSU0000-IT-GA")
}
GY_ARC1_V_MEAS = {
Type = float32
PVName = (@rfid .. "-GAF:MOE2810-ET")
}
GY_ARC2_V_MEAS = {
Type = float32
PVName = (@rfid .. "-GAF:MOE2820-ET")
}
GY_ARC3_V_MEAS = {
Type = float32
PVName = (@rfid .. "-GAF:MOE2830-ET")
}
GY_RF_V_MEAS = {
Type = float32
PVName = (@rfid .. "-GAF:MRF2910-ET")
}
}
}
+Th4Bridge = {
Class = RealTimeThreadAsyncBridge
NumberOfBuffers = 20
Signals = {
PXI6368_Status = {
Type = uint32
}
GY_APS_V_MEAS = {
Type = float32
}
GY_APS_I_MEAS = {
Type = float32
}
GY_BPS_V_MEAS = {
Type = float32
}
GY_BPS_I_MEAS = {
Type = float32
}
GY_MHV_V_MEAS = {
Type = float32
}
GY_MHV_I_MEAS = {
Type = float32
}
GY_ARC1_V_MEAS = {
Type = float32
}
GY_ARC2_V_MEAS = {
Type = float32
}
GY_ARC3_V_MEAS = {
Type = float32
}
GY_RF_V_MEAS = {
Type = float32
}
}
}
}
+Functions = {
+ReadADC = {
Class = IOGAM
InputSignals = {
Status = {
DataSource = FastADC
Frequency = 1000
}
GY_APS_V_MEAS = {
DataSource = FastADC
Samples = @slow_clock
}
GY_APS_I_MEAS = {
DataSource = FastADC
Samples = @slow_clock
}
GY_BPS_V_MEAS = {
DataSource = FastADC
Samples = @slow_clock
}
GY_BPS_I_MEAS = {
DataSource = FastADC
Samples = @slow_clock
}
GY_MHV_V_MEAS = {
DataSource = FastADC
Samples = @slow_clock
}
GY_MHV_I_MEAS = {
DataSource = FastADC
Samples = @slow_clock
}
GY_ARC1_V_MEAS = {
DataSource = FastADC
Samples = @slow_clock
}
GY_ARC2_V_MEAS = {
DataSource = FastADC
Samples = @slow_clock
}
GY_ARC3_V_MEAS = {
DataSource = FastADC
Samples = @slow_clock
}
GY_RF_V_MEAS = {
DataSource = FastADC
Samples = @slow_clock
}
}
OutputSignals = {
PXI6368_Status = {
DataSource = DDB4
}
GY_APS_V_MEAS = {
DataSource = DDB4
}
GY_APS_I_MEAS = {
DataSource = DDB4
}
GY_BPS_V_MEAS = {
DataSource = DDB4
}
GY_BPS_I_MEAS = {
DataSource = DDB4
}
GY_MHV_V_MEAS = {
DataSource = DDB4
}
GY_MHV_I_MEAS = {
DataSource = DDB4
}
GY_ARC1_V_MEAS = {
DataSource = DDB4
}
GY_ARC2_V_MEAS = {
DataSource = DDB4
}
GY_ARC3_V_MEAS = {
DataSource = DDB4
}
GY_RF_V_MEAS = {
DataSource = DDB4
}
}
}
+PushADCtoDAN = {
Class = IOGAM
InputSignals = {
TRIGGER_DAN = {
DataSource = EPICSCAInput
}
Time = {
DataSource = TimingBoard
}
GY_APS_V_MEAS = {
DataSource = DDB4
}
GY_APS_I_MEAS = {
DataSource = DDB4
}
GY_BPS_V_MEAS = {
DataSource = DDB4
}
GY_BPS_I_MEAS = {
DataSource = DDB4
}
GY_MHV_V_MEAS = {
DataSource = DDB4
}
GY_MHV_I_MEAS = {
DataSource = DDB4
}
GY_ARC1_V_MEAS = {
DataSource = DDB4
}
GY_ARC2_V_MEAS = {
DataSource = DDB4
}
GY_ARC3_V_MEAS = {
DataSource = DDB4
}
GY_RF_V_MEAS = {
DataSource = DDB4
}
}
OutputSignals = {
Trigger = {
DataSource = FastAnalogDAN
}
AI_Time = {
DataSource = FastAnalogDAN
}
GY_APS_V_MEAS = {
DataSource = FastAnalogDAN
}
GY_APS_I_MEAS = {
DataSource = FastAnalogDAN
}
GY_BPS_V_MEAS = {
DataSource = FastAnalogDAN
}
GY_BPS_I_MEAS = {
DataSource = FastAnalogDAN
}
GY_MHV_V_MEAS = {
DataSource = FastAnalogDAN
}
GY_MHV_I_MEAS = {
DataSource = FastAnalogDAN
}
GY_ARC1_V_MEAS = {
DataSource = FastAnalogDAN
}
GY_ARC2_V_MEAS = {
DataSource = FastAnalogDAN
}
GY_ARC3_V_MEAS = {
DataSource = FastAnalogDAN
}
GY_RF_V_MEAS = {
DataSource = FastAnalogDAN
}
}
}
+PushADCtoEpics = {
Class = IOGAM
InputSignals = {
PXI6368_Status_Async = {
Alias = PXI6368_Status
DataSource = DDB4
}
PXI6368_Status = {
DataSource = DDB4
}
GY_APS_V_MEAS_Async = {
Alias = GY_APS_V_MEAS
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_APS_V_MEAS = {
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_APS_I_MEAS_Async = {
Alias = GY_APS_I_MEAS
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_APS_I_MEAS = {
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_BPS_V_MEAS_Async = {
Alias = GY_BPS_V_MEAS
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_BPS_V_MEAS = {
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_BPS_I_MEAS_Async = {
Alias = GY_BPS_I_MEAS
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_BPS_I_MEAS = {
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_MHV_V_MEAS_Async = {
Alias = GY_MHV_V_MEAS
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_MHV_V_MEAS = {
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_MHV_I_MEAS_Async = {
Alias = GY_MHV_I_MEAS
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_MHV_I_MEAS = {
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_ARC1_V_MEAS_Async = {
Alias = GY_ARC1_V_MEAS
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_ARC1_V_MEAS = {
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_ARC2_V_MEAS_Async = {
Alias = GY_ARC2_V_MEAS
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_ARC2_V_MEAS = {
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_ARC3_V_MEAS_Async = {
Alias = GY_ARC3_V_MEAS
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_ARC3_V_MEAS = {
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_RF_V_MEAS_Async = {
Alias = GY_RF_V_MEAS
DataSource = DDB4
Ranges = { { 0, 0 } }
}
GY_RF_V_MEAS = {
DataSource = DDB4
Ranges = { { 0, 0 } }
}
}
OutputSignals = {
PXI6368_Status_Async = {
Alias = PXI6368_Status
DataSource = Th4Bridge
}
PXI6368_Status = {
DataSource = AnalogEpicsOutput
}
GY_APS_V_MEAS_Async = {
Alias = GY_APS_V_MEAS
DataSource = Th4Bridge
}
GY_APS_V_MEAS = {
DataSource = AnalogEpicsOutput
}
GY_APS_I_MEAS_Async = {
Alias = GY_APS_I_MEAS
DataSource = Th4Bridge
}
GY_APS_I_MEAS = {
DataSource = AnalogEpicsOutput
}
GY_BPS_V_MEAS_Async = {
Alias = GY_BPS_V_MEAS
DataSource = Th4Bridge
}
GY_BPS_V_MEAS = {
DataSource = AnalogEpicsOutput
}
GY_BPS_I_MEAS_Async = {
Alias = GY_BPS_I_MEAS
DataSource = Th4Bridge
}
GY_BPS_I_MEAS = {
DataSource = AnalogEpicsOutput
}
GY_MHV_V_MEAS_Async = {
Alias = GY_MHV_V_MEAS
DataSource = Th4Bridge
}
GY_MHV_V_MEAS = {
DataSource = AnalogEpicsOutput
}
GY_MHV_I_MEAS_Async = {
Alias = GY_MHV_I_MEAS
DataSource = Th4Bridge
}
GY_MHV_I_MEAS = {
DataSource = AnalogEpicsOutput
}
GY_ARC1_V_MEAS_Async = {
Alias = GY_ARC1_V_MEAS
DataSource = Th4Bridge
}
GY_ARC1_V_MEAS = {
DataSource = AnalogEpicsOutput
}
GY_ARC2_V_MEAS_Async = {
Alias = GY_ARC2_V_MEAS
DataSource = Th4Bridge
}
GY_ARC2_V_MEAS = {
DataSource = AnalogEpicsOutput
}
GY_ARC3_V_MEAS_Async = {
Alias = GY_ARC3_V_MEAS
DataSource = Th4Bridge
}
GY_ARC3_V_MEAS = {
DataSource = AnalogEpicsOutput
}
GY_RF_V_MEAS_Async = {
Alias = GY_RF_V_MEAS
DataSource = Th4Bridge
}
GY_RF_V_MEAS = {
DataSource = AnalogEpicsOutput
}
}
}
}

View File

@@ -0,0 +1,763 @@
#package jada_gyro.RTApp
+Data = {
+DDB5 = {
Class = GAMDataSource
AllowNoProducers = 1
Signals = {
DiTime = {
Type = uint32
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PXI6528_Status = {
Type = uint32
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
GYA_APS_READY = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
GYA_APS_FLT = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
GYA_BPS_READY = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
GYA_BPS_FLT = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
MHVPS_OV = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
MHVPS_OC = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
MHVPS_FLT = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
MHVPS_READY = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
ECPC_MOD = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
FAST_TRIP = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
CRIO_RV1 = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
CRIO_RV2 = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
CRIO_RV3 = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_ITL = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_STANDBY = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_READY = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_ON = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_PERMIT = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_OP_SELECTED = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_CC_OP_SELECTED = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_SYNCMODE = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
TRIGGER = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
BEAM_ON_STAT = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
HVARMED = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
HVINJECTION = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
RFON = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
BEAM_ON_TIME = {
Type = uint32
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
RFON_TIME = {
Type = uint32
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
}
}
+DANDIODataSource = {
Class = "DAN::DANSource"
NumberOfBuffers = 100
CPUMask = @cpus_dio
StackSize = 10000000
DanBufferMultiplier = 200 //10s at 20Hz
StoreOnTrigger = 0
ICProgName = @app_name
NumberOfPreTriggers = 0
NumberOfPostTriggers = 0
Signals = {
DI_Time = {
Type = uint32
TimeSignal = 1
AbsoluteTime = 0
}
PXI6528_Status = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint32
NodeName = @rfid .. ":PXI6528_Status"
}
GYA_APS_READY = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":GYA_APS_READY"
}
GYA_APS_FLT = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":GYA_APS_FLT"
}
GYA_BPS_READY = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":GYA_BPS_READY"
}
GYA_BPS_FLT = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":GYA_BPS_FLT"
}
MHVPS_OV = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":MHVPS_OV"
}
MHVPS_OC = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":MHVPS_OC"
}
MHVPS_FLT = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":MHVPS_FLT"
}
MHVPS_READY = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":MHVPS_READY"
}
ECPC_MOD = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":ECPC_MOD"
}
FAST_TRIP = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":FAST_TRIP"
}
CRIO_RV1 = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":CRIO_RV1"
}
CRIO_RV2 = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":CRIO_RV2"
}
CRIO_RV3 = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":CRIO_RV3"
}
PLC_ITL = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":PLC_ITL"
}
PLC_STANDBY = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":PLC_STANDBY"
}
PLC_READY = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":PLC_READY"
}
PLC_ON = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":PLC_ON"
}
PLC_PERMIT = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":PLC_PERMIT"
}
PLC_OP_SELECTED = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":PLC_OP_SELECTED"
}
PLC_CC_OP_SELECTED = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":PLC_CC_OP_SELECTED"
}
PLC_SYNCMODE = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":PLC_SYNCMODE"
}
TRIGGER = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":TRIGGER"
}
BEAM_ON_STAT = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":BEAM_ON_STAT"
}
HVARMED = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":HVARMED"
}
HVINJECTION = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint8
NodeName = @rfid .. ":HVINJECTION"
}
RFON = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
NodeName = @rfid .. ":RFON"
Type = uint8
}
BEAM_ON_TIME = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
NodeName = @rfid .. ":BEAM_ON_TIME"
Type = uint32
}
RFON_TIME = {
SamplingFrequency = @fast_clock
NumberOfElements = @dan_ratio
Type = uint32
NodeName = @rfid .. ":RFON_TIME"
}
}
}
}
+Functions = {
+WaitForDioSignals = {
Class = IOGAM
InputSignals = {
DiTime = {
DataSource = SynchThread
Samples = @dan_ratio
Frequency = 1
}
PXI6528_Status = {
DataSource = SynchThread
Samples = @dan_ratio
}
GYA_APS_READY = {
DataSource = SynchThread
Samples = @dan_ratio
}
GYA_APS_FLT = {
DataSource = SynchThread
Samples = @dan_ratio
}
GYA_BPS_READY = {
DataSource = SynchThread
Samples = @dan_ratio
}
GYA_BPS_FLT = {
DataSource = SynchThread
Samples = @dan_ratio
}
MHVPS_OV = {
DataSource = SynchThread
Samples = @dan_ratio
}
MHVPS_OC = {
DataSource = SynchThread
Samples = @dan_ratio
}
MHVPS_FLT = {
DataSource = SynchThread
Samples = @dan_ratio
}
MHVPS_READY = {
DataSource = SynchThread
Samples = @dan_ratio
}
ECPC_MOD = {
DataSource = SynchThread
Samples = @dan_ratio
}
FAST_TRIP = {
DataSource = SynchThread
Samples = @dan_ratio
}
CRIO_RV1 = {
DataSource = SynchThread
Samples = @dan_ratio
}
CRIO_RV2 = {
DataSource = SynchThread
Samples = @dan_ratio
}
CRIO_RV3 = {
DataSource = SynchThread
Samples = @dan_ratio
}
PLC_ITL = {
DataSource = SynchThread
Samples = @dan_ratio
}
PLC_STANDBY = {
DataSource = SynchThread
Samples = @dan_ratio
}
PLC_READY = {
DataSource = SynchThread
Samples = @dan_ratio
}
PLC_ON = {
DataSource = SynchThread
Samples = @dan_ratio
}
PLC_PERMIT = {
DataSource = SynchThread
Samples = @dan_ratio
}
PLC_OP_SELECTED = {
DataSource = SynchThread
Samples = @dan_ratio
}
PLC_CC_OP_SELECTED = {
DataSource = SynchThread
Samples = @dan_ratio
}
PLC_SYNCMODE = {
DataSource = SynchThread
Samples = @dan_ratio
}
TRIGGER = {
DataSource = SynchThread
Samples = @dan_ratio
}
BEAM_ON_STAT = {
DataSource = SynchThread
Samples = @dan_ratio
}
HVARMED = {
DataSource = SynchThread
Samples = @dan_ratio
}
HVINJECTION = {
DataSource = SynchThread
Samples = @dan_ratio
}
RFON = {
DataSource = SynchThread
Samples = @dan_ratio
}
BEAM_ON_TIME = {
DataSource = SynchThread
Samples = @dan_ratio
}
RFON_TIME = {
DataSource = SynchThread
Samples = @dan_ratio
}
}
OutputSignals = {
DiTime = {
DataSource = DDB5
}
PXI6528_Status = {
DataSource = DDB5
}
GYA_APS_READY = {
DataSource = DDB5
}
GYA_APS_FLT = {
DataSource = DDB5
}
GYA_BPS_READY = {
DataSource = DDB5
}
GYA_BPS_FLT = {
DataSource = DDB5
}
MHVPS_OV = {
DataSource = DDB5
}
MHVPS_OC = {
DataSource = DDB5
}
MHVPS_FLT = {
DataSource = DDB5
}
MHVPS_READY = {
DataSource = DDB5
}
ECPC_MOD = {
DataSource = DDB5
}
FAST_TRIP = {
DataSource = DDB5
}
CRIO_RV1 = {
DataSource = DDB5
}
CRIO_RV2 = {
DataSource = DDB5
}
CRIO_RV3 = {
DataSource = DDB5
}
PLC_ITL = {
DataSource = DDB5
}
PLC_STANDBY = {
DataSource = DDB5
}
PLC_READY = {
DataSource = DDB5
}
PLC_ON = {
DataSource = DDB5
}
PLC_PERMIT = {
DataSource = DDB5
}
PLC_OP_SELECTED = {
DataSource = DDB5
}
PLC_CC_OP_SELECTED = {
DataSource = DDB5
}
PLC_SYNCMODE = {
DataSource = DDB5
}
TRIGGER = {
DataSource = DDB5
}
BEAM_ON_STAT = {
DataSource = DDB5
}
HVARMED = {
DataSource = DDB5
}
HVINJECTION = {
DataSource = DDB5
}
RFON = {
DataSource = DDB5
}
BEAM_ON_TIME = {
DataSource = DDB5
}
RFON_TIME = {
DataSource = DDB5
}
}
}
+DANDIOPublisherGAM = {
Class = IOGAM
InputSignals = {
DiTime = {
DataSource = DDB5
Ranges = {{0, 0}}
}
PXI6528_Status = {
DataSource = DDB5
}
GYA_APS_READY = {
DataSource = DDB5
}
GYA_APS_FLT = {
DataSource = DDB5
}
GYA_BPS_READY = {
DataSource = DDB5
}
GYA_BPS_FLT = {
DataSource = DDB5
}
MHVPS_OV = {
DataSource = DDB5
}
MHVPS_OC = {
DataSource = DDB5
}
MHVPS_FLT = {
DataSource = DDB5
}
MHVPS_READY = {
DataSource = DDB5
}
ECPC_MOD = {
DataSource = DDB5
}
FAST_TRIP = {
DataSource = DDB5
}
CRIO_RV1 = {
DataSource = DDB5
}
CRIO_RV2 = {
DataSource = DDB5
}
CRIO_RV3 = {
DataSource = DDB5
}
PLC_ITL = {
DataSource = DDB5
}
PLC_STANDBY = {
DataSource = DDB5
}
PLC_READY = {
DataSource = DDB5
}
PLC_ON = {
DataSource = DDB5
}
PLC_PERMIT = {
DataSource = DDB5
}
PLC_OP_SELECTED = {
DataSource = DDB5
}
PLC_CC_OP_SELECTED = {
DataSource = DDB5
}
PLC_SYNCMODE = {
DataSource = DDB5
}
TRIGGER = {
DataSource = DDB5
}
BEAM_ON_STAT = {
DataSource = DDB5
}
HVARMED = {
DataSource = DDB5
}
HVINJECTION = {
DataSource = DDB5
}
RFON = {
DataSource = DDB5
}
BEAM_ON_TIME = {
DataSource = DDB5
}
RFON_TIME = {
DataSource = DDB5
}
}
OutputSignals = {
DI_Time = {
DataSource = DANDIODataSource
}
PXI6528_Status = {
DataSource = DANDIODataSource
}
GYA_APS_READY = {
DataSource = DANDIODataSource
}
GYA_APS_FLT = {
DataSource = DANDIODataSource
}
GYA_BPS_READY = {
DataSource = DANDIODataSource
}
GYA_BPS_FLT = {
DataSource = DANDIODataSource
}
MHVPS_OV = {
DataSource = DANDIODataSource
}
MHVPS_OC = {
DataSource = DANDIODataSource
}
MHVPS_FLT = {
DataSource = DANDIODataSource
}
MHVPS_READY = {
DataSource = DANDIODataSource
}
ECPC_MOD = {
DataSource = DANDIODataSource
}
FAST_TRIP = {
DataSource = DANDIODataSource
}
CRIO_RV1 = {
DataSource = DANDIODataSource
}
CRIO_RV2 = {
DataSource = DANDIODataSource
}
CRIO_RV3 = {
DataSource = DANDIODataSource
}
PLC_ITL = {
DataSource = DANDIODataSource
}
PLC_STANDBY = {
DataSource = DANDIODataSource
}
PLC_READY = {
DataSource = DANDIODataSource
}
PLC_ON = {
DataSource = DANDIODataSource
}
PLC_PERMIT = {
DataSource = DANDIODataSource
}
PLC_OP_SELECTED = {
DataSource = DANDIODataSource
}
PLC_CC_OP_SELECTED = {
DataSource = DANDIODataSource
}
PLC_SYNCMODE = {
DataSource = DANDIODataSource
}
TRIGGER = {
DataSource = DANDIODataSource
}
BEAM_ON_STAT = {
DataSource = DANDIODataSource
}
HVARMED = {
DataSource = DANDIODataSource
}
HVINJECTION = {
DataSource = DANDIODataSource
}
RFON = {
DataSource = DANDIODataSource
}
BEAM_ON_TIME = {
DataSource = DANDIODataSource
}
RFON_TIME = {
DataSource = DANDIODataSource
}
}
}
}

View File

@@ -0,0 +1,43 @@
#package jada_gyro.RTApp
+Functions = {
//# GAM for trianguler waveform generation.
+CCPSWaveformGAM = {
Class = JATriangleWaveGAM
InputSignals = {
Frequency = {
Alias = CCPS_OUTPUT_FREQ
DataSource = EPICSCAInput
}
Amplitude = {
Alias = CCPS_OUTPUT_AMP
DataSource = EPICSCAInput
}
Offset = {
Alias = CCPS_OUTPUT_OFFS
DataSource = EPICSCAInput
}
PLCSTANDBY = {
Alias = PLC_STANDBY
DataSource = Th1Bridge
}
}
OutputSignals = {
CCPS_REF = {
DataSource = DDB6
}
}
}
}
+Data = {
+DDB6 = {
AllowNoProducers = 1
Signals = {
CCPS_REF = {
Type = float32
}
}
}
}

View File

@@ -0,0 +1,114 @@
#package jada_gyro.RTApp
+Functions = {
//# Flat FHPS Setpoint.
+FHPSSetpointGAM = {
Class = IOGAM
InputSignals = {
FHPS_AUTO_TAGV = {
DataSource = EPICSCAInput
Type = float32
}
}
OutputSignals = {
FHPS_TAGV = {
DataSource = DDB6
}
}
}
//# Filament heating rampup reference generator
+FHPSRampupGAM = {
Class = JARampupGAM
InputSignals = {
Targetv = {
Alias = FHPS_TAGV
DataSource = DDB6
}
Time = {
Alias = FHPS_AUTO_TIME
DataSource = EPICSCAInput
Type = float32
}
Start = {
Alias = FHPS_AUTO_START
DataSource = EPICSCAInput
Type = uint32
}
PLC_STANDBY = {
Alias = PLC_STANDBY
DataSource = Th1Bridge
}
MANUAL_AUTO = {
Alias = FHPS_MANM
DataSource = EPICSCAInput
Type = uint32
}
FHPS_PrePro = {
DataSource = Th1Bridge
}
}
OutputSignals = {
FHPS_REF = {
DataSource = DDB6 // probably to be direct analog output
}
FHPS_AUTO_STAT = {
DataSource = DDB6
}
}
}
+FHPSStateGAM = {
Class = JAConditionalSignalUpdateGAM
Operation = "AND"
InputSignals = {
FHPS_AUTO_STAT = {
DataSource = DDB6
Type = uint32
Comparator = "EQUALS"
Value = 2
}
}
OutputSignals = {
FHPS_RU = {
DataSource = WGAsyncBridge
Type = uint8
DefaultValue = 0
Value = 1
}
}
}
+FHPSGainGAM = {
Class = ScaleGAM
InputSignals = {
FHPS_REF = {
DataSource = DDB6
Factor = 15
}
}
OutputSignals = {
FHPS_SCALED = {
DataSource = DDB6
}
}
}
}
+Data = {
+DDB6 = {
Signals = {
FHPS_REF = {
Type = float32
}
FHPS_SCALED = {
Type = float32
}
FHPS_TAGV = {
Type = float32
}
FHPS_AUTO_STAT = {
Type = uint32
}
}
}
}

View File

@@ -0,0 +1,85 @@
#package jada_gyro.RTApp
+Data = {
+WGAsyncBridge = {
Class = RealTimeThreadAsyncBridge
NumberOfBuffers = 20
Signals = {
CCPS_REF = {
Type = float32
}
FHPS_REF = {
Type = float32
}
FHPS_AUTO_STAT = {
Type = uint32
}
FHPS_RU = {
Type = uint8
}
}
}
+NI6259_AO = {
Class = NI6259DAC
DeviceName = "/dev/pxi6259" // Mandatory
BoardId = 1 // Mandatory
SamplingFrequency = @wg_clock
Signals = {
CCPS_REF = {
Type = float32 // Mandatory. Only type that is supported.
ChannelId = 0 // Mandatory. The channel number.
OutputPolarity = "Bipolar" // Optional. Possible values: Bipolar, Unipolar. Default value Unipolar.
}
FHPS_REF = {
Type = float32
ChannelId = 1
OutputPolarity = "Bipolar"
}
}
}
}
+Functions = {
+WGProducerGAM = {
Class = IOGAM
InputSignals = {
CCPS_REF = {
DataSource = DDB6
}
CCPS_REF_OUT = {
Alias = CCPS_REF
DataSource = DDB6
}
FHPS_SCALED = {
DataSource = DDB6
}
FHPS_REF_OUT = {
Alias = FHPS_REF
DataSource = DDB6
}
FHPS_AUTO_STAT = {
Type = uint32
}
}
OutputSignals = {
CCPS_REF = {
DataSource = WGAsyncBridge
}
CCPS_REF_OUT = {
Alias = CCPS_REF
DataSource = NI6259_AO
}
FHPS_REF = {
DataSource = WGAsyncBridge
}
FHPS_REF_OUT = {
Alias = FHPS_REF
DataSource = NI6259_AO
Trigger = 1
}
FHPS_AUTO_STAT = {
DataSource = WGAsyncBridge
}
}
}
}

View File

@@ -0,0 +1,168 @@
#package jada_gyro.RTApp
+Data = {
//# Timer used for publsihing SDN data
+TimerSDN = {
Class = LinuxTimer
SleepNature = "Busy"
SleepPercentage = 40
ExecutionMode = "RealTimeThread"
Signals = {
Counter = {
Type = uint32
}
Time = {
Type = uint32
}
}
}
//# Fast Timer for thread 3 (RTStateMachineGAM execution cycle.)
+FastTimer = {
Class = LinuxTimer
SleepNature = "Busy"
SleepPercentage = 40
ExecutionMode = "RealTimeThread"
Signals = {
Counter = {
Type = uint32
}
Time = {
Type = uint32
}
AbsoluteTime = {
Type = uint64
}
}
}
//# Fast Timer for thread 3 (RTStateMachineGAM execution cycle.)
+WGTimer = {
Class = LinuxTimer
SleepNature = "Busy"
SleepPercentage = 40
ExecutionMode = "RealTimeThread"
Signals = {
Counter = {
Type = uint32
}
Time = {
Type = uint32
}
}
}
// Add signals to existing ddb
+DDB2 = {
Signals = {
Time = {
Type = uint32
}
Counter = {
Type = uint32
}
}
}
+DDB3 = {
Signals = {
Counter = {
Type = uint32
}
Time = {
Type = uint32
}
AbsoluteTime = {
Type = uint64
}
}
}
+DDB6 = {
Signals = {
Time = {
Type = uint32
}
Counter = {
Type = uint32
}
}
}
}
+Functions = {
//# Timer for SDN thread.
+TimeSDNGAM = {
Class = IOGAM
InputSignals = {
Time = {
DataSource = TimerSDN
}
Counter = {
DataSource = TimerSDN
Frequency = @slow_clock
}
}
OutputSignals = {
Time = {
DataSource = DDB2
}
Counter = {
DataSource = DDB2
}
}
}
//# GAM for realtime statemachine
+FastTimerGAM = {
Class = IOGAM
InputSignals = {
Counter = {
DataSource = FastTimer
Frequency = @fast_clock
}
Time = {
DataSource = FastTimer
}
AbsoluteTime = {
DataSource = FastTimer
}
PCF_FAULT = {
DataSource = Th1Bridge
}
PXI_FAULT = {
DataSource = Th1Bridge
}
}
OutputSignals = {
Counter = {
DataSource = DDB3
}
Time = {
DataSource = DDB3
}
AbsoluteTime = {
DataSource = DDB3
}
PCF_FLT = {
DataSource = DDB3
}
PXI_FLT = {
DataSource = DDB3
}
}
}
+WGTimerGAM = {
Class = IOGAM
InputSignals = {
Time = {
DataSource = WGTimer
}
Counter = {
DataSource = WGTimer
Frequency = @wg_clock
}
}
OutputSignals = {
Time = {
DataSource = DDB6
}
Counter = {
DataSource = DDB6
}
}
}
}

View File

@@ -0,0 +1,45 @@
#package jada_gyro
//# Gyrotron ID
#var rfid: string = "EC-GN-P01"
//# Fast Clock
#var fast_clock: uint32 = 20000 // Hz
//# Slow Clock
#var slow_clock: uint32 = 1000 // Hz
//# WF Generation Clock
#var wg_clock: uint32 = 1000 // Hz
//# ADC Clock
#var sampling_freq: uint32 = 10000 // Hz
//# App name
#var app_name: string = "JADA_RF01App"
//# Ratio between fast and slow
#let fast_slow_ratio: uint32 = (@fast_clock / @slow_clock)
#var dan_ratio: uint32 = 1000
// Constants for state values
#let state_error: uint32 = 1
#let state_disabled: uint32 = 2
#let state_standby: uint32 = 3
#let state_ready: uint32 = 4
#let state_permit: uint32 = 5
#let state_hvon: uint32 = 6
#let state_hvon_prep: uint32 = 7
#let state_hvon_sdn: uint32 = 8
#let state_hvon_sdn_prep: uint32 = 9
#let state_none: uint32 = 0
//# decimation index for sync gam
#let dec_index: int = (@fast_slow_ratio - 1)
// CPUS pinning
#var cpus_epics: uint = 0x8
#var cpus_sdn: uint = 0x10
#var cpus_rt: uint = 0x20
#var cpus_adc: uint = 0x40
#var cpus_dio: uint = 0x80
#var cpus_dan: uint = 0x100
#var cpus_wg: uint = 0x200
#var cpus_fdan: uint = 0x400

View File

@@ -1,41 +0,0 @@
-100,0,0,0,0,0,0
-90,1,1,1,1,1,1
-80,2,2,2,2,2,2
-70,3,3,3,3,3,3
-60,4,4,4,4,4,4
-50,5,5,5,5,5,5
-40,6,6,6,6,6,6
-30,7,7,7,7,7,7
-20,8,8,8,8,8,8
-10,9,9,9,9,9,9
0,10,10,10,10,10,10
10,9,9,9,9,9,9
20,8,8,8,8,8,8
30,7,7,7,7,7,7
40,6,6,6,6,6,6
50,5,5,5,5,5,5
60,4,4,4,4,4,4
70,3,3,3,3,3,3
80,2,2,2,2,2,2
90,1,1,1,1,1,1
100,0,0,0,0,0,0
110,1,1,1,1,1,1
120,2,2,2,2,2,2
130,3,3,3,3,3,3
140,4,4,4,4,4,4
150,5,5,5,5,5,5
160,6,6,6,6,6,6
170,7,7,7,7,7,7
180,8,8,8,8,8,8
190,9,9,9,9,9,9
200,10,10,10,10,10,10
210,9,9,9,9,9,9
220,8,8,8,8,8,8
230,7,7,7,7,7,7
240,6,6,6,6,6,6
250,5,5,5,5,5,5
260,4,4,4,4,4,4
270,3,3,3,3,3,3
280,2,2,2,2,2,2
290,1,1,1,1,1,1
300,0,0,0,0,0,0
1 -100 0 0 0 0 0 0
2 -90 1 1 1 1 1 1
3 -80 2 2 2 2 2 2
4 -70 3 3 3 3 3 3
5 -60 4 4 4 4 4 4
6 -50 5 5 5 5 5 5
7 -40 6 6 6 6 6 6
8 -30 7 7 7 7 7 7
9 -20 8 8 8 8 8 8
10 -10 9 9 9 9 9 9
11 0 10 10 10 10 10 10
12 10 9 9 9 9 9 9
13 20 8 8 8 8 8 8
14 30 7 7 7 7 7 7
15 40 6 6 6 6 6 6
16 50 5 5 5 5 5 5
17 60 4 4 4 4 4 4
18 70 3 3 3 3 3 3
19 80 2 2 2 2 2 2
20 90 1 1 1 1 1 1
21 100 0 0 0 0 0 0
22 110 1 1 1 1 1 1
23 120 2 2 2 2 2 2
24 130 3 3 3 3 3 3
25 140 4 4 4 4 4 4
26 150 5 5 5 5 5 5
27 160 6 6 6 6 6 6
28 170 7 7 7 7 7 7
29 180 8 8 8 8 8 8
30 190 9 9 9 9 9 9
31 200 10 10 10 10 10 10
32 210 9 9 9 9 9 9
33 220 8 8 8 8 8 8
34 230 7 7 7 7 7 7
35 240 6 6 6 6 6 6
36 250 5 5 5 5 5 5
37 260 4 4 4 4 4 4
38 270 3 3 3 3 3 3
39 280 2 2 2 2 2 2
40 290 1 1 1 1 1 1
41 300 0 0 0 0 0 0

Some files were not shown because too many files have changed in this diff Show More