Friday, October 24, 2014
Friday, October 17, 2014
OPC server not functioning? Turn on PUT/GET
I am currently working on a SCADA project consisting of a number of sensors, computers and Siemens PLC's interconnected with regular ethernet in a managed LAN.
Every PLC has some IO connected, some of witch are sensors that we also want to monitor outside of the PLC. The key element to this is the OPC server SIMATIC NET. This server talks to the PLC's, and makes the different tags available to other pc's.
This makes the OPC server really critical for the function of the other parts of the system.
I literally just spent days trying to get this up and running. Every option was set correctly, except this hidden "enable communication" setting on the PLC:
Every PLC has some IO connected, some of witch are sensors that we also want to monitor outside of the PLC. The key element to this is the OPC server SIMATIC NET. This server talks to the PLC's, and makes the different tags available to other pc's.
This makes the OPC server really critical for the function of the other parts of the system.
I literally just spent days trying to get this up and running. Every option was set correctly, except this hidden "enable communication" setting on the PLC:
Monday, August 18, 2014
Removing severely rusty brake discs
Well, im not big on buying new and expensive cars, loaning money for buying a used car is a form of russian roulette that i don't play. This leads me to always be driving around in throwaway style whip's trying to squeze the most milage out before they can no longer pass the road safety test.
Anyways, my brake system looked like this:
Now im no mechanic, but ey, how hard can it be?
Most stuff about replacing brake parts was found on youtube, but i ran into some trouble when trying to replace the brake discs. 10 years of rust made it impossible to remove the old ones. Luckily the discs are made to be removed by design.
There are two extra holes in the discs. Simply screw any 8mm bolt in there, it will jack the disc straight off! Didn't even have to use a sledgehammer...
New discs, no problems
Anyways, my brake system looked like this:
Now im no mechanic, but ey, how hard can it be?
Most stuff about replacing brake parts was found on youtube, but i ran into some trouble when trying to replace the brake discs. 10 years of rust made it impossible to remove the old ones. Luckily the discs are made to be removed by design.
There are two extra holes in the discs. Simply screw any 8mm bolt in there, it will jack the disc straight off! Didn't even have to use a sledgehammer...
New discs, no problems
Sunday, July 13, 2014
Diskpart fixes broken USB thumb drives
Ever used a thumbdrive for some funky stuff, like shipping a PS2 bootloader or a linux distro and afterwards your drive reports to only being a fraction of it's original size?
A simple format will often fix that, but this time i wasn't so lucky. Even in computer management it was impossible to format the unallocated space.
But there is another tool in the shed, and it's called diskpart.
Simply type diskpart in CMD to start it.
Then follow the procedure below to clean the master boot record on your device and replace it with a fresh new one.
Be aware that choosing the wrong disk in this dialog will ruin your day.
But once that is done you can go format the thumb drive like usual, and it's now back to it's full potential again.
A simple format will often fix that, but this time i wasn't so lucky. Even in computer management it was impossible to format the unallocated space.
But there is another tool in the shed, and it's called diskpart.
Simply type diskpart in CMD to start it.
Then follow the procedure below to clean the master boot record on your device and replace it with a fresh new one.
Be aware that choosing the wrong disk in this dialog will ruin your day.
But once that is done you can go format the thumb drive like usual, and it's now back to it's full potential again.
Such space... wow!
Saturday, July 12, 2014
Single file .exe installer for Get Money Game
Having finished a project is always nice, but when trying to share your work you might find that a few things could be done better. For example it's not very convenient for other people to download shared folders.
And expecting the end user to keep track of the dependencies for you project is something only a Linux developer would consider sane.
This is the reason that the absolute majority of widely adopted software is being distributed as single file installers. Whether it's an self extracting archive, .msi or .exe doesn't matter much, as long as it follows the routine of: 'double click' ---> next ---> next ---> next ---> finish
And so i made my own custom installer for the game i made:
The project is on GitHub (Get Money Game installer)
And the installer can be downloaded directly
Now, this is a bit more work than using Install Shield or the OneClick installer, but it feels damn good to avoid the bloat and junk that comes with Install Shield. Currently the installer just installs, no uninstall is available, but the files are dropped to desktop and you just delete them if you want.
This shows an example on how an embedded resource can be retrieved and used.
And expecting the end user to keep track of the dependencies for you project is something only a Linux developer would consider sane.
This is the reason that the absolute majority of widely adopted software is being distributed as single file installers. Whether it's an self extracting archive, .msi or .exe doesn't matter much, as long as it follows the routine of: 'double click' ---> next ---> next ---> next ---> finish
And so i made my own custom installer for the game i made:
The project is on GitHub (Get Money Game installer)
And the installer can be downloaded directly
Now, this is a bit more work than using Install Shield or the OneClick installer, but it feels damn good to avoid the bloat and junk that comes with Install Shield. Currently the installer just installs, no uninstall is available, but the files are dropped to desktop and you just delete them if you want.
This shows an example on how an embedded resource can be retrieved and used.
Sunday, June 29, 2014
I finally made a 3D game!
It's called Get Money Game
This is the very first 3D game project i have finished. And im rather pleased about the result. I do admit it might not be the most groundbreaking entry in its genre. This is not GTA V for pc, but it's a smooth running FPS with every thing one would expect from a low budget, single dev game.
It includes sound effects, a menu system, background music and a score counter. Also custom textures and instructions.
The description reads as following:
You run around in a randomly generated maze and chase a cube of money.
Every time you find the cube you get stacks added to your score, then
the cube respawns somewhere else in the maze and the game continues.
After two minutes the round is up and you are presented with your
total score so you can take screenshots and brag about it to your friends.
This is one of the cash-cubes you are looking for
All the images are in-game screenshots.
The project is available for download at Github:
https://github.com/studiefredfredrik/GetMoneyGame
The game requires the XNA 4 framework to be installed:
http://www.microsoft.com/en-us/download/confirmation.aspx?id=27598
The installer in a .ZIP here (File -> Save As)
[very long link to a google drive with a .zip file]
Saturday, June 21, 2014
Dealing with complex numbers and equations on the TI84
The TI84 is a graphing calculator from Texas Instruments, and it's been doing a great job of offloading my brain while doing maths for the last few years. I know alot of people that have far fancier calculators, sporting color screens and built in Laplace conversion and Fourier transforms. But the TI84 have always gotten the job done and once you learn your way around the menus it's a really good piece of tech. And also the buttons on it are great.
However when i had my last electronics class i ran into abit of a problem when we started dealing with AC power and every question contained complex numbers. There are two issues:
-The TI84 does not support Matrixes with complex numbers
This almost got me buying a new calculator, but i decided to google for 3rd party apps before buying one. And lo and behold the amazing community around these TI devices came to the rescue:
Linear System Solver 4.0
Frankly this is even better than working with complex numbers in matrixes, as we can avoid setting up the matrixes entirely. Just plug in the equations and you're good to go.
-The TI84 does not fully support degrees when working with numbers on polar form
This issue had me fooled for hours. You see, the TI84 has a setting for working with radians or degrees. And when choosing degrees the calculator spits out answers in degrees. However when giving the input one is forced to always use radians.
Like in this image, what i wanted was to input a vector of length 5 at angle 90 degrees and the calculator gives back a vector of length 5 at 116.62 degrees.
This is actually stated in the manual, but was not particularly intuitive. The soulution is simply converting to radians in the expression ((degrees/360)*2pi).
However when i had my last electronics class i ran into abit of a problem when we started dealing with AC power and every question contained complex numbers. There are two issues:
-The TI84 does not support Matrixes with complex numbers
This almost got me buying a new calculator, but i decided to google for 3rd party apps before buying one. And lo and behold the amazing community around these TI devices came to the rescue:
Linear System Solver 4.0
Frankly this is even better than working with complex numbers in matrixes, as we can avoid setting up the matrixes entirely. Just plug in the equations and you're good to go.
-The TI84 does not fully support degrees when working with numbers on polar form
This issue had me fooled for hours. You see, the TI84 has a setting for working with radians or degrees. And when choosing degrees the calculator spits out answers in degrees. However when giving the input one is forced to always use radians.
Like in this image, what i wanted was to input a vector of length 5 at angle 90 degrees and the calculator gives back a vector of length 5 at 116.62 degrees.
This is actually stated in the manual, but was not particularly intuitive. The soulution is simply converting to radians in the expression ((degrees/360)*2pi).
Subscribe to:
Posts (Atom)




