Recent

Author Topic: lazarus pascalscada QP0 set reset how do?  (Read 2445 times)

sadikacar60

  • Guest
lazarus pascalscada QP0 set reset how do?
« on: February 23, 2019, 12:28:27 pm »
FRIENDS
There is a sample implementation in the video.
Can you do the same with pascalscada.
I couldn't...

thanks.

https://youtu.be/sSDeCp9MgSI

af0815

  • Hero Member
  • *****
  • Posts: 1289
Re: lazarus pascalscada QP0 set reset how do?
« Reply #1 on: February 23, 2019, 04:52:15 pm »
What is your Problem ? I couldn't ... is no question. It is a Statement. I can do it, is my statement.  O:-)
). Yes Modbus client connection is possible.
Have you looked in the examples of pascalscada ?!

« Last Edit: February 23, 2019, 04:54:30 pm by af0815 »
regards
Andreas

sadikacar60

  • Guest
Re: lazarus pascalscada QP0 set reset how do?
« Reply #2 on: February 23, 2019, 05:50:49 pm »


an example of set-reset
I couldnt find it.

sorry.


Code: Pascal  [Select][+][-]
  1. procedure TForm1.QP0_setClick(Sender: TObject);
  2. begin
  3.   TCP_UDPPort1.Host:='192.168.1.91';
  4.   TCP_UDPPort1.Port:=502;
  5.   TCP_UDPPort1.PortType:='ptTCP';
  6.   TCP_UDPPort1.WriteSingleCoin=1; //how should this line be
  7.   TCP_UDPPort1.Active:=True;
  8. end;  

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: lazarus pascalscada QP0 set reset how do?
« Reply #3 on: February 23, 2019, 06:38:08 pm »
You mention PascalSCADA, but your video is about DelphiModbus package for Lazarus. Do you know the difference?

PascalSCADA supports MODBUS out of the box. Whole PascalSCADA can be installed with Online Package Manager which you must first install as a package from Lazarus.
http://www.pascalscada.com/

DelphiModbus package seams to be made for CodeTyphon (fork of Lazarus), since I see from your video that it is missing pl_indycomp package. In first place I do not get it how could it show in your video as compiled when requested package is missing, but never mind that, you can fix it by opening delphimodbuslazarus.lpk and removing pl_indycomp package requirement, and creating a new requirement for indylaz package (Indy 10) which you must first download with Online Package Manager.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

af0815

  • Hero Member
  • *****
  • Posts: 1289
Re: lazarus pascalscada QP0 set reset how do?
« Reply #4 on: February 23, 2019, 10:44:04 pm »
You have only configuered the connection, no protocol and no Tag.

Pascalscada uses a connetion, a protocol and Tags. You can define all with the OI. And on the Tag you can connect a HMI component, so all can configurated and running nearly without a linie of code.
The example laz_modbus_tcp shows you, what you want. Look on sourceforge and get the example.
regards
Andreas

sadikacar60

  • Guest
Re: lazarus pascalscada QP0 set reset how do?
« Reply #5 on: February 24, 2019, 08:57:01 am »
i solved some

I managed to set-reset the QP0 bit

after
I placed PLCTagNumber2 into the form.
but again sets the QP0 bit
I want to set the QP1 bit
I did MemAdress 1 from PLCTagNumber2
but QP6 worked
how do we do bit selection

thanks.

Note: WM0=QP0     WM1=QP1   WM2=QP2


https://www.youtube.com/watch?v=S7a7_d_2XDA&feature=youtu.be
« Last Edit: February 25, 2019, 09:03:01 am by sadikacar60 »

 

TinyPortal © 2005-2018