C到IEC 61131-3 IL编译 [英] C to IEC 61131-3 IL compiler

查看:585
本文介绍了C到IEC 61131-3 IL编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些移植现有的C code到 IEC 61131-3 <要求/ A>兼容的PLC。

I have a requirement for porting some existing C code to a IEC 61131-3 compliant PLC.

我有分裂code成离散的功能块和编织这些块成标准溶液(梯,FB,结构化文本等)的一些选项。但是这需要以建立每个功能块雕刻备份C code。

I have some options of splitting the code into discrete function blocks and weaving those blocks into a standard solution (Ladder, FB, Structured Text etc). But this would require carving up the C code in order to build each function block.

当在IEC规格看着我realsied的 IEC指令列表形式可能是一个目标语言的编译器。该wikepedia文章列出了两个开发工具:

When looking at the IEC spec I realsied that the IEC Instruction List form could be a target language for a compiler. The wikepedia article lists two development tools:


  1. $ C $坐标系

  2. Beremiz

  1. CoDeSys
  2. Beremiz

但这些似乎是有针对性的编制IEC语言为C,而不是C到IEC。

But these seem to be targeted compiling IEC languages to C, not C to IEC.

另一种可能的解决方案是通过一个C推C code到帕斯卡尔的翻译和使用,作为一个起始点的结构化文本解决方案。

Another possible solution is to push the C code through a C to Pascal translator and use that as a starting point for a Structured Text solution.

如果没有任何这些我现在要下去分裂code成功能块的路径。

If not any of these I will go down the route of splitting the code up into function blocks.

修改

根据提示按mlieson的答复我应该提到的是,C code是现有的实时控制系统。因此,程序算法应该已经适应PLC的环境。

As prompted by mlieson's reply I should have mentioned that the C code is an existing real-time control system. So the programs algorithms should already suit a PLC environment.

推荐答案

也许这个答案来得太迟,但它可以从$ $坐标系由于调用C C code到外部库。

Maybe this answer comes too late but it is possible to call C code from CoDeSys thanks to an external library.

您可以在 HTTP找上了$ C $坐标系论坛资料//forum-en.3s-software.com/viewtopic.php?t=620

这会给你用你的C code到PLC轻微modifcations。你只需要定义功能或功能块接口。

That would give you to use your C code into the PLC with minor modifcations. You'll just have to define the functions or function blocks interfaces.

这篇关于C到IEC 61131-3 IL编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆