AnthonyLH Posted November 3, 2015 Share Posted November 3, 2015 I can not succeed to have correct values for "Coord[x].TPExec.Pos[j]" using the plot tool (data gathering), when i have correct values in a watch windows. Also, i can not read it in C using standard "pshm->Coord[1].TPExec.Pos[8]", i get the error "request for member 'Pos' in something not a structure or union". Thank you! Link to comment Share on other sites More sharing options...
steve.milici Posted November 4, 2015 Share Posted November 4, 2015 This structure's value that you want is not actually in shared memory at its address. It is a pointer to a shared memory array that PMAC automatically parses and returns the value for you. If you wish to gather this create a simple PLC to copy this to a global variable. If this is only a transitory need you could just place it in a watch window keeping in mind the update will only be the rate of the watch window: P98=Coord[1].TPExec.Pos[8] Link to comment Share on other sites More sharing options...
steve.milici Posted November 4, 2015 Share Posted November 4, 2015 Added note. Think of this structure as a "function like" structure. The address retuned is not the address of the data returned by a script query of the structure. Link to comment Share on other sites More sharing options...
Recommended Posts