Equipment Flags: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
(The midas documentation has moved to https://midas.triumf.ca/docs/)
Tag: Replaced
 
Line 1: Line 1:
{{Pagelinks}}
The midas documentation has moved. See [https://midas.triumf.ca/docs/develop/features/acquiring_data/frontends/programming/#equipment-types Equipment types] in Frontends: programming for the new documentation about the equipment flags (EQ_xxx).
 
==== Links ====
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* [[Equipment List Parameters]]
* [[Equipment List Parameters#Type|Equipment Type]]
</div>
 
 
'''<div id="Equipment Type"></div>'''
==Equipment Flags==
The following equipment flags (of the form EQ_xxx, defined in [http://ladd00.triumf.ca/~daqweb/doc/midas-devel/doc/html/midas_8h.html midas.h]) are supported in the Equipment [[Equipment List Parameters#Type|Type]] field in the EQUIPMENT structure of a frontend.
The selected flag determines the Equipment Type.
 
===EQ_PERIODIC ===
; Periodic Event [[#Equipment Flags|Equipment Type]]
: In this equipment Type, no hardware requirement is necessary to trigger the readout function.  Instead, the [[Equipment List Parameters#Readout Routine|readout routine]] associated with this equipment is called periodically. The [[Equipment List Parameters#Period|Period]] field in the equipment declaration is used in this case to specify the time interval between calls to the readout function.
 
===EQ_POLLED===
;Polling Event  [[#Equipment Flags|Equipment Type]]
: In this equipment Type,  the name of the routine polling on a trigger source is "poll_event()". This routine must be provided in the [[Frontend user code]] by the user. As polling consists of checking a variable for a TRUE condition, if the loop count is infinite and the condition never becomes TRUE, the frontend would not be able to respond to any network commands. Therefore the loop count is determined when the frontend starts for the first time so that it returns after a given time-out if no event is available.  This time-out is usually of the order of 500 milliseconds. The EQ_POLLED equipment type is mainly used for data acquisition based on a hardware condition becoming TRUE, at which time the [[Equipment List Parameters#Readout Routine|readout routine]] associated with the equipment is called. See [[Frontend user code#Function poll_event| example]].
 
 
===EQ_INTERRUPT===
; Interrupt Event [[#Equipment Flags|Equipment Type]]
: This flag is similar to the [[#EQ_POLLED|EQ_POLLED]] mode, except a hardware interrupt is used to trigger the event rather than a polling loop.  Instead of passing a pointer to the polling routine, in EQ_INTERRUPT mode a pointer to the '''interrupt configuration routine''' is passed to the system.  Midas requires complete configuration and control of the interrupt source. This is provided by the interrupt configuration routine (called [[Frontend user code#Function interrupt_configure|interrupt_configure()]]) that must be provided in the [[Frontend user code|Frontend code]] by the user. When a valid interrupt is received, the [[Frontend user code#Event Readout routine|readout routine]] associated with the equipment is called.
 
 
 
=== EQ_MULTITHREAD ===
;Multithread Event Readout [[#Equipment Flags|Equipment Type]]
:This flag implements the multi-threading capability within the frontend code. The polling is performed within a separate thread and uses the "Midas Ring Buffer Functions" (rb_xxx in [http://ladd00.triumf.ca/~daqweb/doc/midas-devel/doc/html/midas_8c.html midas.c]) for inter-thread communication. EQ_MULTITHREAD is similar to [[#EQ_POLLED |EQ_POLLED]] mode, except for the polling function which in the case of EQ_MULTITHREAD resides in a separate thread. This new type has been added to take advantage of the multi-core processor to free up CPU for tasks other than polling. This flag cannot be combined with EQ_PERIODIC or EQ_SLOW. Multi-threaded readout of slow control events is handled at the device driver level of slow control events.
 
=== EQ_SLOW===
; Slow Control Event [[#Equipment Flags|Equipment Type]]
: This flag declares the equipment as a Slow Control Equipment (see [[Slow Control System]]). This will enable the call to the '''idle''' function part of the class driver. This flag also causes event data to be sent automatically to the <span style="color: purple; font-style:italic;">/equipment/variables/</span> ODB subtree.
 
 
 
===EQ_MANUAL_TRIG===
; Manual triggered event [[#Equipment Flags|Equipment Type]]
: This flag enables the equipment to be  [[Frontend user code#Manual Trigger|triggered]] by a remote procedure call (RPC). If EQ_MANUAL_TRIGGER is selected, the web interface will provide an extra button to trigger the equipment. The event may also be triggered by a client via RPC ([[Frontend user code#Manual Trigger|see example]]).
 
 
 
=== EQ_EB===
 
;Event Builder event [[#Equipment Flags|Equipment Type]]
: This flag identifies the equipment as a <b>fragment event</b>  and should be ORed with [[#EQ_POLLED|EQ_POLLED]] in order to be identified by the [[Event Builder]].
 
 
 
=== EQ_FRAGMENTED===
; Fragmented Event [[#Equipment Flags|Equipment Type]]
: Flag enabled large events (beyond the Midas configuration limit) to be handled by the system ('''see WARNING below'''). This flag required that a valid ''max_event_size_frag'' variable was defined in the user  [[Frontend Operation#Frontend|Frontend]] code. The ''max_event_size variable'' was used as fragment size in this case. This option was meant to be used in experiments where the event  '''rate''' was not an issue but the  '''size''' of the data needed to be extremely large.
 
 
 
<div style="background-color:mistyrose;">
:: '''WARNING'''
::* This flag is obsolescent (not maintained).  It was added for small memory cpus (e.g VxWorks PPC) to send very large events (beyond the Midas configuration limit) back to the host computer.
::* With modern large-memory cpus (e.g. VMIC), '''instead of using this flag, the buffer sizes should be increased to accommodate a large event''' (see [[Event Buffer]]).  
::* The fragmented event mechanism is '''not to be confused''' with "event fragments" used by the [[Event Builder]].
</div>
 
[[Category:Equipment]] [[Category:Event]] [[Category:Frontend]]

Latest revision as of 22:00, 30 October 2026

The midas documentation has moved. See Equipment types in Frontends: programming for the new documentation about the equipment flags (EQ_xxx).