Stop Light

bone said:
Seems easier than using a PLC ;)
Code:
Private Sub mnuLight_Click()
 
	ForeColor = vbBlack
	FillStyle = vbFSSolid
	FillColor = vbRed
	Circle (ScaleWidth / 4, ScaleHeight / 3.3), 400
 
	ForeColor = vbBlack
	FillStyle = vbFSSolid
	FillColor = vbYellow
	Circle (ScaleWidth / 4, ScaleHeight / 2.5), 400
 
	ForeColor = vbBlack
	FillStyle = vbFSSolid
	FillColor = vbGreen
	Circle (ScaleWidth / 4, ScaleHeight / 2), 400
 
End Sub
Firstly, this code graphically creates a Stop light.

Yes, that is not possible to do with a PLC. The purpose of the PLC is control... example: To make the lights turn on and off in an orderly manner.

Secondly, the above Visual Basic logic does NOT address the issues of controling the lights...

You are comparing apples and oranges...
 
Dan,

It wasn't me posting on the VB site. I know better than to ask for school projects! I've been out of school for 20 yrs, but my son enters high school this year. Personally, I hope he decides to pursue the programming field, be it PLC's or computer related. As of now, all he seems to want to do is sit back behind the 'puter and either 1 - save the world, or 2 - dominate the world. Give it 4 years, it'll be a real eye-opener!
 
Bone,
My son was the same. I made up a rule: for every hour of gaming he had to do 15 mins of programming - my choice of task and later language.

He is now the MIS at UTA.

Good luck,
Rod
 
Here is a Delphi unit that takes 32 digital inputs from a PLC and displays them as LEDs. The PLC input word is obtined from a Automated Solutions ASABTCP activeX control and transferred to this unit using a global variable.

I find Delphi a lot easier than VB for SCADA and HMI applications, particularly when using databases. A typical small HMI application can also collect data and store it in any sort of database.

the global variables are N22[31] and N22[32].

Sorry about the file not printing to PDF very well.
 
Last edited:
JohnW said:
The PLC input word is obtined from a Automated Solutions ASABTCP activeX control and transferred to this unit using a global variable.

Hi John, Is the ActiveX component and PLCCommsUnit units freely available?
 
No its not, The ActiveX is available from automated solutions for about $799 but any development you do is licence free. The PLCCommsUnit is written by me but I don't want to publish it.

You can download a demo from their website. It only runs from within Delphi etc. but it is good enough to try it out.
 
Libnodave supports also Win32 since some versions. The recent version 0.7 uses MSVC++ as the preferred compiler for the .DLL.
 

Similar Topics

Daft question coming up...what colour should the Run/STOP light be on a S7-1200 if it's working correctly? At the moment it's solid yellow. The...
Replies
15
Views
2,151
Happy Holidays Folks! I am working on a robot cell and as we are adding PLC control to the system, I have some questions about implementing an...
Replies
6
Views
4,756
Greetings everyone, I need help on this school lab. I’m using Push buttons for the sensors and I’m sure I need latching and unlatching functions...
Replies
10
Views
2,309
Each/all of the cars ahead of me is a first order plus dead time ( FOPDT ) system. Why is it that the first car always has the longest dead time...
Replies
23
Views
6,745
To start/stop energizing the heating elements there are used two buttons, each with a NO and NC contacts. The push buttons have LED lights (a max...
Replies
8
Views
3,477
Back
Top Bottom