Chapter 3: I/O Control
KINGSTAR offers a string of I/O control functions that read or write data into your I/O module in different unit. To access the specific location of the data, you can set the offset. The function's name indicates the unit of reading, writing, or offsetting data. For example, the unit of ReadInputBit is bit, and WriteOutputWord is word.
In this chapter, you'll learn how to use functions to read and write your I/O modules.
Add a header and cpp file
You need to add a header and a .cpp file to learn the code of this chapter. The steps of adding them are written in Chapter 2 > Add a header and .cpp file.
- Add a header file:
- Add a .cpp file:
In Solution Explorer, in Header Files, add a header file and name it "IOModule.h
."
In Solution Explorer, in Source Files, add a C++ file and name it "IOModule.cpp
."
Tutorials
Take the following steps to complete the training: