当前位置:网站首页>LM小型可编程控制器软件(基于CoDeSys)笔记二十一:错误3703
LM小型可编程控制器软件(基于CoDeSys)笔记二十一:错误3703
2022-07-04 04:43:00 【Gutie_bartholomew】

写程序的时候,无意在全局变量里输入了了两个新变量,而且都没有改默认名字,它们的名字都是name,所以会报这个错误。
这段英文的是:several declarations with the same identifier "name"
几个声明有着同样的标识符号“name”
意思就是有两个变量的名称是相同的。

要改过来很简单,把其中一个变量删掉就行了。
什么是全局变量
贯穿整个工程众所周知的“标准的”变量,常数或剩余的变量可以被声明为全局变量,也可以是其他的网络用户交换数据的网络变量。
注意:在一个工程中你可以定义一个跟全局变量重名的局部变量。在这种情况下,在POU的范围内使用局部变量。
不允许两个全局变量有同样的名字。例如,如果你在PLC配置中定义了一个变量“var1”,同时这个变量也存在于全局变量列表中,那么你将得到编译错误。
创建全局变量列表
为了创建一个全局变量列表,打开对象管理器中的'资源' ,选择条目'全局变量',或者选一个已经存在的列表。接着,选择指令'工程' '对象' '添加'来打开全局变量列表对话框。
如果在对象管理器中标明了一个存在的全局变量列表,那么也可以用指令'工程' '对象' '配置'打开它的对话框。
链接文件:
文件名:如果有一个输出文件(*.exp)或者是一个DCF文件,这些文件包含了想要的变量,那么可以对这个文件建立链接。为了做到这些,要在文件名域中插入文件的路径。点击浏览按钮将得到标准的对话框'选择文本文件'。当读入它们的时候,DCF文件被转换为ICE格式。
如果希望在每一个工程编译之前从外部文件读取变量列表,那么就激活编译前输入选项。如果希望在每一个工程编译之前把变量列表写到外部文件,那么就激活编译前输出选项。
如果点击OK来关闭'全局变量列表'对话框,那么就创建了这个新对象。全局变量列表在对象管理器中通过标志 来标识。你可以用'工程' '对象' '道具'指令重新打开'全局变量列表'配置对话框。
边栏推荐
- Get the ID of the record just inserted from laravel
- Yyds dry goods inventory TCP & UDP
- The first introduction, stages and methods of defense system breakthrough from the perspective of the red team
- Zhongke Panyun - module a infrastructure setting and safety reinforcement scoring standard
- 记几个智能手表相关芯片 蓝牙芯片 低功耗
- QT qtableview data column width adaptation
- 简单g++和gdb调试
- Maui introductory tutorial series (5.xaml and page introduction)
- 【MATLAB】通信信号调制通用函数 — 带通滤波器
- Notes on the paper "cross view transformers for real time map view semantic segmentation"
猜你喜欢

Automated testing selenium foundation -- webdriverapi

Download kicad on Alibaba cloud image station

如何构建属于自己的知识引擎?社群开放申请

National vocational college skills competition (secondary vocational group) network security competition questions - Analysis

6-5 vulnerability exploitation SSH weak password cracking and utilization

Utiliser des unités de mesure dans votre code pour une vie meilleure

Technology Management - learning / practice

分享一些我的远程办公经验

中職組網絡安全—內存取證

Zhongke panyun-d module analysis and scoring standard
随机推荐
The second case analysis of the breakthrough of defense system from the perspective of the red team
全国职业院校技能大赛(中职组)网络安全竞赛试题—解析
appliedzkp的zkevm(12)State Proof
中科磐云—D模块解析以及评分标准
Daily question brushing record (12)
【MATLAB】MATLAB 仿真数字基带传输系统 — 数字基带传输系统
【MATLAB】MATLAB 仿真 — 窄带高斯白噪声
【MATLAB】MATLAB 仿真数字带通传输系统 — QPSK 和 OQPSK 系统
Programming example of stm32f1 and stm32subeide -74hc595 drives 4-bit 7-segment nixie tube
2022广东省赛——编码信息获取 解析flag
[matlab] general function of communication signal modulation - generation of narrow-band Gaussian white noise
【MATLAB】通信信号调制通用函数 — 插值函数
测试 CS4344 立体声DA转换器
[matlab] matlab simulation modulation system - VSB system
[matlab] communication signal modulation general function interpolation function
Sample template of software design document - learning / practice
[matlab] general function of communication signal modulation bandpass filter
电子元器件商城与数据手册下载网站汇总
Zhongke panyun-2022 Guangdong Trojan horse information acquisition and analysis
[matlab] general function of communication signal modulation inverse Fourier transform