Skip to content

driveObjectId and statDoId #31

@christof-ochs

Description

@christof-ochs

driveObjectId should not be unsigned
The Start methods of the different Read/Write operations for drives declare the driveObjectId as Uint.
This is then cast to byte and stored in the statDoId field (inherited from the baseclass).
https://github.com/simatic-ax/lacyccom/blob/8e68af7551e1e57ac9a08ba2ff51520fa42c33b6/src/Blocks/Drives/classReadDriveParams.st#L383C9-L392C37

In the baseclass, the statDoId is compared to be "<0", which can never be true given the UINT type of the method's input.
https://github.com/simatic-ax/lacyccom/blob/8e68af7551e1e57ac9a08ba2ff51520fa42c33b6/src/Blocks/Drives/Baseclass.st#L180C13-L195C24

According to the TIA Portal versions documentation, using a driveObjectId of -1 is acutally the recommended access type (Base Mode Parameter Access - Local)
Image

Expected behavior
Support access exclusivly via hwID.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions