Grabbing data from process analyst

josh_d

Member
Join Date
Jan 2011
Location
Vic
Posts
20
Im trying to extract data from a process analyst object, to create custom trend controls.

The object exists on a citect page and onPageShow, I call a function:

######################################

FUNCTION ConfigurePA()

OBJECT hPanes, hPane, hPens, hPen;
STRING sPen1Comment;

hPanes = _ObjectGetProperty(ObjectByName("AN23"), "Items");
hPane = _ObjectCallMethod(hPanes, "get_Item", 1);
hPens = _ObjectGetProperty(hPane, "Items");
hPen = _ObjectCallMethod(hPens, "get_Item", 1);

_ObjectCallMethod(hPen, "GetField", "Comment", sPen1Comment);

END //ConfigurePA()
######################################

Im trying to extract the tag comment from pen 1, so I can display it on the citect page. However, It doesn't work at all and I end up with two errors.

ERROR1:
Error 274: DESC: 'Invalid argument passed'
ERRPAGE: '_ObjectGetProperty'
ERRDESC: 'ConfigurePA'


ERROR2:
Error 433: DESC: 'Cicode type mismatch'
ERRPAGE: '_ObjectGetProperty'
ERRDESC: 'ConfigurePA'



Is it possible I dont have the function library included? From looking at the errors, Citect example code, and tinkering.. I cant find the problems!

Thanks for any help.
 
Your error is in this line:

hPanes = _ObjectGetProperty(ObjectByName("AN23"),"Items");

Check the syntax for ObjestGetProperty. It does not like either AN23 or Items. One or both are incorrect. Check to see what Properties Citect has available.
 

Similar Topics

I've got 16-bit data at address 40200 on a Schneider Scapack 350. I can grab the data over Modbus TCP using Kepware at IP 172.16.1.100. When I...
Replies
8
Views
2,501
I'm looking at trying to program Relay Ladder Logic to average out a value for X amount of time. In this application I'm looking to have an...
Replies
8
Views
3,055
Hello everybody, I'm currently working on a project where I need to implement an IoT platform based on Microsoft Azure Cloud. Communication is...
Replies
0
Views
22
Hello. I have a db which is 1000 INT, and this db is represented in WinCC as a raw data type set of 5x 400 Bytes. This set is read with a script...
Replies
1
Views
73
So i've been at this for a long while, i have Citect Scada 2018, i have full access to everything but i can't seem to find any option or...
Replies
0
Views
61
Back
Top Bottom