Visual Basic 6 - Miscellaneous

Home

CNC BF16
CNC Router
CNC Links

3D DLP Printer
UM2+ Dual

Laser_Show
CO2_Laser

Engineering

Stirling

Arduino

VB.NET

VB6 - 3D
VB6 - Simulation
VB6 - Games
VB6 - Other
VB6 - Outsourcing

About

Valide CSS!
Finally I tried to connect Vb6 to the LPT. That should be nice, to control the world around the PC a bit more... :) For doing this, within XP you need an additional control (dynamic link library), like this one: inpout32.dll. For XP, you also need another program like: userport.exe.
If you BIOS settings are right, you are able to play around with the ltp port, sending bits [0 or 1] etc. Be aware of the low currents you could use. Official (IEEE1284) it's only 12 [mA] per pin. Voltages are: LOW 0 to 0.8 [V] and HIGH 2.4 to 5 [V]. Well I'm not an electronics guy, but you need some other hardware, to connect to real life applications. So why not create an interface card myself... Well, I started this project, but didn't finish it. Some more Dutch information.

For creating my own (2D) FEA program, I need to calculate the inverse of the stiffness matrix. Because there is no standard matrix calculation module available in VB, I'll need to create one myself. This simple program is able to:
  • Simple adding, subtracting & multiply
  • Gauss-Jordan elimination
  • Inverse Matrix
  • Calculating the Determinant
  • Next step is to calculate the Eigen Value..

Because of a question in a Dutch VB-club, I build some graphical counters. This because the code is really simple and the pictures I'm using, just copied of someone who wants to make money out of such simplistic things!
Well here you see only two options: graphical counters and an graph. The counters are made of picture boxes, the graph is using the API-call (BitBlt), for moving the graph to the right.
Also build a little random button as example option. The top counters are running randomly, the speed indicator (red) is moving to a random 'set value' (green). The graph shows the set value, current speed and the acceleration. That's all for now.

Original idea behind this project, was to create a PLU interpreter, like a PLU system does. (Just simple commands like IF X0=1 THEN Y0=1 etc)
These kind of systems are widely used for controlling machines, like packagers. Just the PLC system on it's own is no fun, so that's why a real world situation is simulated: cross over.
  • When the train arrives at the switch X1:
  • -Flash the signal light (Y1)
  • -Activate the motor (Y3), till the beam activates the switch (X3)
  • When the train passes the X4 switch:
  • -Stop flashing the signal light
  • -Activate the motor (Y2), till the beam is in upper position (switch X2).

As you can see, the PLU code is very basic and simple to understand.

if,x1
set,m0
if,m0
and,y1^
set,m1
if,m1^
set,y1^
if,m1
set,y1
set,m1^
if,m0
and,x3^
set,y3
set,x2^
if,x3
set,y3^
if,x4
and,x3
set,x3^
set,y2
set,m0^
if,x2
set,y2^

For a study project, we needed to optimize a frame for lifting tiles. We were working with Ansys 5.4 and need to use an input file. Because this was a lot of work, to update the input hand manually, I created this small program. Now it's more easy to change some of the parameters and generate a new input file.
The program could easily change: the number of rods, maximum weight and cross section properties. In Ansys you only need to 3 mouse clicks (File-Import Text file-Ok) and the results are shown on the screen. :)

After doubting for a while, I finally bought a K8000. It's a simple USB port expander, which is able to connect to Visual Basic. Regrettably the speed is very low. A maximum of 1000 [Hz] could be reached. In the end, I used the board only once.
They other idea behind this, was to be able to make some kind of miling machine. But for this, you need 10 [kHz] at least.