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.
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.
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