1756-L72S 程序容易阅读,便于诊断和维护

1、程序容易阅读,便于诊断和维护;
    2、程序容易在不同厂家之间的PLC之间转换。
    西门子的STL语言是强大,但难于阅读,编写程序也需要异常小心,其强大的可能是它的寄存器寻址(类似于一些计算机高级语言中的地址指针),SCL没有这个功能,那就多费一些程序代码来实现同样的功能,程序是否优秀更应该看重程序的架构和提高程序生产效率的标准化,好的PLC程序不应该只有自己明白,而是让更多的人明白。在西门子PLC中使用SCL语言的场合一般是编写标准功能块FB,其编程方式和西门子的其他编程语言,如梯形图Lad、语句表STL是完全不同的,同时为了实现程序的国际标准化,即为了方便的将程序代码移植到不同厂家的PLC系统上,尽量不要在SCL中使用西门子独有的功能块。
Category:
  • 购买咨询热线/Phone:18859254943
  • 邮箱/Email:sales@ygdcs.com
  • 地址:成都高新区天益街北巷52号附14号2层

Description

1756-L72S 程序容易阅读,便于诊断和维护

 它的优点:
    1、程序容易阅读,便于诊断和维护;
    2、程序容易在不同厂家之间的PLC之间转换。
    西门子的STL语言是强大,但难于阅读,编写程序也需要异常小心,其强大的可能是它的寄存器寻址(类似于一些计算机高级语言中的地址指针),SCL没有这个功能,那就多费一些程序代码来实现同样的功能,程序是否优秀更应该看重程序的架构和提高程序生产效率的标准化,好的PLC程序不应该只有自己明白,而是让更多的人明白。在西门子PLC中使用SCL语言的场合一般是编写标准功能块FB,其编程方式和西门子的其他编程语言,如梯形图Lad、语句表STL是完全不同的,同时为了实现程序的国际标准化,即为了方便的将程序代码移植到不同厂家的PLC系统上,尽量不要在SCL中使用西门子独有的功能块。
  对于PLC编程,一般做工控的人都会,有经验的人也许对一些小小的技巧算不上什么,但对于生手来说,那可能是要很长时间才能体会得到的。
    1.在编写数据转换的时候,特别是步进伺服的位置或速度切换的时候,一定要给一个缓冲时间,不要写那种无缝对接的程序,如果无缝对接,常常会出错,位置可能会产生走不准。一般来说应该要给一个0.05s以上或者大于二个以上的扫描周期。
    2.位置控制指令,在每次回原点或者启动瞬间,是把当前位置清零。否则也会产生位置误差和累计误差。
    3.位置控制在回原点的时候,一定要用回原点指令,不可以走数据。
    4.位置控制时,尽可能的用位置控制,不要走相对指令,位置对于编程来说,也比相对位置控制简单好用。
    5.位置控制时,用脉冲+方向控制。尽量不要用双脉冲。
    6.手动和自动程序分开写。做成一个程序块的方式。
    7.有用到上升沿或下降沿的时候,触点一定要放在输出线圈的后面,否则会扫描不上或者不稳定。
    8.一般感应开关,特别是气缸的磁感应开关有一个感应区域,执行时,一定要给一个0.1s以上的时间。否则可能会产生机械没有到位,而程序就开始执行下一步了。
    9.精密传感器,特别是数字测量的,不要机械到位后立马检测,这个时候检测的东西基本上都是不准确的,也同样是要给一个缓冲时间。
    10.程序越复杂,操作越简单,这样的机器现场操作员是喜欢用的了。别人要求程序简单化,我的要求是复杂化,智能化。
    11.并不一定非要用上高级指令,一般来说达到要求就可以了。

1756-L72S 程序容易阅读,便于诊断和维护

Its advantages:
1, the program is easy to read, easy to diagnose and maintain;
2, the program is easy to convert between PLC between different manufacturers.
Siemens STL language is powerful, but difficult to read, writing programs also need to be extremely careful, its powerful may be its register addressing (similar to the address pointer in some computer high-level languages), SCL does not have this function, then spend more program code to achieve the same function, Whether the program is excellent should pay more attention to the structure of the program and improve the standardization of program production efficiency, a good PLC program should not only understand themselves, but let more people understand. SCL language is generally used in Siemens PLC to write standard function block FB, and its programming method is completely different from other programming languages of Siemens, such as ladder diagram Lad and statement table STL. At the same time, in order to achieve international standardization of the program, that is, in order to facilitate the transplantation of program code to PLC systems of different manufacturers. Try not to use a Siemens-only feature block in SCL.
For PLC programming, people who generally do industrial control will, experienced people may not be anything for some small skills, but for beginners, it may take a long time to realize.
1. When writing data conversion, especially when the stepper servo position or speed switch, be sure to give a buffer time, do not write the kind of seamless docking program, if seamless docking, often make mistakes, the position may produce inaccurate. In general, it should be given a scan cycle of more than 0.05s or more than two.
2. Position control command, in each return to the origin or start the moment, is to clear the current position to zero. Otherwise, positional errors and cumulative errors will occur.
3. When the position control is back to the origin, it must be used to return to the origin command, and the data can not be taken.
4. When controlling position, use position control as much as possible, do not go relative command, position for programming, but also easier than relative position control.
5. For position control, use pulse + direction control. Try not to double pulse.
6. Write manual and automatic programs separately. The way to make a block.
7. When it is used to rise or fall along the edge, the contact must be placed behind the output coil, otherwise it will not be scanned or unstable.
8. General induction switch, especially the magnetic induction switch of the cylinder has a induction area, and it must be given a time of more than 0.1s when executed. Otherwise, the machine may not be in place, and the program will proceed to the next step.
9. Precision sensors, especially digital measurements, should not be detected immediately after the mechanical position, and the things detected at this time are basically inaccurate, and it is also necessary to give a buffer time.
10. The more complex the program, the simpler the operation, such a machine field operator is like to use. Others ask for simplicity, I ask for complexity, intelligence.
11. It is not necessary to use advanced instructions, generally just meet the requirements.

  • 购买咨询热线/Phone:18859254943
  • 邮箱/Email:sales@ygdcs.com
  • 地址:成都高新区天益街北巷52号附14号2层