Hello,
I'm trying to write a database where a waveform record (DTYP soft) can
have it's INP field changed at run-time to switch between one of two
other waveform records.
Basically I need a sort of multiplexing functionality to let one
waveform record collect the data from one of several other waveform
records. This can be done by changing the INP field of the resulting
waveform record to point to any one of the other waveforms.
When changing the waveform INP field with a dbpf command on the IOC
shell, things work Ok... When changing the INP field with a caput
(client side) in Linux shell, things work Ok...
However, I need to do the switching directly in the database. For this
purpose I am using an sCalcout record to create the string - using the
OUT field of the sCalcout to write to the waveform INP field... - This
doesn't work and I can't figure out why.
Does anyone know what could be the problem with my database (see below)
or have any suggestions how to program this kind of functionality in a
database? (not using genSub records or snl programs...)
record(waveform, wave1) {
field(PINI, "YES")
field(DTYP, "Soft Channel")
field(NELM, "10")
field(FTVL, "DOUBLE")
}
record(waveform, wave2) {
field(PINI, "YES")
field(DTYP, "Soft Channel")
field(NELM, "10")
field(FTVL, "DOUBLE")
}
record(scalcout, select) {
field(DTYP, "Soft Channel")
field(CALC, "PRINTF('wave%d PP',A)")
field(OOPT, "Every Time")
field(OUT, "result.INP PP")
field(DOPT, "Use CALC")
}
record(waveform, result) {
field(DTYP, "Soft Channel")
field(NELM, "10")
field(FTVL, "DOUBLE")
}
Appriciate any help or suggestions. Thanks.
Ulrik
--------------------------------------------------------------------
Ulrik Pedersen phone: +44(0)1235-778580
Software Engineer email: [email protected]
Diamond Light Source Ltd.
Rutherford Appleton Laboratory,
Chilton, Didcot
OxfordShire OX11 0DE
--------------------------------------------------------------------
<DIV><FONT size="1" color="gray">This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
</FONT></DIV>