当前位置:网站首页>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来关闭'全局变量列表'对话框,那么就创建了这个新对象。全局变量列表在对象管理器中通过标志 来标识。你可以用'工程' '对象' '道具'指令重新打开'全局变量列表'配置对话框。
边栏推荐
- 2022G2电站锅炉司炉特种作业证考试题库及答案
- 练习-冒泡排序
- 【MATLAB】通信信号调制通用函数 — 插值函数
- [matlab] communication signal modulation general function - low pass filter
- Zhongke Panyun - data analysis and forensics packet flag
- 2022危险化学品经营单位安全管理人员上岗证题库及答案
- QT qtableview data column width adaptation
- [matlab] general function of communication signal modulation - generation of narrow-band Gaussian white noise
- 6-5 vulnerability exploitation SSH weak password cracking and utilization
- A summary of the 8544 problem that SolidWorks Standard cannot obtain a license
猜你喜欢

拼夕夕二面:说说布隆过滤器与布谷鸟过滤器?应用场景?我懵了。。

Share some of my telecommuting experience
![[paper summary] zero shot semantic segmentation](/img/78/ee64118d86a7e43ec4d1cb97191fbe.jpg)
[paper summary] zero shot semantic segmentation

KMP匹配字符串

令人头痛的延时双删

Annex V: briefing on the attack process docx

VSCode的有用插件

Customize a pager needed in your project

Flutter ‘/usr/lib/libswiftCore. dylib‘ (no such file)

小程序毕业设计---美食、菜谱小程序
随机推荐
Programming example of stm32f1 and stm32subeide -74hc595 drives 4-bit 7-segment nixie tube
Just do it with your hands 7 - * project construction details 2 - hook configuration
Encryption and decryption
[matlab] general function of communication signal modulation - generation of narrow-band Gaussian white noise
【MATLAB】MATLAB 仿真模拟调制系统 — AM 已调信号的功率谱与相干解调
COMP1721 Creating Classes
测试 CS4344 立体声DA转换器
Zhongke Panyun - module a infrastructure setting and safety reinforcement scoring standard
Deep understanding of redis -- bloomfilter
【MATLAB】MATLAB 仿真模拟调制系统 — FM 系统
Zhongke Panyun - 2022 Guangxi reverse analysis ideas
NTFS 安全权限
Technology Management - learning / practice
2022年6月总结
2022 Guangdong provincial competition - code information acquisition and analysis flag
Exercise bubble sort
IP时代来临,电竞酒店如何借好游戏的“东风”?
Useful plug-ins for vscode
中科磐云—D模块解析以及评分标准
抓包整理外篇fiddler———— 会话栏与过滤器