CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Mon Feb 17, 2020 11:54 am

All times are UTC+01:00

Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Aug 17, 2016 10:17 pm 

Joined: Thu Jun 23, 2016 5:01 pm
Posts: 2
I am using Codesys 3.5.7 for Wago (aka: e!Cockpit). I need to change the visualization within a frame using structured text, but only on the current client. Since the code is embedded in a button, I assumed the button would have a pointer to the client it is displayed on and have tried to access it via:

pClientData := THIS^._pCurrentClientData;  // unless I'm mistaken, THIS should point to the current button, or at least the current visualization


iClientIndex := VisuElems.g_ClientManager.GetClientId(THIS^._pCurrentClientData);
pClientData := VisuElems.g_ClientManager.GetClientData(iClientIndex);

In both examples, it fails to compile with: Cannot convert type 'Unknown Type: 'THIS^._pCurrentClientData'' to type 'POINTER TO VisuStructClientData'.

I have checked the following example projects: Client Independent Visualization Switching, Visualization Switching, and Responsive Design. None of these give any example on how to determine what the current visualization is.

Also, does anyone know if there is a way to create client specific variables? I know if I can get an index for the current client I can simply use an array of variables, just wondering if there is a simpler way?

Thank you in advance.

Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC+01:00

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited