PLC data transfer queries...

arbj

Member
Join Date
May 2011
Location
mrt
Posts
61
Hi,

I have configured the Anybus Profibus-Serial Gateway to interface my serial RS 232 based device to a PROFIBUS-DP network.

The gateway continously monitors the configured addresses in the OUT area, when the PLC changes the data in these addresses the corresponding serial RS 232 command is sent to my product, the system works similarly vice-versa, addresses written to the IN area of the gateway are mapped to PLC memory addresses, so data from the device is sent back to the PLC.

I am confused about which option is better suited for a Siemens S7 PLC (or any PLC).

Option 1:

PLC writes to the mapped locations and the gateway sends the data to the serial device.

Can the PLC transfer 2 sets of data (composed of 2 bytes of data) consistently, say something like this...

For example

T PQW 300 //First two bytes (300-301)
T PQW 302 //second set (302-303)

If there is some delay here between the two commands, then the function in my device gets executed twice..


Option 2:

The gateway monitors another address location (called control), after the address locations (4 bytes) are filled in (consequently transferring data to the serial device).

The PLC then writes to the control address (say value of 1), the gateway then transfers the control register data and the device performs the function.

The advantage here is that data updates can be slow to the 4 bytes..

Is the above option 2 possible in PLC programming ??

I do not have any idea of PLC programming, so which option would be best suited ???

thanks
a
 
In Opt.1 you could write 4 bytes consitently like this:

CLR
A TPulse // Here you could put a timer pulse to write every now and then
JCN m001

L SomeValue
T LW 0
L SomeOtherValue
T LW 2

L LD 0
T PQD 300 // Write the 4 output bytes at the same instant

m001: Nop 0

Kalle
 
re

thanks for the reply.

But the 4 bytes of data actually consist of two sets of data which is 2 bytes long.

in my device these two data represent distance in mm.

parameter 1 represents distance 1 and parameter2 distance 2, these two distances are stored in seperate address locations in the plc.

so can these parameters be transffered consistently as 4 bytes to the gateway ?

Sorry if the above query sounds repetitive...

thanks
a
 
parameter 1 represents distance 1 and parameter2 distance 2, these two distances are stored in seperate address locations in the plc.

so can these parameters be transffered consistently as 4 bytes to the gateway ?

Yes, the above example gathers your parameters into 4 consecutive local bytes and transfers all constistently to the output area (T PQD writes 4 bytes instantly).

It could also be made like this

L Parameter1
SLD 16
L Parameter2
OD
T PQD 300

Kalle
 

Similar Topics

Hi all, I am working on a project that with need to capture force sensor data in footplates in order to determine if weight shift is occurring...
Replies
1
Views
502
Has anyone here successfully created a system where the software SAP (ERP) interfaced with an Allen-Bradley PLC? Currently we have to take recipes...
Replies
6
Views
1,092
Hello parky, goghie, Brian and all of you who kindly come to help when I get stuck. I cannot look into the clock issue that parki has written for...
Replies
5
Views
811
Hi, If we have PLCs on different subnets is it possible to do TCP comms data transfer between them? I'm assuming if we use a routing switch and...
Replies
3
Views
797
Hello folks, :) I'm new to the plc programming, and I have a question that would be great if you help in: I have a bit that goes high every time...
Replies
6
Views
2,048
Back
Top Bottom