Pages

Tuesday, 7 July 2015

Velocio Brach 11 PLC

So I have been waiting in anticipation for the arrival of my new Velocio PLC it arrived a week or so back and wanted to just make a quick post about my initial thoughts.

Below is a picture of the PLC with the first reaction being wow, how insanely small!
This wee gadget is only as big as a typical Nokia charger, which, incidentally I have used as the power supply for the PLC. 

This PLC is a Branch 11 which has 6 digital in and 6 digital outputs. This cost me something like $135 NZD to get landed here in NZ, I feel like it is a little expensive given that I am able to get industrial PLCs of TradeMe for a similar price. 

Go to the Velocio.net website to check out what they are trying to achieve... 

So far I have not been terribly excited about the product. It's small size and user interface has not been a highlight for me so far. In fairness I have used AB CompactLogix and Festo PLCs before and I prefer the full size and robust appearnces of said PLCs but I am going to give this one a fair whack before I judge it too harshly. 

I'm going to start by working my way through their videos on their Youtube channel and see where that gets me. 

Here is hoping I make progress. 


Wednesday, 1 July 2015

C# Starting from Scratch

So many years ago, it seems I learnt how to program in C# a compiler developed by Microsoft. Well, recently I was asked if I could write some code to sort some data in a CSV format.

This is easy enough to do with Excel but with many data sets to be sorted in the future and with a bit of time till it will be used. I thought to myself what an opportunity to build a program using C#. Little did I know I have forgotten so much of what I have learnt I decided that I would pull out the old text book and start from the start. Or from where I think the start should be in this case.

Anyway here is the work that I have done today in the last half hour.


And here is the code that I used to implement it. Pretty straight forward code, give it a go, you forget how much fun mucking around with code it. 

Shout out too Douglas Bell & Mike Parr from C# for Students. Great book and will never throw this one out!

Hopefully I will keep you posted on how my little C# program for organising my CSV file goes.

namespace FirstDrawingProgram
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Graphics paper;
            paper = pictureBox1.CreateGraphics();
            Bitmap pic = new Bitmap(@"C:\Users\Nathan\Pictures\Coding\Solved.bmp");
            Pen pen = new Pen(Color.Black);//Create a black pen

            paper.DrawRectangle(pen, 10, 10, 100, 50);
            paper.DrawRectangle(pen, 10, 75, 100, 100);
            paper.DrawEllipse(pen, 10, 75, 100, 100);
            paper.DrawImage(pic, 130, 10, 300, 300);
            paper.DrawEllipse(pen, 10, 10, 50, 50);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Graphics paper;
            paper = pictureBox1.CreateGraphics();
            SolidBrush myBrush = new SolidBrush(Color.Black);
            paper.FillRectangle(myBrush, 10, 10, 90, 90);
        }

    }
}