Day 31: Codes of Life


Week number SEVEN! Here we go! Hey, wake up! Its 6.30am! Go and iron your clothes NOW! That tiny voice inside my head won't stop bothering me until I get off that bed! Half awaken, went to the cupboard and took a set of attire and went to the ironing board. Sometimes life feels like a big computer program. The 5 senses act like an input device while the hands and legs outputs the preprogrammed tasks. The brain is obviously the central processing unit. Can somebody come and program my brain to be like Mr. Einstein?

Alright, enough with the nonsense. Today has got nothing to do with inverters, AGAIN! No fieldwork today, just another day in the office. But tomorrow I will definitely go out, according to Mr. James. In the morning I did some filing work, then Mr. James gave me a set of gadgets consists of a switching PSU, weird-looking rotary encoder and its best friend, the counter. Whenever you see a rotary encoder, there's definitely a counter connected to it. Supposedly, when the rotary encoder rotates one unit, the counter will count one unit and resets when it reaches a certain preset value. I may have discussed this on the early days of my blog post. The setup is shown below:



What a funny looking encoder! At first glimpse one may think this is the code-manipulator-thingy of a safe! In fact, it looks just like one! But beware, your eyes can fool you! Ok back to the story. The reason why the switching PSU is needed is because the encoder can only accept 5VDC as input unlike its best friend which can consume the household 230VAC like a hungry beast! In short, when everything is connected properly, the counter will reset when the encoder completes one revolution. 

After lunch Mr. James asked me to play around with the Panasonic PLC. He asked me to program the PLC to control some input device and outputs to a relay. Before he went out, he asked me to connect the photoelectric switch and the relay to the PLC. With the help and guidance of Mr. James I managed to connect them and start work on the programming. The setup is shown below:



Initially I only used a single switch and relay to simplify my program and to start learning slowly. Mr. James went out at 2.30pm so I have until 5.30pm to experiment with the ladder diagram and the PLC. Again I would like to stress out that PLC programming is totally different than PIC18 programming. There's no "code" for a specific task, only "symbols" that can be either ON of OFF. Not to mention the limited types of symbols a ladder diagram can have (sometimes less than 10 symbols) unlike the 77 instructions of a PIC18. For beginners, its tougher than the MicroP subject! But I slowly learn and managed to do a simple input-output program that works.

Went back at 5.25pm today. Traffic was amazing! The journey back took a record-breaking 35 minutes! Normally the drive back took about 50 to 75 minutes. Maybe because coincidentally most of the traffic lights are green along Persiaran Kewajipan. If only life is that easy.. 

No comments:

Post a Comment

Newer Post Older Post Home

About Me

My photo
Born in Klang during the Year-of-the-Dragon on the month of Scorpio. Currently 171cm tall, quite skinny with the face of a 17 year old. Perfect Melancholy Personality trait. Timid, loner, hardworking, dedicated to a job and full of ideas. Loves to feed stray cats and often nicknamed "kucing" by friends.

Followers