Thank you very much for calcification, I could do many things now , my fault also was in Indexing the Train.
One more question, How can I access TrackPos class, There is no object called TrackPos
I tried to access its methods directly but had this error message
MyTrackPosMat = TrackPos.getCenterRailsMatrix();
Trying to access a non static method from a static context: getCenterRailsMatrix
...1 error(s), 0 warning(s)
Thanks