Cycle Macrotick
- Updated2023-02-17
- 3 minute(s) read
Cycle Macrotick
Reads the current FlexRay global time using an XNET session.
.gvi.png?_LANG=enus)
Inputs/Outputs

session in
The session to read.

error in
Error conditions that occur before this node runs.
The node responds to this input according to standard error behavior.
Default value: No error

session out
An output that is the same as session in, provided for use with subsequent nodes.

cycle
An output that returns the current FlexRay cycle counter.
The XNET Cluster FlexRay:Cycle property returns the cycle length in microseconds.

macrotick
An output that returns the current FlexRay macrotick.
The XNET Cluster FlexRay:Macro Per Cycle property returns the number of macroticks in the cycle. The current macrotick returned from this XNET Read instance ranges from 0 to (FlexRay:Macro Per Cycle - 1).
The XNET Cluster FlexRay:Macrotick property returns the macrotick length in floating-point seconds.

error out
Error information.
The node produces this output according to standard error behavior.
Description
Global time represents the timebase that all ECUs on the FlexRay network cluster share. You use sync frames to synchronize the global time. The global time components are the current cycle counter and macrotick within the cycle.
You can use this XNET Read instance with any XNET session mode, as long as the session interface is FlexRay. Because the state reflects the FlexRay interface, it can apply to multiple sessions.
For this node to operate properly, you must connect FlexRay global time as the FlexRay interface timebase source. To do this, you must call XNET Connect Terminals with a source of FlexRay Macrotick and destination of Master Timebase. If the terminals are not connected in this manner, this XNET Read instance returns an error.
When using LabVIEW Real-Time, this node often is useful in conjunction with XNET Create Timing Source (FlexRay Cycle). The FlexRay Cycle timing source enables a LabVIEW timed loop to execute at a specific macrotick within the cycle. Only one FlexRay Cycle timing source is allowed within the cycle. Within the timed loop, you can read the current FlexRay global time to measure performance or synchronize LabVIEW code to additional macroticks in the cycle.