Writing A Test Application - Kontron ThinkIO-P Manual

Hide thumbs Also See for ThinkIO-P:
Table of Contents

Advertisement

ThinkIO
- P
6.3

Writing a Test Application

A new POU "PLC_PRG" is created using the programming language "ST".
The following simple application will:
• make a simple assignment in the statement part of the program
• count the variable x
• assign bit 0 of variable x to KBUS output 1 (KBUS_OUT1)
• assign bit 1 of variable x to KBUS output 2 (KBUS_OUT2)
• read KBUS input 1 (KBUS_IN1) and assign to variable kbus_input (bit 0)
• read KBUS input 2 (KBUS_IN2) and assign to variable kbus_input (bit 1)
• assign variable x to PROFIBUS output (PROFIBUS_OUT)
• read PROFIBUS input (PROFIBUS_IN) and assign to variable profibus_input
If the test program can be compiled without any problems it can then be loaded into the
ThinkIO-P PROFIBUS Master.
PROFIBUS will be automatically initialized when the user program starts. The I/O communica-
tion with the slave and reading from and writing to K-Bus modules will start when the program
starts.
ID 29867.06, Rev. 01
PROGRAMMING ASSISTANCE GUIDE
© 2007 Kontron Modular Computers GmbH
CoDeSys PLC
Page 25

Advertisement

Table of Contents
loading

Table of Contents