Hi!
I am trying to make a program that can read the names of the available inputs and outputs on the robot, using the "ReadCfgData" command. The names are then displayed in a list, so that the user can choose which inputs/outputs to use for what, when the robot program is set up.
This works fine when it is simulated in RobotStudio, but on some real robots it doesn't work. We recently had a case where it gave us the following error message:
"
40747: Access Error
Description
Task T_ROB1
Cannot read or write to the system parameter Attribute. The parameter is internal and protected from reading and writing.
Program ref: /SBase/GetExistingIONames/ReadCFGData/4747
Actions
Recovery: ERR_CFG_INTERNAL
"
The code for reading the signal names looks like this:
FOR nIndex FROM 1 TO nMaxSignalIndex DO
ReadCfgData "/EIO/EIO_SIGNAL/SignalType/"+sSignalTypeString,"Name",sSignalName\ListNo:=nListIndex;
ReadCfgData "/EIO/EIO_SIGNAL/"+sSignalName,"Device",sDeviceName;
IF (sDeviceName<>"PANEL") AND (sDeviceName<>"DRV_1") AND (sSignalName<>"") THEN
sSignalList{nSignalsRead}:=sSignalName;
ELSE
Decr nSignalsRead;
ENDIF
IF (nListIndex=-1) THEN
RETURN nSignalsRead;
ENDIF
Incr nSignalsRead;
ENDFOR
Display More
sSignalTypeString will have one of the values "DI", "DO", "GI", "GO", "AI", "AO". In this particular case (where it failed), the value was "DO".
We have not been able to figure out what the problem is, and how to solve it. Is it a system setting that we need to change?
Any help would be greatly appreciated. Thanks in advance!
/RoboticsMan
EDIT: Added information: It fails on the first call to ReadCfgData