changed to epics 7
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
# ### macros: ID I2C address of ADC ### #
|
||||
# ### Description: ### #
|
||||
# ### This DB file is using ### #
|
||||
# ### stream(asynI2C) to read/write ### #
|
||||
# ### stream(asynI2C) to read/write ### #
|
||||
# ### an PCF8591 ADDA chip ### #
|
||||
#######################################################
|
||||
|
||||
@@ -40,7 +40,7 @@ record( ai, "$(P)$(R)TMPump2-Speed" ) {
|
||||
field(DESC, "TMPump2-Speed")
|
||||
field(DTYP, "Raw Soft Channel" )
|
||||
field(INP, "$(P)$(R)PCF8591:72:BYTE2_CH1 PP NMS")
|
||||
field(SCAN, "1 second")
|
||||
# field(SCAN, "1 second")
|
||||
field(ASLO, "16" )
|
||||
field(AOFF, "0" )
|
||||
field(EGU, "RPM" )
|
||||
@@ -66,7 +66,7 @@ record( ai, "$(P)$(R)TMPump2-Current" ) {
|
||||
field(DESC, "TMPump2-Current")
|
||||
field(DTYP, "Raw Soft Channel" )
|
||||
field(INP, "$(P)$(R)PCF8591:72:BYTE2_CH2 PP NMS")
|
||||
field(SCAN, "1 second")
|
||||
# field(SCAN, "1 second")
|
||||
field(ASLO, "0.1" )
|
||||
field(AOFF, "0" )
|
||||
field(EGU, "mA" )
|
||||
@@ -93,7 +93,7 @@ record(ai, "$(P)$(R)Shot-TorPSCurrentImage" ) {
|
||||
field(DESC, "Toroidal Current Image")
|
||||
field(DTYP, "Raw Soft Channel" )
|
||||
field(INP, "$(P)$(R)PCF8591:72:BYTE2_CH3 PP NMS")
|
||||
field(SCAN, ".2 second")
|
||||
# field(SCAN, ".2 second")
|
||||
field(ASLO, "39.215686275" )
|
||||
field(AOFF, "0.0" )
|
||||
field(EGU, "A" )
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# ### ### #
|
||||
# ### Ref 2.0; 2019-10-14 ### #
|
||||
# ### ### #
|
||||
# ### macros: ID I2C address of ADC ### #
|
||||
# ### macros: ID I2C address of DAC ### #
|
||||
# ### Description: ### #
|
||||
# ### This DB file is using ### #
|
||||
# ### stream(asynI2C) to write ### #
|
||||
|
||||
@@ -11,6 +11,11 @@ DB += ISTTOKpcf8591.db
|
||||
DB += ISTTOKpfeiffer.db
|
||||
DB += ISTTOKtda8444.db
|
||||
DB += sendmail.db
|
||||
DB += pcf8591.proto
|
||||
DB += tda8444.proto
|
||||
DB += sendmail.proto
|
||||
DB += pcf8574.proto
|
||||
DB += pfeiffer.proto
|
||||
|
||||
# If <anyname>.db template is not named <anyname>*.template add
|
||||
# <anyname>_TEMPLATE = <templatename>
|
||||
|
||||
22
epics/iocs/ISTTOKrpi/ISTTOKrpiApp/Db/pcf8574.proto
Normal file
22
epics/iocs/ISTTOKrpi/ISTTOKrpiApp/Db/pcf8574.proto
Normal file
@@ -0,0 +1,22 @@
|
||||
Terminator = "";
|
||||
LockTimeout = 500;
|
||||
ReplyTimeout = 100;
|
||||
ReadTimeout = 100;
|
||||
WriteTimeout = 100;
|
||||
MaxInput = 1;
|
||||
ExtraInput = Error;
|
||||
|
||||
rReg {
|
||||
out ${1};
|
||||
in "%.1r";
|
||||
}
|
||||
|
||||
## @init { rReg; }
|
||||
##
|
||||
wReg {
|
||||
out ${1} "%.1r";
|
||||
}
|
||||
|
||||
# @init { out ${1}; in "%.1r"; }
|
||||
|
||||
|
||||
47
epics/iocs/ISTTOKrpi/ISTTOKrpiApp/Db/pcf8591.proto
Normal file
47
epics/iocs/ISTTOKrpi/ISTTOKrpiApp/Db/pcf8591.proto
Normal file
@@ -0,0 +1,47 @@
|
||||
Terminator = "";
|
||||
LockTimeout = 500;
|
||||
ReplyTimeout = 100;
|
||||
ReadTimeout = 100;
|
||||
WriteTimeout = 100;
|
||||
MaxInput = 2;
|
||||
ExtraInput = Error;
|
||||
|
||||
rReg {
|
||||
out ${1};
|
||||
in "%.1r";
|
||||
}
|
||||
# To read adc write control Byte
|
||||
# Bits 0,1 ADC channel Selection
|
||||
# Bits 2 : ADC auto increment =0
|
||||
# Bits 3 : =0
|
||||
# Bits 4,5 ADC configuration . 00 = four single ended channels
|
||||
# Bits 6 : DAC Output enable bit
|
||||
# Bits 7 : =0
|
||||
|
||||
rConvAdc0 {
|
||||
out ${1} 64;
|
||||
in "%02r";
|
||||
}
|
||||
rConvAdc1 {
|
||||
out ${1} 65;
|
||||
in "%02r";
|
||||
}
|
||||
rConvAdc2 {
|
||||
out ${1} 66;
|
||||
in "%02r";
|
||||
}
|
||||
rConvAdc3 {
|
||||
out ${1} 67;
|
||||
in "%02r";
|
||||
}
|
||||
|
||||
## @init { rReg; }
|
||||
##
|
||||
wReg {
|
||||
out ${1} "%.1r";
|
||||
}
|
||||
|
||||
wDac {
|
||||
out ${1} 64 "%.1r";
|
||||
}
|
||||
|
||||
40
epics/iocs/ISTTOKrpi/ISTTOKrpiApp/Db/pfeiffer.proto
Normal file
40
epics/iocs/ISTTOKrpi/ISTTOKrpiApp/Db/pfeiffer.proto
Normal file
@@ -0,0 +1,40 @@
|
||||
Terminator=CR;
|
||||
MaxInput = 20;
|
||||
|
||||
# in millisecond
|
||||
#ReadTimeout = 2000;
|
||||
ReplyTimeout = 250;
|
||||
|
||||
# Using redirection to read 2 records, mantissa and exponent
|
||||
getPressure001 {
|
||||
out "0010074002=?106";
|
||||
in "0011074006%4u%(\$1)2u%+<sum8>";
|
||||
}
|
||||
getPressure002 {
|
||||
out "0020074002=?107";
|
||||
in "0021074006%4u%(\$1)2u%+<sum8>";
|
||||
}
|
||||
getPressure003 {
|
||||
out "0030074002=?108";
|
||||
in "0031074006%4u%(\$1)2u%+<sum8>";
|
||||
}
|
||||
getPressure004 {
|
||||
out "0040074002=?109";
|
||||
in "0041074006%4u%(\$1)2u%+<sum8>";
|
||||
}
|
||||
#
|
||||
# in "0031074006%4u%(\$1)2u%*3u";
|
||||
#
|
||||
#getPressureE003 {
|
||||
# in "0031074006%*4u%2u%*3u";
|
||||
#}
|
||||
|
||||
# Connect a stringout record to this to get
|
||||
# a generic command interface.
|
||||
# After processing finishes, the record contains the reply.
|
||||
|
||||
debug {
|
||||
ExtraInput = Ignore;
|
||||
out "%s"; in "%39c"
|
||||
}
|
||||
|
||||
46
epics/iocs/ISTTOKrpi/ISTTOKrpiApp/Db/sendmail.proto
Normal file
46
epics/iocs/ISTTOKrpi/ISTTOKrpiApp/Db/sendmail.proto
Normal file
@@ -0,0 +1,46 @@
|
||||
# https://epics.anl.gov/tech-talk/2013/msg02051.php
|
||||
Terminator = CR LF;
|
||||
ExtraInput = Ignore;
|
||||
ReplyTimeout = 1000;
|
||||
|
||||
@mismatch { out "QUIT"; disconnect; }
|
||||
|
||||
mail_start {
|
||||
connect 10000;
|
||||
in "220";
|
||||
out "HELO ipfn.tecnico.ulisboa.pt";
|
||||
in "250";
|
||||
out "AUTH LOGIN";
|
||||
in "334";
|
||||
out "YmVybmFyZG8=";
|
||||
in "334";
|
||||
out "RjJjb21ldA==";
|
||||
in "235";
|
||||
out "MAIL FROM:\$1";
|
||||
in "250";
|
||||
out "RCPT TO:\$2";
|
||||
in "250";
|
||||
out "RCPT TO: halves@ipfn.tecnico.ulisboa.pt";
|
||||
in "250";
|
||||
out "DATA";
|
||||
in "354";
|
||||
out "From: \$1";
|
||||
out "To: \$2";
|
||||
out "Subject: Report from ISTTOK";
|
||||
out "";
|
||||
}
|
||||
|
||||
mail_end {
|
||||
out ".";
|
||||
in "250";
|
||||
out "QUIT";
|
||||
disconnect;
|
||||
}
|
||||
|
||||
send {
|
||||
mail_start;
|
||||
out "Problem is: %s\n";
|
||||
out "Please check: http://epics.ipfn.ist.utl.pt/isttok";
|
||||
mail_end;
|
||||
}
|
||||
|
||||
42
epics/iocs/ISTTOKrpi/ISTTOKrpiApp/Db/tda8444.proto
Normal file
42
epics/iocs/ISTTOKrpi/ISTTOKrpiApp/Db/tda8444.proto
Normal file
@@ -0,0 +1,42 @@
|
||||
Terminator = "";
|
||||
LockTimeout = 500;
|
||||
ReplyTimeout = 100;
|
||||
ReadTimeout = 100;
|
||||
WriteTimeout = 100;
|
||||
MaxInput = 2;
|
||||
ExtraInput = Error;
|
||||
#I2C-bus format
|
||||
# 0 1 0 0 A2 A1 A0 0 : I3 I2 I1 I0 SD SC SB SA : X X D5 D4 D3 D2 D1 D0
|
||||
# A2 to A0 = programmable address bits; A = Acknowledge; I3 to I0 = Instruction bits;
|
||||
# SD to SA = subaddress bits; X = don’t care; D5 to D0 = data bits;
|
||||
|
||||
#instruction F will cause a consecutive writing of the data bytes into the
|
||||
#same DAC-latch whose subaddress was given in the instruction byte.
|
||||
|
||||
#0xF0
|
||||
wDac0 {
|
||||
out ${1} 240 "%.1r";
|
||||
}
|
||||
wDac1 {
|
||||
out ${1} 241 "%.1r";
|
||||
}
|
||||
wDac2 {
|
||||
out ${1} 242 "%.1r";
|
||||
}
|
||||
wDac3 {
|
||||
out ${1} 243 "%.1r";
|
||||
}
|
||||
wDac4 {
|
||||
out ${1} 244 "%.1r";
|
||||
}
|
||||
wDac5 {
|
||||
out ${1} 245 "%.1r";
|
||||
}
|
||||
wDac6 {
|
||||
out ${1} 246 "%.1r";
|
||||
}
|
||||
wDac7 {
|
||||
out ${1} 247 "%.1r";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user