Experimental Physics and
| |||||||||||||||||
|
David Dudley wrote: On an unrelated note, I'm curious about a few things. I don't see any way to do tests with the database. I have a need to do things like "read an input - Test for a value - output a trigger if true", as a simple grouping. I don't see any way to programmatically decide whether or not to execute a FWDLNK, which I think is what I want to do (or is that what the SEQ block can do? Documentation is kind of weak.).The calcout record can evaluate a calculation, and conditionally forward the result (or the result of a separate calculation) to another record. The seq record has a set of 10 fetch-value/write-value link pairs, and a "selection" mode. Writing to a mask field will make the record execute some of its fetch-value/write-value pairs. The mask field is interpreted either as a number (firing one) or as a bitmask (firing an arbitrary set). Finally, I don't see any way to do 'discrete PID' controls. Guess I should just shut up and write blocks to do what I want, which I think consist of the following (any way to do these already would be appreciated).The pid record does PID control, but not discrete. 1. Multiplex a input array into a single value (think I found that in the SEL block, but why is the limit 12 on so many of these blocks?).A seq record could set the fields of a subArray record, and then extract the correct value from a waveform from the subArray record and write it to an ai or wherever you want to multiplex the value into. 2. Demultiplex a value to a selected FWDLNK (don't see this one, unless the SEQ block does it. But it doesn't have multiple FWDLNKs).The seq does have multiple forward links and cn do theis job by pointing all the DOLn links to the same value and the LNKn links to the different locations. Write the mask and fire either one or a set of these - as described above. 3. IF or other conditional test block (if condition meets criteria, do FWDLNK, else don't).The calcout record will be able to do this. 4. PID Control with Discrete output controls (jog up/jog down, for PID Control).Either a PID record with some extras, or a completely discrete set of records. That would probably be a bunch of ai, ao, and calcout. 5. DB Log command to output current value to a database point.Most probably a channel access client (host side), that monitors a channel and writes the value (timestamp, status, severity...) to the DB. Lastly, do most IOC's have the SEQUENCER software incorporated in them? Seems to me that a lot of the things I would expect to do in combinational-logic don't seem to *exactly* exist in the DB. Do all logic things need SEQ support?Not necessarily. Many problems can be solved either as a database or as a sequencer state machine. Both ways have their advantages and downsides. General idea: Tightly coupled to hardware, small logic, multiplied by a large number of devices - sounds like a database. (Calcout, seq, ai, ao, bi, bo) Less tight coupling to the database, more complex, "supervisory" kind of logic with many alternatives, and many states - sounds like a sequencer state machine. Hope this helps, Ralph
| ||||||||||||||||
ANJ, 10 Nov 2011 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |