Access CCpilot VI2 Hardware Buttons and Buzzer from CODESYS

Access CCpilot VI2 Hardware Buttons and Buzzer from CODESYS

This CODESYS application example shows how the state of the hardware buttons and the buzzer on the CCpilot VI2 display can be read and used in the application.

Run on VI2

 

There are four squares for ech of the buttons and when a button is pressed, the square next to the button changes the color to pink. Then there is also a "Buzz button" that activates the buzzer and you will hear a buzzer sound for as long as you hold the button pressed.

The project uses the CCAux API interface to handle the states of the buttons and the buzzer. The state is then available from the GUI. The project example also includes a basic example of the buzzer functionality as previously described.

Visualization from CODESYS IDE

You can see in the impementation that functions such as:

About_GetNrOfButtons, SoftKey_GetStatus

Buzzer_SetVolume, Buzzer_SetFrequency, Buzzer_GetTrigger & Buzzer_SetTrigger

are used from CCAux in order to get access to buttons and the buzzer.

Test environment iMX6 CCpilot VI2:
Target SW versions:
• OS v1.3.0.0
• SS v1.2.2.0
• CCAux v2.15.2.0
• CODESYS RT Visu v3.5.16.40
• LinX-Base RT v4.0.1 (for VI2)
(Note! Only needed if a Qt application or DataEngine/FieldbusAccess services will be used in combination with CODESYS)

Preconditions:
• Remove cclauncher
• CODESYS IDE used to download example project: V3.5 SP16 Patch 1 (64-bit)

Attachments:

Download the project archive from here: CODESYS-project

    • Related Articles

    • Data Engine access from CODESYS

      This article contains two project parts – a CODESYS NoVisu project and a Qt GUI application. The two projects use the Data Engine (DE) to send signal values between the two applications. The DE signals in the Qt application have been created with the ...
    • Device Description files and libraries for CODESYS

      We have prepared a project archive for CODESYS which contains all the current Device Description Files as well as the CCAUX and CCSAP libraries necessary for CODESYS programming on CCpilot Display Computers. Content: Crosscontrol CODESYS Development ...
    • Installing the LinX-Base runtime on a CCpilot iMX8 display

      When you order a product with LinX-Base (UX-Designer, Fieldbus Access and Data Engine) the required runtime will be pre-installed. If you still need to download this runtime package manually, follow the steps below. This article is valid for all the ...
    • Where can I find Operation System update packages for CCpilot Displays

      Crosscontrol has all the downloadable packages available for each of the CCpilot Display Computers. Head to our list of different CCpilot devices: Display computer | CrossControl From here, choose and click on the CCpilot Display that the OS update ...
    • CODESYS Use other fonts

      How to use other fonts (i.e. Chinese) Steps to do on the CrossControl devices 1. Remount the file system in read-write mode This is only valid for iMX5, iMX6 and Intel Atom devices. # sudo mount -o remount,rw / (Use the command mount -o remount,rw / ...