The PIC-Syms Studio is a tool for creating PIC-Sym project simulations for use within PIC-Logicator 2005 software. PIC-Syms are simulations of PICAXE projects. The Flowsheet from PIC-Logicator is downloaded into the PIC-Sym and this can then run independently of the PIC-Logicator software, as a normal PICAXE project would.
To create a PIC-Sym, firstly a set of images must be gathered, edited and saved onto your computer. Once you have the images, the PIC-Syms Studio can be used to bring these to life. For realism, you should decide which type of PIC you plan to simulate the use of before planning your images. You should only add input and output objects to your project that exist on the type of chip you are simulating. For details of which inputs and outputs are available on specific chips, see the PIC-Logicator 2005 manual.
PIC-Syms are made up of sets of Inputs and Outputs, which can take various forms:
Push Button or Picture Box (up to six)
Track Bar (up to four)
Digital Output (up to eight)
And / or
Motor Output (up to four)
The PIC-Syms Studio uses a window docking utility that allows windows to be docked around the edge or floated over the screen. There are four windows that can be positioned around the working area; the Tool Box, Object Info, Image Preview and the Digital Panel. Click and drag the header of the window to un-dock it, or drag a floating window to the edge of the screen to see the dock options shown as a dotted rectangle.
When a window is docked a drawing pin icon appears in the top right corner of the window. Click this to auto-hide the window when the mouse moves away from it. Move the mouse over the tab to show the window again.
Display windows cannot be closed. To hide them, dock them to a screen edge then click the drawing pin icon to hide it.
The canvas area is where the work is carried out on the PIC-Sym. The canvas itself forms the background for the PIC-Sym. Double click the canvas to set the background image.
Objects are dragged from the Toolbox onto the canvas.
The image preview shows small ‘thumbnail’ images of every image used in the PIC-Sym. Where buttons are used instead of images, the colour of the button is shown in the thumbnail.
Information about the item that is selected is shown in the object info box. This is a short description of the type of object (Picture Box, Track Bar or Button), whether the object is an input or output and the number of the object.
Six sets of images are supplied with the Studio. Four of the sets: “Case”, “Celebrate”, “Game”, “Phone” are the images used in the PIC-Syms supplied, so you can customise them if you wish to. The set called “LEDs” contains images of a plain background and a set of different coloured LEDs in on and off states, that you can use to build a simple PIC-Sym of your own. The “Alien” set provides the basis for the explanations given in this Help file, and also for the Tutorial, enabling you to build a completely new PIC-Sym very quickly.
The images for the samples are normally installed into a folder called ‘PIC-Syms’ within the default ‘My Documents’ folder on your computer.
You can follow the tutorial to create the your first PIC-Sym using the “Alien” set of images.
There are many ways in which images can be created for use within the Studio. Some of the most popular are:
1. Photos - take a series of photos of a scene with devices switching on and off, or moving, e.g. a series of photos of a pelican crossing.
2. Scan - create a series of sketches or drawings of your system on paper and scan these into drawing software.
3. Draw - for the artistic, PIC-Syms can be created from scratch in a drawing package such as Paint Shop. This is the way that all of the PIC-Syms provided PIC-Logicator were created.
In this example the Alien set has been used to illustrate how the images were put together.
Sets of images were drawn showing all the possible combinations. For the Alien, there are two images required for the mouth and eyebrow movement, and four required for the eyes.
The original images are as follows:
The blank background…
The four movement images…
We need to cut out the two images of the eyebrows and of the mouth.
This is done as follows…
Using Paint Shop (or similar) load in one of the images.
Select the area round the eyebrow that is required. Take note of the start point and size of the area that has been selected – this is shown in the lower left corner of the screen, on the status bar.
in this case the start point (top left corner) is at (267, 219) and the selected area is 320x117 pixels.
The area is now copied and pasted as a new image.
We need to repeat the process with an image that has the other eyebrow shape, using the same start point and size…
we have zoomed in to the image further to make the job easier to see. Note that the start co-ordinates and selection area are the same as before.
Again, copy and paste the area as a new image. We now have two images with just the eyebrows…
This process is repeated for the mouth and the eyes to build up the complete set of images.
PIC-Syms are on-screen simulations of control situations. The computer is used via the PIC-Logicator 2005 software to control the simulation. The PIC-Sym can consist of inputs (analogue and digital), outputs and motors.
· Inputs are devices or areas on the PIC-Sym screen that the user interacts with e.g. clicking a button or sliding a Track Bar.
· Outputs are picture boxes on the screen that are switched on or off from the PIC-Logicator 2005 software. For every output there are two images required – one for the ‘off’ state and one for the ‘on’ state.
· Motors are similar to outputs, but use four images. When the motor is switched on the displayed image scrolls through each one of the four images in turn continually. The speed and direction of the motor can be varied using the PIC-Logicator 2005 software.
To create a PIC-Sym you must first create the images. Once these are prepared save them all (with appropriate names) in a folder on your computer. You MUST save your PIC-Sym file into this folder with the images.
Double click the white canvas area of the PIC-Syms Studio.
Click the Browse button and choose your background image. Remember that all images must be in the same folder. The size of the background image is displayed once it has been selected using the browse button – this can be changed if you wish, but as you can resize the PIC-Sym window in the control software, it is not generally necessary to change picture sizes when you are creating your PIC-Sym.
If you wish, you can use the blank canvas as the background.
Outputs are switched ‘on’ or ‘off’ by the PIC-Logicator 2005 software and require two images. The toolbox contains the objects that you can add to the PIC-Sym. If it is not already selected, click the ‘Outputs’ bar on the toolbox to display the ‘Digital Output’ object.
Outputs, Motors and Inputs are assigned numbers in ascending numerical order. If you wish to add an object with a specific number (e.g. Output 5) press the corresponding number on the keyboard before you drag on the object.
Using the left mouse button, click and drag a Digital Output object onto the canvas area. The object will be shown as a grey rectangle with a red border.
The red border indicates the object that is selected. Either double click the object or from the edit menu choose ‘Properties’ and the following dialog will appear….
In the ‘OFF State’ area, click the Browse… button and select the image that will be used when the output is OFF. In the ‘ON State’ area, repeat this for the image to be used when the output is ON.
When the output is ON, you can optionally select a sound (wav or mp3) file to play. To select a sound file, click the Browse… button next to the sound filename. Note, as with the images any sounds you use must be copied to the same folder as the pictures. By default, the sound will play once, when the output is switched ON. If you want this to continue playing in a loop until the output is set OFF, then click the ‘Loop continuously’ check box.
Click OK.
You can reposition the object by dragging it around the canvas with the mouse. For fine placement of the object, click on it once so that it is selected and use the arrow keys to move it up, down, left or right.
There are two types of object that can be used as Digital Inputs; a Push Button or a Picture Box. A Push Button is a standard Windows type button that can be modified. A Picture Box is similar to a Digital Output object, but instead of being switched on or off by the control software, its state changes when it is clicked upon.
Click on the ‘Inputs’ group header on the Toolbox to display the Input objects.
Outputs, Motors and Inputs are assigned numbers in ascending numerical order. If you wish to add an object with a specific number (e.g. Input 3) press the corresponding number on the keyboard before you drag on the object.
Using the left mouse button, click on the object called ‘Button’ and while holding down the mouse button, drag the object onto the canvas. The Button will appear on the canvas. Double click it to open the following dialog…
There are several settings that can be modified for a Push Button. These are:
Size – use the sliders or up down lists to set the size of the button.
Text - set the text to display on the button (optional)
Button Style - three styles are available; Standard, Flat and Popup.
Text Colour - the colour of the text if shown
Button Colour - the background colour of the button
The button is shown as a preview in the Size area of the dialog. Any changes you make are displayed here.
Note that the text colour is also used for button borders in some of the button styles.
Click OK.
You can reposition the object by dragging it around the canvas with the mouse. For fine placement of the object, click on it once so that it is selected and use the arrow keys to move it up, down, left or right.
Click on the ‘Inputs’ group header on the Toolbox to display the input objects.
Outputs, Motors and Inputs are assigned numbers in ascending numerical order. If you wish to add an object with a specific number (e.g. Input 3) press the corresponding number on the keyboard before you drag on the object.
Using the left mouse button, click on the object called ‘Input Picture’ and while holding down the mouse button, drag the object onto the canvas. The Button will appear on the canvas. Double click it to open the following dialog…
In the ‘OFF State’ area, click the Browse… button and select the image that will be used when the input is OFF. In the ‘ON State’ area, repeat this for the image to be used when the input is ON.
For input Picture Boxes, you can set one of two behaviour modes:
Mouse Down - the input comes on only when the user has pressed the mouse button on the object. The input goes off when the mouse button is lifted.
Click - the input comes on when the user clicks the object, and stays on until the user clicks the object again. This is called toggling.
In the Behaviour area, set either Mouse Down or Click.
Click OK.
You can reposition the object by dragging it around the canvas with the mouse. For fine placement of the object, click on it once so that it is selected and use the arrow keys to move it up, down, left or right.
Motors are similar to output type objects but have four images. A motor can be set in the PIC-Logicator 2005 software to turn either forwards or backwards. The four images are cycled through as the motor runs. If the motor is set forwards, image 1 is displayed, then 2, 3, and 4, returning back to 1. If the motor is set backwards, the images are displayed in reverse order.
Additionally, motors can provide feedback to the PIC. This is useful for letting the system know which image is being displayed. For example you may wish to simulate a limit switch on a barrier. Setting the feedback could trigger an input on when the barrier was closed.
Click on the ‘Motors’ group header on the Toolbox to display the Motor object.
Motors are assigned letters in alphabetical order. If you wish to add a Motor with a specific letter (e.g. Motor B) press the corresponding letter on the keyboard before you drag on the object.
Motors are connected to the PIC outputs in pairs; Motor A is Outputs 0 and 1, Motor B is Outputs 2 and 3 and so on.
Using the left mouse button, click on the object called ‘Motor Output’ and while holding down the mouse button, drag the object onto the canvas. The Motor will appear on the canvas as a grey rectangle with a red border. Double click it to open the following dialog…
For each image, click the Browse… button and select the appropriate file.
Using Feedback
For each of the images, you can choose an Input that will be switched ON when that image is displayed. To set an input to come on with image 1, click the topmost check box in the feedback section. From the drop down list, choose the input to use. Note that you can use only inputs that have not already been used for Push Buttons or Picture Boxes.
The Feedback input will remain ON until the image changes to another image in the list.
Click OK.
You can reposition the object by dragging it around the canvas with the mouse. For fine placement of the object, click on it once so that it is selected and use the arrow keys to move it up, down, left or right.
Unlike Digital Inputs that are either on or off, analogue inputs provide a range of values. Examples of analogue inputs are light or temperature sensors. In the PIC-Syms Studio you can simulate the reading from an analogue sensor using a sliding Track Bar.
Click on the ‘Analogue’ group header on the Toolbox to display the Analogue objects.
Analogue Inputs are assigned numbers in ascending numerical order. If you wish to add an object with a specific number (e.g. Input A2) press the corresponding number on the keyboard before and while you drag on the object.
Using the left mouse button, click on the object called ‘Track Bar’ and while holding down the mouse button, drag the object onto the canvas. The Track Bar will appear on the canvas. Double click it to open the following dialog…
Use the sliders to change the size of the object. Track Bars can be oriented Horizontally (left to right) or Vertically (up / down). Click the ‘Vertical’ check box if you want your Track Bar to be oriented vertically.
Additionally, you can choose the Back Colour for the Track Bar. Click the button to set the colour.
Click OK.
You can reposition the object by dragging it around the canvas with the mouse. For fine placement of the object, click on it once so that it is selected and use the arrow keys to move it up, down, left or right.
The four PIC-Syms supplied, all include the facility to connect or disconnect a download cable and a battery. These features are included to make the simulations behave as much like real PICAXE-based projects as possible. For example, if these connections are not made at Download, the “Download failed” message will appear. In some projects, using the power connection can provide the means of stopping or restarting the program.
If you do not include these features in your own PIC-Sym, the project will behave as though power and download cable are permanently connected.
The Power Supply and Download Cable connections are created in the same way as an Output, i.e. by dragging the object onto the background and selecting “ON” and “OFF” state images from the dialog.
Click on the object and press the delete key.
If you have deleted an object, you can use the Undo option to undo the delete. From the Edit menu choose ‘Undo’.
Double click on the object you want to edit.
Either click and drag the object around the canvas using the mouse, or click once on the object and then use the arrow keys.
In order to test the functionality of the PIC-Sym that you have built, the digital panel from Logicator has been provided.
Use the mouse to switch on an output by pressing the left mouse button over the corresponding output – this will switch ON the output and change the image for that output to the ON state. When the mouse button is released, the output is switched OFF and the image will return to the OFF state.
Pressing the LEFT mouse button over the corresponding Motor will switch the Motor FORWARDS. Pressing the RIGHT mouse button over the Motor will switch the Motor BACKWARDS. The speed at which this simulation occurs is similar to about 50% speed in Logicator.
Push Buttons - Press the push button with the mouse and the corresponding input will come on, on the digital panel.
Picture boxes - Press the left mouse button on the digital panel inputs side and the corresponding input image will change.
Feedback - While testing a Motor (see above) any feedback inputs that have been set-up will trigger and show on the digital panel.
Create your PIC-Sym and save the file in the same folder as its images.
Load up PIC-Logicator. From the PIC-Syms menu on the toolbar click “Open PIC-Sym”. The simulation window will load up and prompt for a file to open. Select your PIC-Sym and click Open. You can now use your PIC-Sym. You can resize the PIC-Sym window by dragging it; or switch between large and small versions by using the “Window” menu.
Before you download a program to your PIC-Sym, make sure that you have selected an appropriate PICAXE type PIC that provides the range of inputs and outputs used in the PIC-Sym.
Note that, unlike a real PICAXE-based project, a PIC-Sym does not retain its program when it is closed.
Please remember that you must copy the images as well as the PIC-Sym saved file if you plan to distribute the PIC-Sym to other computers.
MAB
March 2005.
PIC-Syms Studio ©Copyright 2005 Economatics (Education) Limited.