<< to CrossControl homepage

Support & Service Center

Switching CODESYS Visu page/frame with HW buttons on CCpilot VI2

Printer-friendly versionPrinter-friendly versionPDF versionPDF version
Default you are able to change between Visu pages by changing the Default Hotkeys in the Visualization Manager settings. For CCpilot VI2 the assigned keys are, C,D,E,F.

This application shows how the state of the hardware buttons on the CCpilot VI2 can be read and used in the GUI. By clicking the different HW buttons a new Visu Frame/page is shown. The project uses the cc-aux interface to handle the states of the buttons. The state is then available from the GUI.

Extract from included PLC_PRG
// Read the state of the hardware buttons from cc-aux api with Button_GetValues.
IF firstTime THEN
	eError := About_GetNrOfButtons(numbuttons=>numberOfButtons );
	firstTime := FALSE;
IF eError = ERR_SUCCESS AND numberOfButtons > 0 THEN
	eError := SoftKey_GetStatus(value=>frontButtonValues);
	CASE frontButtonValues OF
		1: framePage := 0; 
		2: framePage := 1; 
		4: framePage := 2; 
		8: framePage := 3; 
Environment and Versions: 

ARM imx6 Linux

Applies to version: 
OS Image