pub struct DaqCapture {
pub busy: bool,
pub active: bool,
pub error: bool,
pub error_message: String,
pub data: Option<CaptureData>,
/* private fields */
}Expand description
DAQ Capture function block for NI triggered recordings.
Create one instance per DAQ configuration in your control program struct.
Call DaqCapture::call every cycle with the execute signal and timeout.
Fields§
§busy: boolTrue while the FB is executing (from arm through data retrieval).
active: boolTrue when the DAQ is armed and waiting for the hardware trigger.
error: boolTrue when an error occurred. Stays true until the next rising edge of execute.
error_message: StringError description (empty when no error).
data: Option<CaptureData>Captured data. Some after a successful capture, None otherwise.
Implementations§
Source§impl DaqCapture
impl DaqCapture
Sourcepub fn new(daq_fqdn: &str) -> Self
pub fn new(daq_fqdn: &str) -> Self
Create a new DaqCapture function block.
§Arguments
daq_fqdn- The fully qualified topic prefix for this DAQ, e.g."ni.impact". The FB will send commands to<daq_fqdn>.arm,<daq_fqdn>.capture_status, etc.
Sourcepub fn call(
&mut self,
execute: bool,
timeout_ms: u32,
client: &mut CommandClient,
)
pub fn call( &mut self, execute: bool, timeout_ms: u32, client: &mut CommandClient, )
Execute the DAQ capture state machine. Call once per control cycle.
§Arguments
execute- Rising edge triggers a new capture sequence.timeout_ms- Maximum time to wait for the capture to complete (milliseconds).client- The IPC command client for sending commands to the NI module.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DaqCapture
impl RefUnwindSafe for DaqCapture
impl Send for DaqCapture
impl Sync for DaqCapture
impl Unpin for DaqCapture
impl UnsafeUnpin for DaqCapture
impl UnwindSafe for DaqCapture
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more