Control System Studio (EPICS) with an Arduino


It was mentioned in the last post, but it’s important enough to be mentioned again here.  CS Studio will work if installed in the way explained in the last post, but it will want to update itself, and that update will break it.  The first thing you need to do is go to Edit–>Preferences–>Install/Update–>Automatic Updates and un-check “Automatically find new updates and notify me”.  Click “Apply” (it may be hidden off screen on the bottom-right) and then click OK.

Close the Welcome Window and then change the perspective to “OPI Editor”.  Window–>Open Perspective–>Other, then chose “OPI Editor”.

In the Navigator pane, right-click on CSS, then New–>Project.  Then General–>Project, and click next.  Pick some witty name for the project, and click Finish.

Now right-click on your new project that has appeared in the Navigator window, and click on New–>OPI File.  Give this a clever name as well, and click Finish.  Now you have a blank canvas to work on.

From the “Palette” just to the right of the canvas, click on “Scaled Slider” in the Controls menu, and click on the canvas to add it.  Rescale the slider to fill a reasonable amount of vertical space.  Now click on the small box at the top-left of the slider, and add the PV name “led:set”.

In the Behavior properties for this slider, set the maximum to 255, and unclick “Limits from PV”.  In the Display properties, unclick “Show HI”, “Show HIHI”, “Show LO”, and “Show LOLO”.

Now save the OPI, and then run it (click the little green arrow at the far right of the top toolbar).  You should be able to drag the slider up and down, and watch the LED respond appropriately.  Congratulations!

LED_ctrllr

Now close down the Operator Screen, and go back to the CSS canvas.  In the top toolbar, near the left hand side, click on “Open new Data Browser plot”. Make sure this opens the new view in the “Data Browser” perspective.

In the properties window (at the bottom of the screen), click the “+” to add a new PV, and add “led:set”.  Then click the “+” again, and add “photo:get”.

Now click on “Time axis”, and change the start time to “-10 minutes 0.0 seconds”.

Click on “Value axis”, and change the Max value of led:set to 255, and of photo:get to 1024.

Click on Misc and change the plot redraw period to 0.5 seconds.

Finally save this in the same folder as your other project.

Go back to the other tab, and add a “Data Browser” from Monitors to the canvas.  In the Basic Properties of this Data Browser, click on File Name and add the file you just created.

Now click on the green arrow to run the GUI again.  When you do this, you should be presented with a screen where you can play with the value of led:set, and view the response on photo:get.

finalResult

Leave a comment