programming PLCs with QBasic

Mani

Member
Join Date
Jun 2002
Posts
5
Hello all...
I want to try and program a PLC using QBasic. (Please do not ask why I do not want to use ladder logic. :) )
I am using OPEN "COM1: etc " FOR RANDOM AS #1 to initiate communication with PLC over COM1, and
to transmit: WRITE #1, "code for PLC"
to receive: INPUT$(1,#1) 'one character (byte)

however I am having some problems
1.its not working
2.its not working

Any suggestion?
-maybe easier program to do this?
-maybe other functions?

I appreciate all the ideas I can get.

Cheers

Mani
 
I'm not real sure what you mean by "want to program a PLC using Q-Basic". If you mean you have a PLC manufactured by someone else, it will probably never work.

1) The PLC uses a proprietary operating system, and PLC manufacturers keep the details VERY close to the vest.

2) The PLC is actually solving Boolean logic internally. The programming package has to convert the "user friendly" program into Boolean (analogous to assembly or machine language) and create a compiled or interpreter version before the program is downloaded.

3) When the program is downloaded you have to have a compatible communications protocol, and you have to know the right registers and commands and handshaking to make the PLC accept the program, save the program, and go back to run. PLC manufacturers are very coy about this info too!

There used to be a few companies (Greysoft, I-Com, Taylor) that reverse engineered programming software for Allen Bradley and other major brands. This was a huge effort, and every model change sent them back to the drawing board. It was only justified because their stuff was PC based, and PLC manufacturers were still pushing cassete downloaders and proprietary programming consoles. You will notice that nowadays, very few (if any) third party programming packages will actually let you download programs to the PLCs.
 

Similar Topics

I would like to learn PLC programming. There isn't really a specific reason. Automation and electronics thrill me I suppose. I have all kinds of...
Replies
14
Views
3,955
hello to all!!!! my HMI OP320-A display is in chinese which is already programmed,i contacted with the machine mnufactererer they...
Replies
0
Views
2,463
Good Evening, All, Let me first apologize for this becoming something of a rant. I have a sort of a style-related question running around in my...
Replies
18
Views
9,179
Hello, I am able to program Mitsubishi FX1N plc using GX-IEC developer with the following default COM params : 9600 bps,Even Parity,7 data bits...
Replies
2
Views
2,975
Hi How are you all doing. Im very confused about a program that im trying to migrate from an old version plc to a new version (tsx p572623) im...
Replies
0
Views
3,032
Back
Top Bottom