Is there a way to concatenate two strings in EPICS?
Googling “concatenate strings epics” brings up sCalcout. I tried using sCalcout, but it insists on converting the inputs to floating point values and this causes some problems:
record (stringin, "$(Sys)$(Dev)OLFQ")
{
field (DESC, "Open Loop Frequency")
field (DTYP, "Soft Channel")
field(SCAN, "Passive")
}
record (stringin, "$(Sys)$(Dev)MVOL")
{
field (DESC, "Open Loop Steps")
field(SCAN, "Passive")
}
record (scalcout, "$(Sys)$(Dev)Result")
{
field (DESC, "Open Loop Steps")
field(SCAN, "1 second")
field(INPA, "$(Sys)$(Dev)MVOL")
field(INPB, "$(Sys)$(Dev)OLFQ")
field(CALC, "STR(A)+STR(B)")
}
If I set $(Sys)$(Dev)OLFQ to 1, and $(Sys)$(Dev)MVOL to 2, the result I get in SVAL is “1.00002.0000”. Is there any way to get just “12”? If I do it without the STR around A and B, it numerically adds A and B and I get “3.0000” for SVAl.
Is it not possible to just concatenate two string PVs in epics?
Alex