NI Labs Toolkits

cancel
Showing results for 
Search instead for 
Did you mean: 

CODESYS support on NI CompactRIO Devices

Description

 

CODESYS is an Integrated Development Environment (IDE) for PLC programming (IEC 61131-3) with native programming languages such as ladder logic (LD), Structured Text (ST), Instruction List (IL), Function Block Diagram (FBD), and Sequential Function Chart (SFC). CODESYS supports the most common 32 bit architectures including integrated compilers and adaptable run-time systems complemented with a series of comprehensive debugging and monitoring features.

 

The CODESYS Integration on CompactRIO allows users to access the I/O from a compiled FPGA bitfile to generate a custom device for CompactRIO in the CODESYS development environment. By bringing the device into CODESYS, a user can program the CompactRIO using several industry-standard languages such as Structured Text, Ladder Logic, and Function Block Diagrams. From here, the user can deploy their code to a CompactRIO target running the CODESYS Runtime Engine. Each trial of the CODESYS Runtime Engine lasts for two hours before it must be started again. If you are interested in deploying your CODESYS application to a CompactRIO and avoiding the two-hour trial limit, please contact your NI sales representative for more information.

 

LabVIEW FPGA is the main interface that allows users to customize and configure the onboard FPGA of the CompactRIO controller. An FPGA VI typically has a variety of inputs, outputs, and operations that are compiled into to a bitfile and programmed on a hardware level into the FPGA. This allows for faster execution speeds and more reliable operations than can be provided by software running on a processor.

 

CODESYScRIO.png

The integration of CODESYS with the CompactRIO platform provides an avenue to develop advanced applications through industry standards and code reuse while maintaining access to high-speed I/O and faster execution rates on the FPGA fabric.

 

Software and Hardware Requirements

 

 

*The CODESYS Runtime Engine and Development Environment software is licensed by a third party, which is solely responsible for the product.  NI takes no responsibility for and expressly disclaims any warranties, express or implied, for the software.

 

Download

 

To get access to the CODESYS support on CompactRIO tools, please send an email to codesys@ni.com expressing your interest to get early access to this tool. You will recieve access to a ZIP archive containing all the required files and instructions for trial usage of the tools.

 

Support

 

For inquiries regarding this tool, troubleshooting, and feature requests please refer to the CODESYS Support on CompactRIO Discussion thread.

 

At present, this library is experimental, unsupported, and not recommended for production applications. Please see the licensing notice below.

 

NI Labs Licensing Notice

 

Because the software technology available on NI Labs is experimental and has not yet been released for large-scale commercial use or fully tested by NI, the terms of the NI Labs license agreements vary from the standard NI software license terms. Further, the license terms for specific NI Labs technology may vary.  Please carefully read the terms of the license agreement included with each NI Labs download before accepting those terms. This library uses the NI Sample Code License which is included in the download package.

Carlos Pazos

Senior Product Marketing Manager

National Instruments
Comments
Member cedric77
Member

Hi is there a way to share process data between the 2 application labview and codesys?

Member Captain_Kirby
Member

Yes there is, but it's fairly unsophisticated at this NI Labs release level. The most common method is to use the FPGA. You can configure front panel controls and indicators in the FPGA application to be used to transfer info between CODESYS and LabVIEW RT. This is because both LabVIEW RT and CODESYS will have access to the same running FPGA application.

So, you could, for example, write a process variable from CODESYS to an integer on the FPGA front panel. That control could then be used to change IO (as expected.) You could also then route that control to an indicator on the FPGA front panel as well, and then use the RT application to read that indicator. The indicator will always have the latest process varaible value.

That's a very simple design, but much more complicated, 2 way communication, or even streaming communication with handshaking, could be implemented across all the supported data types of CODESYS.

Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
Member cedric77
Member

Hi,

Is it possible to use the linux shared memory to do the communication between both ?

Member Captain_Kirby
Member

At this time, with this NI Labs release, it is not possible. Or at least, we've done no testing or development to support it. I will add that there may be one other communication method, but it probably doesn't have much advantage over the "Shared FPGA" method I presented in my first comment.

Theoretically, you should be able to communicate via Ethernet and the loopback interface. So froma SW standpoint, LV RT and CODESYS would both think they were communicating with a device on the network, but in reality, they would be contained within the Linux RT OS.

We haven't tried this method yet but, in theory, it should work.

Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
Member Samuel_DAM
Member

Hello, 

Is it possible to use remote I/O with codesys on sbrio?

http://www.ni.com/fr-fr/shop/select/digital-module-for-remote-io

Regards

Contributors