hi claes
It works now...
from 5.6 the Sv objects are changed...
the ActualValue is now a pointer...
that was the reason of failing.
This par of the code is changes:
old code:
copy2StrEndCheck(refName, sizeof refName, AttrName, ".DeviceName");
sts = gdh_NameToAttrref(pwr_cNOid, refName, &aref);
if (ODD(sts)) {
sts = gdh_GetObjectInfoAttrref(&aref, objectString, sizeof (objectString));
if (ODD(sts)) {
copyStrEndCheck((char*)(co->DeviceName.ActualValue), sizeof (pwr_tString80), objectString);
}
}
new code:
copy2StrEndCheck(refName, sizeof refName, AttrName, ".DeviceName");
//Nodes-EvoPro-IO-A-R_IO_H-Touch_1.DeviceName
sts = gdh_NameToAttrref(pwr_cNOid, refName, &aref);
if (ODD(sts)) {
sts = gdh_GetObjectInfoAttrref(&aref, objectString, sizeof (objectString));
if (ODD(sts)) {
ActualValueString_P = (pwr_tString32*) gdh_TranslateRtdbPointer((unsigned long) co->DeviceName.ActualValue);//new
// ActualValueString_P to Evo-H-Var-IO-Touch_1.DeviceName.ActualValue
copyStrEndCheck((char*)ActualValueString_P, sizeof (pwr_tString32), objectString);//new
printf("TEST strings:\n AttrName= %s\n refName= %s\n objectString= %s\n",AttrName,refName,objectString);//new
}
}
Thanks for the tips
cees