PureBasicFramwork

Developed or developing a new product in PureBasic? Tell the world about it.
SMaag
Enthusiast
Enthusiast
Posts: 324
Joined: Sat Jan 14, 2023 6:55 pm
Location: Bavaria/Germany

PureBasicFramwork

Post by SMaag »

Since a while I'm developing a kind of FrameWork for PureBasic. All code is OpenSource and free to use. But until now it's in a brainstorming and developing state.
The goal is to have a reliable base for industrial software development, because in my opinion PureBasic would be a great Tool for industrial Software.
First I tried the BlackBox Component Pascal Framework for industrial software. This is a very great tool under the hood, and the code is nearly identical to the PLC-Programming Code "STL" which can be used to program the most PLC types. But the developemnt of ComponentPascal nearly stopped. PureBasic has this reduced complexity that Nikolaus Wirth demanded for future programming languages. I had a look to Lazarus FreePascal, what is a great Tool and nearly compatible with Delphi. But for the most PLC programmers the full Pascal System is to complex. Visual Studio with the Gigabytes of installation is not the way if you want to install the develpment enviroment on the machines PC.
PureBasic would be one of the best alternatives because of the very good license conditions and a not expensive license. So if necessary it should be no problem to buy a license for each machine PC.

But it will be a long road to realize everything! At the moment this is mostly a winter work for me!

If anyone is out there who want to be part of the development! You are welcome!
There is a lot of work to do.
- writing testcode and search for bugs
- having ideas
- doing optimations

If you want to help there are some works to do (here some examples what I have in mind):
- writing a automatic documenter/helpfile for the functions: I added NAME: DESC: VAR(): to each Procedure
so it can be extracted easy from the SourceCode. Here an expample for the structure I used

Code: Select all

  Procedure.i Calculate_MinMax(*STLobj.TSolid)
  ; ============================================================================
  ; NAME: Calculate_MinMax 
  ; DESC: Calculates Min and Max Coordinates of the STL-Object
  ; DESC: and save it in the STLobj \Min and \Max Vector
  ; VAR(*STLobj.TSolid): Pointer to STL-Solid-Object
  ; RET.i : #TRUE if done
  ; ============================================================================
- Programming a standard Framework Status Form which can be integrated in applications to
show in a TreeView all integrated Moduls an show the documentation for the Modul.

- Maybe programming a Standard Framework-Test-Application

here the link to the Github repository:
https://github.com/Maagic7/PureBasicFrameWork
User avatar
idle
Always Here
Always Here
Posts: 5888
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: PureBasicFramwork

Post by idle »

You've put a lot of work into it already by the looks of it. It's well laid out.
Fred
Administrator
Administrator
Posts: 18199
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PureBasicFramwork

Post by Fred »

That's indeed a lot of code here. What is PLC exactly ?
SMaag
Enthusiast
Enthusiast
Posts: 324
Joined: Sat Jan 14, 2023 6:55 pm
Location: Bavaria/Germany

Re: PureBasicFramwork

Post by SMaag »

That's indeed a lot of code here. What is PLC exactly ?
PLC folder will contain Code to access, for the first, Siemens S7300/400 1200/1500PLC's.
(Thats why I earn my money with that stuff)
I will use OpenSource Libraries Snap7 and libnodave to get access to the PLC's.
The goal is to progamm DataLoggers which are running on a Raspi to archive sensor values and production datas.

https://snap7.sourceforge.net/

https://libnodave.sourceforge.io/
https://sourceforge.net/projects/libnodave/

parallel I try to integrate a ModBus Library what is a relative easy protokoll and it is used by the Wago Controllers, Schneider Electric
and some other Hardware.
With that stuff it should be possible to use PureBasic (on Raspi) for SmartHome integration!
Last edited by SMaag on Sat Nov 04, 2023 12:27 pm, edited 3 times in total.
User avatar
idle
Always Here
Always Here
Posts: 5888
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: PureBasicFramwork

Post by idle »

SMaag wrote: Fri Nov 03, 2023 9:41 pm
That's indeed a lot of code here. What is PLC exactly ?
PLC folder will contain Code to access, for the first, Siemens S7300/400 1200/1500PLC's.
(Thats why I earn my money with that stuff)
I will use OpenSource Libraries Snap7 and libnodave to get access to the PLC's.
The goal is to progamm DataLoggers which are running on a Raspi to archive sensor values and production datas.
pigpiod is probably the most versatile lib for PI's
viewtopic.php?t=78440
it addresses the noise issues of PWM on the PI, allows GPIO pins for any purpose and also wraps I2C, SPI, and serial links.
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: PureBasicFramwork

Post by Kuron »

Fred wrote: Fri Nov 03, 2023 9:08 pm That's indeed a lot of code here. What is PLC exactly ?
Usually refers to Programmable Logic Controllers
Best wishes to the PB community. Thank you for the memories. ♥️
User avatar
mk-soft
Always Here
Always Here
Posts: 6242
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: PureBasicFramwork

Post by mk-soft »

For snap7 I have an extended include with various auxiliary functions.
See signature OneDrive ... OneDrive Industry

The FrameWork should also run on all OS.

The snap7 interface actually also runs on an Arm processor. Tested on my Raspberry ;)
The standard Modbus/TCP interface should also be implemented. Need to tidy up here and can provide the client and server Modbus/TCP interface.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
AZJIO
Addict
Addict
Posts: 2183
Joined: Sun May 14, 2017 1:48 am

Re: PureBasicFramwork

Post by AZJIO »

You simply have a collection of functions that are no worse or better, and not necessarily ideal for every task. You can see my selection here or here.
User avatar
Piero
Addict
Addict
Posts: 914
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: PureBasicFramwork

Post by Piero »

SMaag wrote: Fri Nov 03, 2023 6:14 pm
PLC-Programming Code

- having ideas
- doing optimations
Is that meant to `optimate´ stuxnet? :shock: :P
SMaag
Enthusiast
Enthusiast
Posts: 324
Joined: Sat Jan 14, 2023 6:55 pm
Location: Bavaria/Germany

Re: PureBasicFramwork

Post by SMaag »

AZIJO wrote
You simply have a collection of functions that are no worse or better, and not necessarily ideal for every task. You can see my selection here or here.
Tanks for the link. I didn't know this! And yes you are right, it is a collection of functions. Especally in the lowest level.

mk-soft wrote
For snap7 I have an extended include with various auxiliary functions.
See signature OneDrive ...
Tanks for that link! Especeally because it is OPC communikation. I will try to integrate this!

For ModBus I have a Brainstorming Code (Struture definition only!) ModBus is not that complicated. So it's possible to code it with the standard documentation. (not like 3D-STEP where it is not possible to understand the documentation)

But anyway if you have any working code that you can publish, I will try to integrate it. Code should be OpenSource!

Piero wrote
Is that meant to `optimate´ stuxnet?
Thank God I'm not good enough to program such things. So no one will ask me to do it! :wink:
Post Reply