0
Beantwortet

S7 TCP Interface DB access

Wombo vor 3 Monaten in Game4Automation Starter and Professional aktualisiert vor 2 Monaten 12

Is it possible to direct access variables which are stored in DBs with the Siemens TCP Interface? The problem there is, that in the TIA variable table only M,Q and I are allowed, but the actual style of programming a Siemens CPU is to store global data in DBs. Merker are not used anymore. I dont want to reorganize the variables of the project for the simulation.

Antwort

Antwort

Hi, did you checked the Beta. Is everything working fine for you?

Wird überprüft

Did you tried to create the PLCOutput object manually - instead of importing it via the symbol table?

Yes I have tried that. But I had no connection to the defined variable.

Beantwortet

I need to check next week if and how we can enable that.

Hi, I just checked.

It is not possible but it will be feasible with some work. We are planning this for the next release. Because of summer vacation this will be available around end of September.

Best regards

Thomas

Is there an update on when this will be?

+1

Next release is planned in 1-2 weeks. It will be integrated there.

okay, thanks. It would be great if this will be possible.

Could you send me please your variable table (*.sdf) where you are using DBS for me to check?

I know that sounds strange, but in TIA the variable table can not contain variables. It's not possible to define non HW related variables there, only Input and Output, and the obsolete Marker. So I can not provide you a sdf file. The syntax for addressing the DB variables is just "DB name"."Variable name" or in a older way %"DB name"."Variable name". Maybe that can help you.

Antwort

Hi, did you checked the Beta. Is everything working fine for you?

sorry for the delayed response. I have tried to use the beta version, but when I start the play mode I get this debugging error-message: "Assets\game4automation\private\Interfaces\S7TCPIP\S7Interface.cs(14,7): error CS0246: The type or namespace name 'Codice' could not be found (are you missing a using directive or an assembly reference?)" and can not start the simulation mode.

Now I've modified the s7interfaces.tcpip file so I could run it. I did not manage to make access to bits but the other data types worked fine. I later have to try it again. Sadly, S7snap can not handle the optimized access as far as I know at the moment, so a direct access to a value by addressing the variable name in the DB is not possible and the CPU and DBs have to run in not optimized mode, but anyway, this is a huge improvement for a lot of users with Siemens CPUs for testing. Thanks for implementing. I hope to see this feature in a final release.

Edit: The problem with the Bits is that the lowest and highest Bit in a Byte are reversed (for example DB5.3 in g4a is DB5.5 on the CPU). Changing the option "Reverse High Low Bytes" to deactivated which seems to be for 2 or 4 Byte, not one, only leads to 0 in all data types.