Commit d0d7f876 authored by Claes Sjofors's avatar Claes Sjofors

wb embedded plc, cross reference fix

parent bc9c9a68
......@@ -11804,13 +11804,33 @@ pwr_tStatus wb_utl::utl_replace_symbol( ldh_tSesContext ldhses,
case ldh_cPlcFoVolume: {
pwr_tStatus sts;
pwr_tOid host;
pwr_tCid cid;
sts = ldh_GetParent( ldhses, oid, &host);
if ( EVEN(sts)) return sts;
sts = ldh_GetParent( ldhses, host, &host);
if ( EVEN(sts)) return sts;
sts = ldh_GetObjectClass( ldhses, host, &cid);
if ( EVEN(sts)) return sts;
if ( cid == pwr_cClass_plc) {
// PlcFo reference in embedded template plc
pwr_tAttrRef *host_arp;
int size;
sts = ldh_GetObjectPar( ldhses, host, "RtBody",
"HostObject", (char **)&host_arp, &size);
if ( EVEN(sts)) return sts;
arp->Objid = host_arp->Objid;
arp->Offset += host_arp->Offset;
free( (char *)host_arp);
}
else
arp->Objid = host;
break;
}
case ldh_cPlcMainVolume: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment