Nirtec Studio Forum

General Category => Machines Simulator => Topic started by: KCP_Robin on May 14, 2015, 05:01:11 AM

Title: Wagon Component Code with Comment
Post by: KCP_Robin on May 14, 2015, 05:01:11 AM
I'm trying to Edit The wagon component to have 5 positions.. not just the left and right. but having a hard time to understand the code.. Adding a comment on code will help me to understand it fully,, I'm not familiar with the C# programming any help would be very Appreciated... Thank You in Advance..
Title: Re: Wagon Component Code with Comment
Post by: EasyPLC_Master on May 14, 2015, 05:19:16 PM
Hello, here is attached a new component called Wagon2 and a machine showing how to use.
The wagon have 5 positions to go, (always in the same axis, but could be changed easily).
Copy the file Wagon2.cmp in the Components folder and Wagon Exmaple.maq in MyMachines folder.
The code is more explained.

Hope help you!

[attachment deleted by admin]
Title: Re: Wagon Component Code with Comment
Post by: KCP_Robin on May 15, 2015, 03:39:53 AM
 ;D Thank you Very Much! .. Will Try Now...
Title: Re: Wagon Component Code with Comment
Post by: KCP_Robin on May 15, 2015, 06:20:52 AM
I've downloaded the files and ran it,, and I notice that there's something wrong happening if from position 4/5 to Position 3..
Trying to solve it now.. Thank you again for providing sample :)
Title: Re: Wagon Component Code with Comment
Post by: KCP_Robin on May 15, 2015, 06:51:54 AM
Solved it.. under Position 3 request.. in the direction part..
x_Posit[1] should be changed to [2]..
Thank you again..
Title: Re: Wagon Component Code with Comment
Post by: EasyPLC_Master on May 15, 2015, 08:52:02 AM
Great  :D!