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,521
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,066
Hello, im quite new and still learning. I would like to ask is it possible for FATEK PLC to read data value more than 16k? I'm trying to move my...
Replies
0
Views
67
Hello Everyone, I am using a raC_Opr_NetModbusTCPClient AOI module, as below,. So, I need some assistance to restrict in reducing the poling...
Replies
2
Views
122
Hi everyone, I have a 505 workshop program with PLC type of 555- 1106 and I was wondering how can I download the data documentation window as a...
Replies
8
Views
235
Back
Top Bottom