Error -1074395995 on Functions IMAQ ReadFile VI and IMAQ Write File 2

Updated Apr 5, 2023

Reported In

Hardware

  • myRIO Student Embedded Device

Software

  • LabVIEW Real-Time Module

Operating System

  • NI Linux Real-Time

Issue Details

I developed a LabVIEW VI that reads an image from a file and then implements an image processing algorithm. The VI works fine on my Windows PC. However, when I copied it on myRIO or Real Time target, the IMAQ Read/IMAQ Write File 2 File outputs error (-1074395995) and the VI doesn't run correctly.

Error -1074395995 occurred at an unidentified location
Possible reason(s):
File not found.




Why am I getting this error? 

Solution

File paths and structure vary somewhat depending on the target operating system.

On NI Linux Real-Time targets, the root file path is / and forward slashes serve as delimiters between directories. NI Linux Real-Time targets do not have a C drive. However, for convenience, the directories /c and /c/ni-rt exist, and /c/ni-rt/startup redirects to /home/lvuser/natinst/bin which is the recommended path for startup applications on NI Linux Real-Time targets.
Therefore, your IMAQ Read File/IMAQ-Write-File-2 should have a path similar to the below:
/home/lvuser/xxx.jpg

This document discusses recommended LabVIEW coding practices for designating file paths so that an application can be moved seamlessly from target to target.