Monday 26 August 2019

Altium, Project properties and PCBs

Using Project (Altium 16.1) properties are use full to handle information that you want to change in one place but display and use every where like the Name,Revision, Date, Author and so forth.

The problem is that when you go to manufacture you have to generate Gerber for the special strings to get evaluated correctly.  Just sending the .pcb file will not contain this information.

I have however found that it is possible to embed this information into the PCB through the use of components Designator and Comment string.

Noting that "" are required for it to evaluate correctly when Updating the PCB from the Schematic

Hence the information in the project is ported into the PCB as an actual string and does not need to be evaluated.

Now the PCB can be used with out needing to generate gerbers.
This is useful if the people you work with just use the PCB file and are not going to change.

Wednesday 11 October 2017

Altium

I am laying out a Board today (or this week).

Using Altium  Designer 13.2 (which is old now but company does not prioritize these kind of tools which is the way it is).

However I have some issues with the "interactive routing" just manual routing but we like the fancy names.

1.   I have a 0.75 gap a 0.25 clearance and 0.25 mm trace and it will not allow the track to rout through noting the grid is 0.125 and aligns perfectly.  However it I drag or drop a trace in there it is fine.  This is basically a bug but I am not using the latest soft ware so I guess I will just have to live with it.

2.  When placing traces over traces with violation it keeps the trace with violations instead of ripping them up.  This has always been a problem and from my point of view it makes absolutely no sense.  Considering the state of machine learning these days I would be very concerned if the latest Altium till dose this.  Which It probably dose because i have not heard about any application of machine learning in the interactive routing.


Using Altium Designer 16.1
3.   Has a bug with the Output Job system were if you copy and paste a output or container all to a different project all the links are embedding into the file when they are suppose to be dependent on the project and the files get corrupted with the wrong links.
Same happens if you copy a job file into a new project.
Kind of makes a mockery of the point of the job file if you need to define them from scratch every time exactly the same.

4.    Interactive routing is brain dead still as stated in 2.
Here we live in the age of neural networks and some tools are just stupid.

Wednesday 18 January 2017

Tektronix TDS2024 Loging

I have Created a script for logging the measurements.

Note:
I did look at this code https://forum.tek.com/viewtopic.php?t=136170
Which is interesting but does not work with the current version of Python PyVISA lib.
Noting that this code works with version 1.8.
It also has no licence so technically it is copyrighted.  I have included the MIT licence.
With the code.  However this instrument is old so I do not know it it will be of any use to anyone.
on a side note I think VISA is a bad abbreviation for a standard as is the easily confused with the other uses of this name.


 # -*- coding: utf-8 -*-  
 """  
 Created on Tue Jan 17 14:42:26 2017  
   
 @author: craig.wroth  
   
 This Script will produce a Log File of Measurements from a Tektronix
2024B Oscilloscope. This is not the wave forms but the measurements of the 
Oscilloscope that have been set up using the Measure Button.
There is 5 available. The purpose of this is to allow for a very long time to
be monitored ie hours to days. 

See Following for More information
TDS 200-Series Digital Oscilloscope Programmer Manual
   
 Copyright (c) 2016 
 
 Permission is hereby granted, free of charge, to any person obtaining a copy  
 of this software and associated documentation files (the "Software"), to deal  
 in the Software without restriction, including without limitation the rights  
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell  
 copies of the Software, and to permit persons to whom the Software is  
 furnished to do so, subject to the following conditions:  
   
 The above copyright notice and this permission notice shall be included in all  
 copies or substantial portions of the Software.  
   
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR  
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,  
 FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE  
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER  
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,  
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE  
 SOFTWARE.  
 """  
   
 import visa  
 import time  
 import os  
   
 rm = visa.ResourceManager()  
 alist = rm.list_resources()  
 print alist # Normaly (u'ASRL1::INSTR', u'ASRL3::INSTR', u'USB::0x0699::0x036A::C102692::INSTR')  
 #Note Our instrument is No3 Hence position 2 in list  
 inst = rm.open_resource(alist[2])  
 NewFile = time.strftime("%a%d%b%Y")+".csv"  
 Rev = 0  
 #Code to Increment File Rev on day  
 while os.path.exists(NewFile) == True:  
   NewFile = time.strftime("%a%d%b%Y")+"rev"+str(Rev)+".csv"  
   Rev = Rev+1  
     
 WF = open(NewFile,'w') #WF -> Working File  
 WF.write("Log File started ")  
 WF.write(time.asctime( time.localtime(time.time()) ))  
 WF.write("\n")  
 WF.close()  
   
 Stime = time.time() #Start Time  
 Duration = 0.1  #Time of test in mins  
 EndTime = Stime + Duration*60  
 SampleTime = 2 # Time between samples in sec note less that 1 not practical  
   
 WF = open(NewFile,'a')  
 WF.write("Time,Measure1,Measure2,Measure3,Measure4,Measure5\n")  
 inst.write(":header off")  
 WF.write("Measure Description,")  
 astring = inst.query("MEASUrement:MEAS1?")  
 print astring   
 WF.write(astring[:len(astring)-1] +",")  
 astring = inst.query("MEASUrement:MEAS2?")  
 print astring   
 WF.write(astring[:len(astring)-1] +",")  
 astring = inst.query("MEASUrement:MEAS3?")  
 print astring   
 WF.write(astring[:len(astring)-1] +",")  
 astring = inst.query("MEASUrement:MEAS4?")  
 print astring   
 WF.write(astring[:len(astring)-1] +",")  
 astring = inst.query("MEASUrement:MEAS5?")  
 print astring   
 WF.write(astring[:len(astring)-1] +",")  
 WF.write("\n")  
   
 inst.write(":header on")  
 while time.time() < EndTime :  
   WF.write(time.strftime("%X")+",")  
   atime = time.time()    
   print (time.strftime("%X"))  
   #print (atime)  
   atime = atime%1 #obtain fractions of seconds  
   #print (atime)  
   astring = inst.query("MEASUrement:MEAS1:VALue?")  
   astring = astring[len("MEASUrement:MEAS1:VALue?"):len(astring)-1] #Befor I discovered inst.write(":header off")  
   WF.write(astring +",")  
   astring = inst.query("MEASUrement:MEAS2:VALue?")  
   astring = astring[len("MEASUrement:MEAS2:VALue?"):len(astring)-1]  
   WF.write(astring +",")  
   astring = inst.query("MEASUrement:MEAS3:VALue?")  
   astring = astring[len("MEASUrement:MEAS3:VALue?"):len(astring)-1]  
   WF.write(astring +",")  
   astring = inst.query("MEASUrement:MEAS4:VALue?")  
   astring = astring[len("MEASUrement:MEAS4:VALue?"):len(astring)-1]  
   WF.write(astring +",")  
   astring = inst.query("MEASUrement:MEAS5:VALue?")  
   astring = astring[len("MEASUrement:MEAS5:VALue?"):len(astring)-1]  
   WF.write(astring +",")  
   WF.write("\n")  
   time.sleep((1-atime)+(SampleTime-1))  
   
   
   
   
 print ("The New File is "+NewFile)   
 print (time.asctime( time.localtime(time.time()) ))  
   
   
   
 WF.close()  
   
 inst.close()  
   

Monday 9 January 2017

Open Source

Have been looking at Open Source.
Hoping to find something to put some time into as well as get a good picture of what is available to help with my own endeavors.

Open-Source-Software-Top-59-Sites
Useful list of sites

https://www.openhub.net/
Useful search engine for open source

nodebox
Is this Cool or what!

box2d
Another 2D enviroment.

magictools

torque-2d
interesting 2D engine

godot

artist tools and tutorials

https://godotengine.org/
Been seeing good things about this


http://atomicgameengine.com/
This one is interesting and has MIT licenses


OpenRTS
This is a  Open 3D game engine for RTS
Not much action in past 2 years dead ??
Related Project
alchemist

OpenRA
Active Project.  In C# used to redo some clasics such as CC Red Alert and Dune 2000
Has bounties for coding so that is cool.

stratagus
Stratagus - A free fantasy real time strategy game engine
See artical http://www.linuxdevcenter.com/pub/a/linux/2004/07/15/stratagus.html
Move onto Bos-Wars Engine
MegaGlest


lordadamson/strategy_game
Interesting game in Godot



https://indiegamestand.com/
Like steam ??
Redeemable steam keys


Forums Of Interest

http://forum.freegamedev.net/


Blogs

http://freegamer.blogspot.com.au/


Interesting open Games
http://opendungeons.github.io/


freeorion



Space Station 13

Dwarf Fortress

annex conquer the world

https://play0ad.com/

Tuesday 25 October 2016

AI Test Enviroment

So I have been looking a environments to test and develop Artificial Intelligent.


http://www.palais.io/
This one is a 3D based environment that has a high degree of polish.
Uses JavaScript and is Extensible with plugins.

https://gym.openai.com/
This one looks a simpler 2D environments but has some good ideas about building and sharing environments for the test of the AI.

Noting that they have an environment based on Box2D which I plan to have a closer look at.

It also Uses Python (which I like).

Others have used various games to test ideas
Such As:

https://springrts.com/

Starcraft
https://wiki.csc.calpoly.edu/490S10-StarCraft/wiki/spr

More Starcraft
API for Starcraft
https://deepmind.com/blog/deepmind-and-blizzard-release-starcraft-ii-ai-research-environment/