2 Instruction Descriptions
// Activate trigger when sensor output turns ON.
R_TRIG_instance(SensorOut, Trigger);
IF (Trigger=TRUE) THEN
// Store the current date and time down to the milliseconds.
Recent.DandT:=TruncDt(
// Get current voltage.
Recent.Voltage:=Voltage;
// Record date and time and voltage in stack.
StackPush(
In
InOut:=Stack[0], // Stack array
Size :=UINT#100, // Number of stack array elements: 100
Num
END_IF;
2-658
In
:=GetTime(),
Accuracy:=_MILLISEC); // Accuracy is milliseconds.
:=Recent,
// Date and time, and voltage
:=NumDat);
// Number of data currently stored
// Get the date and time.
NY-series Instructions Reference Manual (W560)