A technique: an execution a bunch of commands cyclically

So you use the Siemens library blocks to send and receive data (ASCII strings I guess).
In your program you have to alternatingly send and recive in a sequential manner. You send a command to a device, wait for the reply from the device, and then proceed to the next device.


At the moment I'm using the code to write and read values, which I made by myself.


of course, later I will look at standard library block, if it's satisfied the current demands.
 
In your sketch, it appears you have a serial port connected to what looks like a rack that is connected via Profinet to the Siemens CPU.
Can you tell us about it or is it a secret ?

Even if the serial port is non-Siemens, it will probably work in the same way as a Siemens serial module.
I.e, you send commands and data (ASCII strings) to the module, the module sends the data - one data set at a time.
Same for receiving data. The module will receive a data set (ASCII string), and the PLC must fetch the data set, whereafter the serial module is ready to receive another data set.
 
It seems I misread the post, It was not clear that the coms had to be polled I assumed that was already taken care of and it was the logic to map in the bits, Jesper is right, if you need to poll each unit yourself then you will need to create a block that sends the command, wait for a response to move on, however if there is no response within a time frame then re-try and if that fails report it (alarm) and move on.
 
In your sketch, it appears you have a serial port connected to what looks like a rack that is connected via Profinet to the Siemens CPU.
Can you tell us about it or is it a secret ?

I wouldn't say this is a secret. It just an OEM-device delivered by custmer. It came with a disk which contains gsd and a few pages with commands. I spent some time to get it working I would say. 🤾 That's all.

Even if the serial port is non-Siemens, it will probably work in the same way as a Siemens serial module.
I.e, you send commands and data (ASCII strings) to the module, the module sends the data - one data set at a time.

Yes, serial conception being serial conception.
 
Last edited:

Similar Topics

hello, Currently I'm playing with a module which has a command for getting its status. And I'm a bit puzzled by this picture which is provided...
Replies
21
Views
5,411
I'm thinking of doing a PLC course with a company called Technique Learning Solutions (learntechnique.com). Anyone heard of them? I have a fair...
Replies
0
Views
1,345
Let's say my PLC has a 32 terminal output card called Local:3.O.Data. Which of the two options below is a better way to map the output? Or is...
Replies
11
Views
2,006
Hey guys, I would like to ask some advice. I am working on the LogixPro bottle line simulator and I am having trouble figuring out the logic in a...
Replies
0
Views
1,273
Hi, The current application I am working is a 3axis machine, with 2 of the axis 'slaved' to the master. When I say slaved, they can only move...
Replies
9
Views
3,069
Back
Top Bottom