10 Steps to Controlling the SSC32 with MSRS

To start working with Lynxmotion in MSRS, you first must set up the initial files. Here are 10 steps to get you running. After you do this, you’ll be ready to start your own services (but that’s another thread). These steps assume you already have Microsoft Robotics Studio installed in the proper directories, but let me know if you need help with that part too.

1- Download the Lynx6ArmPackage.zip from lynxmotion.com/Product.aspx? … #downloads (from the Lynxmotion homepage, go to Products, then to Software, then to Microsoft Robotics Studio Support). Unzip the file and run the extractor. This creates a few files in C:\Microsoft Robotics Studio (1.5)\apps that allow MSRS to communicate with Lynxmotion.

2- Plug your SSC32 robot (whether that is a BRAT, arm, whatever) into the computer through the COM port (I assume Bluetooth has the same procedure, but I haven’t actually played with that yet).

3- Go to your computer’s device manager (Control Panel, System, Hardware tab, Device Manager button). Figure out what COM port your robot is plugged into. Below you can see that mine is COM38. Remember your number!

http://cs.millersville.edu/~kaworkman/LynxmotionTutorial/SerialPort.JPG

4- Navigate to C:\Microsoft Robotics Studio (1.5)\apps\softtech\lynxmotion\ssc32 that you created in step 1. Open ssc32.sln.

5- In SSC32State.cs, find this line around line 452 or so:

private string _portName = "COM1";

Remember that number from step 3? Change the 1 to your number. So I would change it to COM32. If your number is one digit long, you can skip step 6.

6- Go a few lines down, around line 465 to this line:

   return Int32.Parse(_portName.Substring(_portName.Length - 1));

If your COM port is more than a single digit, this line won’t work. So you need to either change that 1 at the end to a 2, or simply return your COM port number, like I did:
http://cs.millersville.edu/~kaworkman/LynxmotionTutorial/COMPort.JPG

7- In SSC32.cs, around line 82, find this line:
private int _maxChannels = 6;
This basically tells the code the highest channel you are going to be using. Change the 6 (default for the arm) to whatever number you are using PLUS ONE. The highest channel I use is 18 so I changed the 6 to a 19.

8- Around line 140, find this line:

if (i == 2) pulseWidths* = 1722;
This section of code is setting the pulse widths of all of the channels (up to but NOT including the number you set in step 7) to 1500. The default for channel 2 when using the arm is not 1500, so the above line is setting it to 1722 instead. Since I’m using the BRAT, this causes it to kick, so I just took it out completely. Play around with your robot, you might want your default to be different.

9- Compile and run the project by pressing F5 or by selecting Start Debugging from the Debug menu.

10- Using a web browser, navigate to localhost:50000/ If it prompts you for a username and password, it’s your windows username and login password. This is the MSRS web interface where you can interact with the services and see different kinds of output. Click Service Directory to see a list of all of your currently running services (there should be 11) then click /ssc32. If your SSC32 is on and properly connected, you should see 32 text boxes with the current pulse width of each channel. Try changing one of the text boxes that corresponds to on of your robots’ servos and clicking change. I use this screen to get poses and specific steps of actions correct. Then I use them in another service, which I’ll get to in my next post!*