In this topic I will show you how to control servo microcontroller directly from Rocrail. In the topic "Arduino USB interface for sensor feedback to Rocrail" (viewtopic.php?f=11&t=10120
) I have introduced a kind of solution, sending information from Arduino Mega2560 to Rocrail without decoders. Jens asked me, help him to build an opposite information flow on similar way.
Servo turnouts can be controlled without accessory decoders, directly from Rocrail. You can use for example a 32 channel servo control board.
When you connect the board first, it creates a virtual COM port. You can check the number of it with Device Manager, during connected. I will use COM3 in this description, you have to use your own. We can test the servo with the supplied software first and the turnout parameters can be identified. This software no need later.
We do not have to modify the Rocrail setup. In the first step we have to create two Actions. Their names self explanatory, later for all switches have to capture two. Select for the Type the run ext. program. The “echo #1P1500>com3” command sends the first servo on the COM3 serial port, to the position1500. In this example, the second Action identical with the first, except the command and name, in this case we use the position 1000. Right click on the turnout icon on the Demo Plan end select the Properties submenu. Click on the Action button. In the appeared window, set the ID and State fields and Add click. In the Conditions window set the Type, ID, and State parameters and Add click again. Repeat this process with the Sw1Turnout Action as well but the State field will be turnout there. There is only one thing to do. Go back to the turnout Properties window and set the Interface ID. For test vcs-1 with Default Protocol is reasonable.
After this process, if we change the turnout state with a click on the icon on the Demo Plan, the servo will follow that. In the Rocrail DOS window we can see the commands issued to serial port and any error message.
You do not have the required permissions to view the files attached to this post.