Hi,
You don’t mention anything about the application and so I’m not sure if this useful, but I’ve pasted below a database snippet that lets you choose N options by writing to a longout. This particular example is for 19 options, but it can
be extended to 32 by adding an two additional calcout and sseq. Or, the sseq could be replaced by many calcout. Although for very high N it would tedious unless you autogenerated the database.
On the client side, it’s easiest just to have a text entry and let the user type the number they want, and that’s the most portable solution. But if you are using CS-Studio you can manually specify N options for a drop down menu using a
Combo Box. And if you specify the options as simple integers you can write directly to the longout record. If you really wanted characters in the drop down menu there might be some way to use scalcout to extract the integer from the menu text as long as the
integer is part of the text.
Cheers,
Matt
record(longout, "$(S):Menu") {
field(DRVL, "0")
field(DRVH, "18")
field(FLNK, "$(S):MenuSel")
info(autosaveFields_pass0, "VAL")
}
record(calcout, "$(S):MenuSel") {
field(INPA, "$(S):Menu NPP MS")
field(CALC, "(A>=0)&&(A<=9)?A+1:0")
field(DOPT, "Use CALC")
field(OOPT, "When Non-zero")
field(OUT, "$(S):PosGoList.SELN PP")
field(FLNK, "$(S):MenuSel2")
}
record(calcout, "$(S):MenuSel2") {
field(INPA, "$(S):Menu NPP MS")
field(CALC, "(A>=10)&&(A<=18)?(A-9):0")
field(DOPT, "Use CALC")
field(OOPT, "When Non-zero")
field(OUT, "$(S):PosGoList2.SELN PP")
}
record(sseq, "$(S):PosGoList") {
field(SELM, "Specified")
field(WAIT1, "Wait")
field(WAIT2, "Wait")
field(WAIT3, "Wait")
field(WAIT4, "Wait")
field(WAIT5, "Wait")
field(WAIT6, "Wait")
field(WAIT7, "Wait")
field(WAIT8, "Wait")
field(WAIT9, "Wait")
field(WAITA, "Wait")
field(DOL1, "1")
field(DOL2, "1")
field(DOL3, "1")
field(DOL4, "1")
field(DOL5, "1")
field(DOL6, "1")
field(DOL7, "1")
field(DOL8, "1")
field(DOL9, "1")
field(DOLA, "1")
field(LNK1, "$(S):Pos0Go.PROC CA")
field(LNK2, "$(S):Pos1Go.PROC CA")
field(LNK3, "$(S):Pos2Go.PROC CA")
field(LNK4, "$(S):Pos3Go.PROC CA")
field(LNK5, "$(S):Pos4Go.PROC CA")
field(LNK6, "$(S):Pos5Go.PROC CA")
field(LNK7, "$(S):Pos6Go.PROC CA")
field(LNK8, "$(S):Pos7Go.PROC CA")
field(LNK9, "$(S):Pos8Go.PROC CA")
field(LNKA, "$(S):Pos9Go.PROC CA")
}
record(sseq, "$(S):PosGoList2") {
field(SELM, "Specified")
field(WAIT1, "Wait")
field(WAIT2, "Wait")
field(WAIT3, "Wait")
field(WAIT4, "Wait")
field(WAIT5, "Wait")
field(WAIT6, "Wait")
field(WAIT7, "Wait")
field(WAIT8, "Wait")
field(WAIT9, "Wait")
field(DOL1, "1")
field(DOL2, "1")
field(DOL3, "1")
field(DOL4, "1")
field(DOL5, "1")
field(DOL6, "1")
field(DOL7, "1")
field(DOL8, "1")
field(DOL9, "1")
field(LNK1, "$(S):Pos10Go.PROC CA")
field(LNK2, "$(S):Pos11Go.PROC CA")
field(LNK3, "$(S):Pos12Go.PROC CA")
field(LNK4, "$(S):Pos13Go.PROC CA")
field(LNK5, "$(S):Pos14Go.PROC CA")
field(LNK6, "$(S):Pos15Go.PROC CA")
field(LNK7, "$(S):Pos16Go.PROC CA")
field(LNK8, "$(S):Pos17Go.PROC CA")
field(LNK9, "$(S):Pos18Go.PROC CA")
}
Hello,
I’m looking for an mbbo-like record type that supports 32 choices instead of 16. Has anyone already written an implementation for this?
Thanks,
An Le
SLAC National Accelerator Laboratory