User Functions

By Now you have most likely played with the Alpha Controllers a little. (remember, the software can be downloaded free from the Mitsubishi site). What we will do this time is to show you how to create your own user function. This is a very helpful tool as you can create your own functions and register them for use in future programs as well. Could save you a lot of timeJ

Once you have the software open, you simply click on the icon for: User Function. Now point to the program area and left click again. This will bring up a dialog box where you can type in the comment and also select the number of inputs and outputs you want this to have. For the example I have used, I selected one input and two outputs. This will then open a new program area showing the input(s) and output(s) you selected. Now you simply create the program you want inside this block.

Have a look at the example below to see what it would look like.

im 1

The program bit in the example is just something I put together to show you how the user function works. This waits for an input to turn on, in this case I worked with an input that will be on for a very short time then turn off again, at which point we will set our S/R relay on and count the first count on the timer. This will also turn on the first output to show us the signal was seen. After a delay of 5 seconds this output will turn off and wait for the next input signal. We will repeat this 5 times at which point the counter will activate output 2 showing us we have reached 5 counts. Once this happens, the second delay timer will time out the 3 seconds which it was set for, and clear the counter to start the cycle again.

As I said, this was just some random thoughts.

Now, once you have written the program you want, you simply close this by clicking on the white X as shown below.

im 2

 

 

This will close this area and place your user function into the main program as can be seen below.

im 3

 

Now you just draw in your input and output lines and your program is done. See how this allows you to have a very simple main program? All you see are the functions and not a mass of lines and blocks to try and decipher. To see what is inside a User Function, you simply double click on and it will open up so you can have a look at the programming inside.

Have a bit of a play with this and create your own User Functions that can then be “dropped” into your programs in future. It will save a lot of time.

Till next time, hope you find this useful and remember, Safety First!