LabVIEW中写入或读取文件时出现error 8

简介: LabVIEW中写入或读取文件时出现error 8

bVIEW中写入或读取文件时出现error 8

当运行使用文件I/O命令的LabVIEW程序时,出现一条错误消息:

Error 8 Occurred at Open/Create/ReplaceFile

Possible reason(s):

LabVIEW: (Hex 0x8) File permission error.You do not have the correct permissions for the file.

解决方法:


错误8可能由于各种原因而发生,包括文件权限或VI设置。


检查其他打开的应用程序-确保在LabVIEW打开文件之前关闭文件。


如果手动打开了该文件-请确保在运行程序之前将其关闭。


如果对文件结构进行了更改,请确保为文件I/OVI设置了正确的目录。


打开高级文件I/O功能的框图,例如打开/创建/替换文件.VI


将打开File.VI上的打开模式输入更改为数字常量1。


如果直接从输入终端创建了常量或控件,请从下拉菜单中选择“只读”选项。


确保Windows帐户具有编辑文件的权限。如果您正在编辑其他帐户的文件,可能没有这样做的权限。


如果要创建可执行文件,则应用程序尝试访问的源文件可能位于运行它的目标的错误目录中(仔细检查源文件的放置位置)


如果在实时操作系统上,请确保Linux安全外壳没有妨碍,并且您\正在写入/读取lvadmin有权访问的文件夹。


附加信息


Error 8 can occur for various reasonsincluding file permissions or VI settings.


Check any other open applications - makesure that they close the file before LabVIEW opens it.


If you have manually opened the file -make sure you close it before you run your program.


If you have made changes to your filestructure - ensure you are setting the right directory for your file I/O VI.


Open the block diagram of the high-levelFile I/O function, such as Open/Create/ReplaceFile.VI


Change the open mode input on the OpenFile.VI to a numeric constant of 1.


If you created a constant or a controldirectly from the input terminal, select the "read-only" option fromthe drop-down menu.


Ensure that the Windows account haspermission to edit the file. If you are editing another account's file, you maynot have permission to do so.


If you are creating an executable, thesource files included that the application is trying to access may be in thewrong directory for the target you are running it on (double check where yourSource Files will be placed)


If on a Real Time OS, make sure that theLinux Security Shell is not getting in the way and that you are writing/readingto a folder the lvadmin has access to.



需要说明的是,上述的例程和文档,都是可以下载的,双击即可打开,其中压缩文件是可以采用粘贴复制的方式,拷贝到硬盘上。这不是图片,各位小伙伴看到后尝试一下,这个问题就不用加微信咨询了。有关LabVIEW编程、LabVIEW开发等相关项目,可联系们。附件中的资料这里无法上传,可去公司网站搜索下载。

相关文章
|
9月前
|
安全 Linux Python
|
9月前
|
存储 C语言
C 语言文件读取全指南:打开、读取、逐行输出
要从文件读取,可以使用 r 模式: FILE *fptr; // 以读取模式打开文件 fptr = fopen("filename.txt", "r"); 这将使 filename.txt 打开以进行读取。 在 C 中读取文件需要一点工作。坚持住!我们将一步一步地指导您。 接下来,我们需要创建一个足够大的字符串来存储文件的内容。 例如,让我们创建一个可以存储多达 100 个字符的字符串:
834 2
C 语言文件读取全指南:打开、读取、逐行输出
|
PHP
Powershell写入文件问题简要分析
Powershell写入文件问题简要分析
108 1
9、Pycharm运行报错:CreateProcess error=2, 系统找不到指定的文件
9、Pycharm运行报错:CreateProcess error=2, 系统找不到指定的文件
9、Pycharm运行报错:CreateProcess error=2, 系统找不到指定的文件
|
Python
Python写入文件(write和writelines)
Python写入文件(write和writelines)详解
258 0
|
存储 Python
Python文件操作指南:编码、读取、写入和异常处理
Python文件操作指南:编码、读取、写入和异常处理
417 0
|
9月前
|
容器
这个错误是因为在读取文件时,管道已经结束
【1月更文挑战第14天】【1月更文挑战第67篇】这个错误是因为在读取文件时,管道已经结束
128 4
fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
212 0

热门文章

最新文章