Recent

Author Topic: New component tab with graphic components like TArrow, TLed etc.  (Read 44528 times)

avra

  • Hero Member
  • *****
  • Posts: 1565
    • Additional info
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #15 on: May 17, 2013, 09:43:25 am »
The name "Industrial Stuff" is also from Zeljan. I don't know why it is Industrial but I don't know any better name either.
There is a specialized development software called SCADA (Supervision Control and Data Acquisition) which is used for visualization of plant production lines usually run by PLCs (Programmable Logic Controllers). All those virtual instruments, pipes, lines, arrows, animated conveyors, vessels and other represent HMI (Human Machine Interface) and have their origins in such software. Terms widely used are Industrial Automation and Process Control. I guess that's why the name "Industrial Stuff" was chosen. If it was me, I would probably call it a little different. Something like Industrial Automation Visualization (since it's only used for visualization of industrial automation). Or VIAC (Visual Industrial Automation Components). Or IPV (Industrial Process Visualization). Or PCV (Process Control Visualization). Or simply HMI. Or ... you name it.

Btw. anyone interested in SCADA should take a look at PascalSCADA (http://www.pascalscada.com) which is also included in Lazarus CT.
« Last Edit: May 17, 2013, 10:36:58 am by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3610
  • I like bugs.
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #16 on: May 17, 2013, 10:48:42 am »
There is a specialized development software called SCADA (Supervision Control and Data Acquisition) which is used for visualization of plant production lines usually run by PLCs (Programmable Logic Controllers). All those virtual instruments, pipes, lines, arrows, animated conveyors, vessels and other have their origins in such software. Terms widely used are Industrial Automation and Process Control. I guess that's why the name "Industrial Stuff" was chosen. If it was me, I would probably call it a little different. Something like Industrial Automation Visualization (since it's only used for visualization of industrial automation). Or VIAC (Visual Industrial Automation Components). Or IPV (Industrial Process Visualization). Or PCV (Process Control Visualization). Or ... you name it.

Thanks for the explanation.
I think "Industrial" is a good name for the tab. "Industrial Automation Visualization" is too long.
VIAC, IPV and PCV are short but most people don't know them and would have to look for the meaning somewhere.
Besides, Industrial is surely more descriptive than Misc or Additional.

Quote
Btw. anyone interested in SCADA should take a look at PascalSCADA (http://www.pascalscada.com) which is also included in Lazarus CT.

I downloaded it now from SVN repo and installed. It seems to have a different goal. It is controlling the actual processes and devices. I don't see any LEDs or other graphs there.

Our lib should be simple and graphics oriented. Zeljan suggested a new base class with common properties for all "Industrial" components.
Initially it would have AntiAliasingMode.
People could use this lib as a base for a SCADA solution or anything fancy.

Anyway, now we can shamelessly pull code from existing components and libs. This is the essence of GPL. The license and copyright notes must be preserved of course.
« Last Edit: May 17, 2013, 10:50:16 am by JuhaManninen »

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #17 on: May 17, 2013, 10:49:33 am »
@Avra: nice post. Other possible names: Industrial Visualization Components, Industrial Components.

Edit: @Juha, yes just Industrial makes sense as well. Agreed about the abbreviations.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Zoran

  • Hero Member
  • *****
  • Posts: 1421
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #18 on: May 17, 2013, 01:04:48 pm »
Anyway, now we can shamelessly pull code from existing components and libs. This is the essence of GPL. The license and copyright notes must be preserved of course.

I would not like to see default Lazarus distribution polluted by GPL-ed components. If their license cannot be turned into modified LGPL, let us better create them from scratch.

avra

  • Hero Member
  • *****
  • Posts: 1565
    • Additional info
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #19 on: May 17, 2013, 01:19:49 pm »
I think "Industrial" is a good name for the tab. "Industrial Automation Visualization" is too long.
VIAC, IPV and PCV are short but most people don't know them and would have to look for the meaning somewhere.
If single word is prefered, then people who are interested in such stuff would probably like to call that tab HMI (Human Machine Interface) since that is a well known acronym and everyone in the business knows what it means.

Quote
Btw. anyone interested in SCADA should take a look at PascalSCADA (http://www.pascalscada.com) which is also included in Lazarus CT.
I downloaded it now from SVN repo and installed. It seems to have a different goal. It is controlling the actual processes and devices. I don't see any LEDs or other graphs there.
Huh, sorry for providing a confusion. I didn't mean to mention it as a source of visual components. It can link to visual components but it self it only provides a few standard components which are not ones you are looking for. I have mentioned it only as a reference for people looking for creating SCADA applications with Lazarus.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 753
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #20 on: May 17, 2013, 01:53:09 pm »
i have made an experimental package named Industrial :-X with  7 components :
TindAdvLed, TindLed, TAnalogSensor, TgrArrow, TStopLightSensor, TLEDNumber.

Project with only a Form Win7 Lazarus 32  compiled no debug optimized 2 smart link : 
initial executable size :  1606 Kb

Same project with the seven components ( one by type) :  1665 kb

it seems that the components are not too big .

attachment pictures :  Industrial Tab    and example

Friendly,  J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

zeljko

  • Hero Member
  • *****
  • Posts: 1050
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #21 on: May 17, 2013, 02:12:45 pm »
hello, Juha

in the attachment picture, tell me what the components you would want to be included in the industrial stuff. For the moment the components TStopLightSensor and TAnalogSensor are not sure.
For the pipe --> are they thick  poly lines ?

Friendly, J.P

Cindy components looks good. Are they open source ?


Jurassic Pork

  • Hero Member
  • *****
  • Posts: 753
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #22 on: May 17, 2013, 02:28:55 pm »
only the Leds components come from Cindy package 

The license for Cindy package is :

Quote
    * ***** BEGIN LICENSE BLOCK *****
    *
    * Version: MPL 1.1
    *
    * The contents of this file are subject to the Mozilla Public License Version
    * 1.1 (the "License"); you may not use this file except in compliance with the
    * License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
    *
    * Software distributed under the License is distributed on an "AS IS" basis,
    * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
    * the specific language governing rights and limitations under the License.
    *
    * The Initial Developer of the Original Code is Mauricio
    * (https://sourceforge.net/projects/tcycomponents/).
    *
    * Alternatively, the contents of this file may be used under the terms of
    * either the GNU General Public License Version 2 or later (the "GPL"), or the
    * GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which
    * case the provisions of the GPL or the LGPL are applicable instead of those
    * above. If you wish to allow use of your version of this file only under the
    * terms of either the GPL or the LGPL, and not to allow others to use your
    * version of this file under the terms of the MPL, indicate your decision by
    * deleting the provisions above and replace them with the notice and other
    * provisions required by the LGPL or the GPL. If you do not delete the
    * provisions above, a recipient may use your version of this file under the
    * terms of any one of the MPL, the GPL or the LGPL.
    *
    * ***** END LICENSE BLOCK *****}
   
{**********************************************************************
 Package pl_Cindy.pkg
 for CodeTyphon Studio (http://www.pilotlogic.com/)
***********************************************************************}
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3610
  • I like bugs.
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #23 on: May 17, 2013, 03:48:39 pm »
I would not like to see default Lazarus distribution polluted by GPL-ed components. If their license cannot be turned into modified LGPL, let us better create them from scratch.

Yes sorry, I meant LGPL, not GPL.

@avra:
HMI (Human Machine Interface) can also mean the technical assistance for disabled people which is an interesting topic with brain implants and everything. ( www.youtube.com/watch?feature=player_embedded&v=ogBX18maUiM )
The acronym is quite loaded already: http://en.wikipedia.org/wiki/HMI

> Huh, sorry for providing a confusion.
No confusion. I just wanted to see what the library does.


@Jurassic Pork:
Please use a new TIndustrialBase class, see r41234 and r41235.
Remove TgrArrow as it is already in LCL with name TArrow.

CodeTyphon once copied the Cindy components. Now we copy from them. I always said copy-pasting is the highest level of programming. :)
« Last Edit: May 17, 2013, 04:17:59 pm by JuhaManninen »

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 753
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #24 on: May 17, 2013, 04:39:49 pm »
I prefer to stop now the development of this package because i am not a professionnal programmer  :-[   
i give you the sources of my experimental package with the example int the file attachment. Take what you need . And if you have questions about the sources, post a message in the forum  :)


Friendly J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3610
  • I like bugs.
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #25 on: May 18, 2013, 01:10:46 am »
I prefer to stop now the development of this package because i am not a professionnal programmer  :-[   
i give you the sources of my experimental package with the example int the file attachment. Take what you need . And if you have questions about the sources, post a message in the forum  :)

Thanks!
I have applied it to components/IndustrialStuff.
I went through the code, removed some compiler warnings and wrong project settings in the example and ... everything seems to work.
Only the TindAdvLed feels unintuitive to use. By default it does not show anything. Green and red images could be loaded by default if they exist.

Patches and more components are welcome, but nothing very big please. I already got a question about why this lib is not developed in CCR. This must be kept simple and light.

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 753
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #26 on: May 18, 2013, 04:42:46 am »
For the TindAdvLed in the example, i have forgotten to load a picture for the OFF and DISABLE State and also forgotten to put the property autosize to true ( better look).
In brief  : 
Tpicture for DISABLE state : CMP_Button_disa.png in the ButtonSamples folder
Tpicture for OFF state : CMP_Button_off.png
Tpicture for ON state : CMP_Button_on.png

May be it would be interesting to load by default these pictures (put in a lrs)  in the component.
Don't forget that in this component you could not change the color with a property. You must change the picture to change the color. Another way should be to add a color property and to do in the bitmap what is done for example in Lazpaint/Colors/shift Colors   modify the hue (test this with the CM_Button_on.png picture).

Friendly, J.P 
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3610
  • I like bugs.
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #27 on: May 18, 2013, 10:48:38 am »
I removed all unused code that was copied with the Cindy lib files. It looked a little bloated.
I also replaced {$MODE Delphi} with {$mode objfpc}{$H+}.
It already revealed one error in 64-bit compilation in unit cyBaseLed which was easy to fix:
-    Msg.LParam := Longint(Self);
+    Msg.LParam := PtrInt(Self);

CodeTyphon should use {$mode objfpc} as well. The same bug is still in their code.

Some Lazarus developers think this package should be in Lazarus-CCR.
Let's see what will happen. I personally like it this way. For example LEDs are often useful in a GUI but I am lazy to download and install external libs for it.

Patches are welcome for TindAdvLed and for other comps. I move to other tasks now...

Juha
« Last Edit: May 18, 2013, 11:39:35 am by JuhaManninen »

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 753
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #28 on: May 22, 2013, 10:03:36 am »
New component in progress for Industrial package   TAdvLed

Replacement of component indAdvLed :

created from TComled of ComPort Library ver. 3.00  written by Dejan Crnila
( license : public domain)
Features :
Inherited from the TCustomImage Class
Three states : disabled, off, on
Four natives Kinds : red, green, yellow,  bulk.
A custom Kind : to use external pictures.
Blink mode with adjustable duration.

Tested on Windows 7 Lazarus 32 bits  1.1   
          Ubuntu 12.04 CodeTyphon 4.20 (Lazarus 64 bits 1.1)

Friendly, J.P
« Last Edit: May 22, 2013, 10:05:30 am by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: New component tab with graphic components like TArrow, TLed etc.
« Reply #29 on: May 22, 2013, 06:49:19 pm »
Nice! Congratulation!
Best regards