I want to use pascalscada for siemens s7 1200 communication using TCP_UDPPort and ISOTCPDriver, the connection is established but I cannot read the value of DB32.DBD244, the PLCTagNumber property
memfile_db = 32
Memaddress = 244
memreadfunction = 3
plcrack = 0
plcslot = 1
plcstation = 1
I can not like the value
I tried to find an error in the source in the s7family.pas file in the function
TSiemensProtocolFamily.CreatePLC (iRack, iSlot, iStation: LongInt): LongInt;
FPLCs [Result] .DBs is not initialized
Does this mean that I will not be able to read DB32.DBD244?
sorry for my english
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for reply to late. This forum is unusable via smartphone.
I see that you have fixed the problem. Another point that requires attention, is to disable symbolic access to created DB's. Otherwise, it can't be read.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a paypal account. The e-mail is papelhigienico at gmail dot com
But if you have some hardware that you are not using anymore. such as Siemens, Rockwell or Phoenix Contact, they are welcome.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In services it should work fine. In console apps you should call
checksynchronize in your main program loop to allow the tags receive the
tag update messages from protocol driver.
Em Dom, 3 de fev de 2019 07:24, ambako <ambako@users.sourceforge.net
escreveu:
Sorry Fabio event AsyncValueChange never fired in windows service
I moved the code that runs the desktop application but event AsyncValueChange not fired
Is there an example of a service? Maybe I'm doing something wrong.
PS: If i drop timer an ontimer event call plctagnumber.read work
Last edit: ambako 2019-02-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Strange... This is the same implementation of LazDaemon. Another strange point is the AsyncValueChange don't work a desktop app. You really need the AsyncValueChange or you can use the OnValueChange event?
I'll verify this later. The AsyncValueChange is usefull when you do heavy tasks that will slow down the tag updater if this tasks are fired through OnValueChange.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I make a small GUI app and the AsyncValueChange works. At least one tag fires the AsyncValueChange of the tag
Maybe on the service project you have to define CONSOLEPASCALSCADA. To define that, open menu Project -> Project options. Add -dCONSOLEPASCALSCADA as showed in attached screenshot.
Improving the AsyncValueChange I discovered why it (and any other events) doesn't work on Daemons/Services, but works on Console apps:
The TThread.Queue queues a procedure to be executed in the main Thread. How your service is running over new thread (other than MainThread) the queued procedures are fired on the main thread, not in your Service thread.
I'll check for a solution for that, since that this support wasn't done by me, but by a contributor.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Gentlemen, sorry for picking up that old topic but it fit´s to my problem.
I´ve dowloaded "pascalscada-code-r1352-trunk-examples-laz_isotcp_demonstration" project and
I´m trying to establish an connection to S7-1212C but without success. I have a basic question. What connection does PascalScada use to communicate with the CPU. Is the PG connection used here or do I have to generate a connection partner in my project?
I am pretty sure that my PLC configuration is probably wrong.
I have checked the following things.
Symbolic addressing is disabled
CPU can be pinged.
DB1 with 10 double words should be ok.
What is unclear to me is whether I have entered slot number and PLC number correctly.
Do you have to enable an option on your PLC hardware settings called "Permit access with PUT/GET communication from remote partner". Together you have to disable "optmized block access" on each datablock that do you want access from PascalSCADA.
Hi Fabio,
thank you very much for your hints. I made a big step forward. I´m now able do connect to PLC, read Inputs, Outputs and Tags as well but still in trouble do get access to DB1. I´m working with TIA_PortalV13 and there is no Option in DataBlock Attributes accessabel via Webserver. So as a workaround i tried to add a read/writable Watchtable of DB1 in the Webserver Settings but that didn´t work out so far.
What i noticed is a illegal Memory Address error in the property grid of DataModule1.DB1. I can see when I start the application MemAddress 3 although I configured in TPLCBlock MemAddress 0 that´s weird.
Anyway i guess the solution is to get access to DB1 over Webserver but i don´t now how.
Hello Gentlemen
Help my
I want to use pascalscada for siemens s7 1200 communication using TCP_UDPPort and ISOTCPDriver, the connection is established but I cannot read the value of DB32.DBD244, the PLCTagNumber property
memfile_db = 32
Memaddress = 244
memreadfunction = 3
plcrack = 0
plcslot = 1
plcstation = 1
I can not like the value
I tried to find an error in the source in the s7family.pas file in the function
TSiemensProtocolFamily.CreatePLC (iRack, iSlot, iStation: LongInt): LongInt;
FPLCs [Result] .DBs is not initialized
Does this mean that I will not be able to read DB32.DBD244?
sorry for my english
Very sorry Gentleman
I figured it out
everything works great
Memreadfunction=4
Many Thanks Mister Fabio
Sorry for reply to late. This forum is unusable via smartphone.
I see that you have fixed the problem. Another point that requires attention, is to disable symbolic access to created DB's. Otherwise, it can't be read.
Hello Fabio
Yes i disable symbolic access
Works perfect
Big thanks for such work
How can I support you, donate? How can I
I have a paypal account. The e-mail is papelhigienico at gmail dot com
But if you have some hardware that you are not using anymore. such as Siemens, Rockwell or Phoenix Contact, they are welcome.
One question
I use plctagnumber in service but not working
No fire event AsyncValueChange
Last edit: ambako 2019-02-03
In services it should work fine. In console apps you should call
checksynchronize in your main program loop to allow the tags receive the
tag update messages from protocol driver.
Em Dom, 3 de fev de 2019 07:24, ambako <ambako@users.sourceforge.net
escreveu:
Sorry Fabio event AsyncValueChange never fired in windows service
I moved the code that runs the desktop application but event AsyncValueChange not fired
Is there an example of a service? Maybe I'm doing something wrong.
PS: If i drop timer an ontimer event call plctagnumber.read work
Last edit: ambako 2019-02-03
So, i using this code for create service https://www.gocher.me/Daemon
and work fine
SOLVED
Strange... This is the same implementation of LazDaemon. Another strange point is the AsyncValueChange don't work a desktop app. You really need the AsyncValueChange or you can use the OnValueChange event?
I'll verify this later. The AsyncValueChange is usefull when you do heavy tasks that will slow down the tag updater if this tasks are fired through OnValueChange.
Thanks you,
I have many tags
When you look, when you have time, let me know if it works
Hi ambako!
I make a small GUI app and the AsyncValueChange works. At least one tag fires the AsyncValueChange of the tag
Maybe on the service project you have to define CONSOLEPASCALSCADA. To define that, open menu Project -> Project options. Add -dCONSOLEPASCALSCADA as showed in attached screenshot.
Hi Fabio
In GUI application works fine
I will try your offer later and let you know
Many Thanks
Hi ambako!
Improving the AsyncValueChange I discovered why it (and any other events) doesn't work on Daemons/Services, but works on Console apps:
The TThread.Queue queues a procedure to be executed in the main Thread. How your service is running over new thread (other than MainThread) the queued procedures are fired on the main thread, not in your Service thread.
I'll check for a solution for that, since that this support wasn't done by me, but by a contributor.
Hello Fabio
I try -dCONSOLEPASCALSCADA not work
not fired events
Hi Gentlemen, sorry for picking up that old topic but it fit´s to my problem.
I´ve dowloaded "pascalscada-code-r1352-trunk-examples-laz_isotcp_demonstration" project and
I´m trying to establish an connection to S7-1212C but without success. I have a basic question. What connection does PascalScada use to communicate with the CPU. Is the PG connection used here or do I have to generate a connection partner in my project?
I am pretty sure that my PLC configuration is probably wrong.
I have checked the following things.
Symbolic addressing is disabled
CPU can be pinged.
DB1 with 10 double words should be ok.
What is unclear to me is whether I have entered slot number and PLC number correctly.
Any help is appriciated
Do you have to enable an option on your PLC hardware settings called "Permit access with PUT/GET communication from remote partner". Together you have to disable "optmized block access" on each datablock that do you want access from PascalSCADA.
Last edit: Fabio Luis Girardi 2023-08-30
Hi Fabio,
thank you very much for your hints. I made a big step forward. I´m now able do connect to PLC, read Inputs, Outputs and Tags as well but still in trouble do get access to DB1. I´m working with TIA_PortalV13 and there is no Option in DataBlock Attributes accessabel via Webserver. So as a workaround i tried to add a read/writable Watchtable of DB1 in the Webserver Settings but that didn´t work out so far.
What i noticed is a illegal Memory Address error in the property grid of DataModule1.DB1. I can see when I start the application MemAddress 3 although I configured in TPLCBlock MemAddress 0 that´s weird.
Anyway i guess the solution is to get access to DB1 over Webserver but i don´t now how.
Regards
Peter
Hi Fabio,
my bad, I´m so stupid. I had a force request to some variables in DB1 which forced them to 0.
How can I support you ? Is your paypal account mentioned above still correct ?
Last edit: PHess 2023-08-30