Scan Engine Error 65734 When Using Scanned & Direct Access Modes

Updated Dec 4, 2017

Reported In


  • LabVIEW 2016 Real-Time Module


  • NI-RIO
  • NI CompactRIO


This usually occurs when a hardware line is used by both access modes: Scanned and Direct.

This can also happen after switching a program that uses one access mode to the other.

Issue Details

I am using a C Series module with my RIO controller in Scan Mode or Hybrid Mode. Occasionally, my Variable Read and Variable Write VIs returns a warning or error, with the code number of 65734: "CompactRIO: Using both scan write and direct write on the same channel cann lead to a race condition regarding which value is written to the channel."

Why does this happen?


When working with I/O Variables, which is how Scan Engine conveys tag data to your VI, you can read/write the underlying hardware lines using Scanned Access or Direct Access. This warning/error is thrown when both modes are being used on the same line.

To mitigate this, choose to use only one access mode per channel. If your application requires the use of both, you can choose to handle this error by monitoring the error line and clearing it when necessary. Similarly, you can use the I/O Variable Engine palette to clear faults. 

When switching from one mode to the next, the flags for warnings and faults remain persistent. To reset these flags, you will need to undeploy and redeploy all LabVIEW Project items under the RIO controller.

Additional Information

Scanned Access: 
By default, LabVIEW configures I/O variable nodes to use scanned access. Use scanned access for sets of I/O channels that update at a single rate and for expansion I/O channels. Scanned access uses the scan engine memory map to perform non-blocking I/O reads and writes, as shown in the following figure:


Each time you read from an I/O variable using scanned access, the NI Scan Engine immediately returns the most recent value stored in the memory map without blocking, or waiting for a new value. During each scan, LabVIEW reads the most recent I/O value and writes that value to the NI Scan Engine memory map.

Each time you write to an I/O variable using scanned access, you overwrite the previous value stored in the scan engine memory map. During each scan, LabVIEW pushes the value stored in the memory map to the physical I/O channel. To prevent data loss, you must synchronize all I/O variable write operations to the scan period.

Direct Access:
Use direct access to read or write single-point local I/O channels asynchronously to the scan period. You can use direct access when the application needs to write a value as soon as possible. Direct access bypasses the scan engine memory map and communicates directly with the I/O device driver to perform non-blocking I/O reads and writes, as shown in the following figure:



Not Helpful