Step7: Read a serial signal via IO

lauwerstim

Member
Join Date
Apr 2006
Location
Kontich
Posts
93
I'm trying to read out a Meinberg GPS-clock to sync the time on my plc.

Now I have following problem: I have no physical room to place a RS232-card in my plc. I however have some inputs free, so is it possible to read in RS232 signals via inputs in the plc (slowest possible baudrate on the Meinberg is 300)

The Meinberg has optocoupling outputs to send the is ASCII characters over 1 output.

This how the telegram will be:

Code:
Format of the SAT time string
The SAT time string is a sequence of 29 ASCII characters starting with the STX
(start-of-text) character and ending with the ETX (end-of-text) character. The format
is:
<STX>tt.mm.jj/w/hh.mm.ssMEzzxy<CR><LF><ETX>
The letters printed in italics are replaced by ASCII numbers whereas the other
characters are part of the time string. The groups of characters as defined below:
<STX> Start-Of-Text (ASCII code 02h)
dd.mm.yy the current date:
dd day of month (01..31)
mm month (01..12)
yy year of the century (00..99)
w the day of the week (1..7, 1 = Monday)
hh.mm.ss the current time:
hh hours (00..23)
mm minutes (00..59)
ss seconds (00..59, or 60 while leap second)
zz time zone indicator:
‘Z ‘ MEZ European Standard Time, daylight saving disabled
‘SZ’ MESZ European Summertime, daylight saving enabled
x clock status characters:
‘*’ DCF77 clock currently runs on XTAL
GPS receiver has not checked its position
‘ ‘ (space, 20h) DCF77 clock is sync'd with transmitter
GPS receiver has determined its position
y anouncement of discontinuity of time, enabled during last hour
before discontinuity comes in effect:
‘!’ announcement of start or end of daylight saving time
‘ ‘ (space, 20h) nothing announced
<CR> Carriage return (ASCII code 0Dh)
<LF> Line feed (ASCII code 0Ah)
<ETX> End-Of-Text (ASCII code 03h)

Thx for the help
 
I think it will be VERY difficult.

The most difficult will be to reliably read one ASCII character.
Even if you set the PLC to read the input every 1/300 second, there will be minute differences in the timing. Something I think a real serial port takes care of automatically.
And I dont think you can get an S7 to read an input precisely every 1/300 second. The cyclical interrupts can be set in whole milliseconds.

Take a look at the 1SI module for ET200S. It is cheap.
 
****.

The easiest thing will be a CP340 for the installations where there's room and an ET200 in the other case.
This is going to be expensive (the GPS is already expensive compared to the DCF we wanted to use but doesn't work when there's a lot of elektro-magnetism)

In most places I use a PN cpu, but over the PN-port you can't sync the time.

Thanks anyway.
 

Similar Topics

Hi all. I use kepware opc to read data from Matlab, it works fine. Now i want to move these data to step 7, how can i read data from OPC to step 7...
Replies
2
Views
3,249
I am using SFC 59 to read data using DPV1 from a PROFIBUS slave to a PLC. My problem is the length, I know the RET_VAL holds error code or read...
Replies
0
Views
1,931
Hi.I'm quite new in this field and I allready have a problem. I'm working with an Simatic S7-300(CPU 313C-2DP)and a 3UF5 SIMOCODE-DP.The simocode...
Replies
5
Views
7,169
Hello everyone, I have a question. I created FB, I defining word in input and word in temp interface area. I need read some bit from this...
Replies
17
Views
10,426
This is the first time I am working with Simatic Manager Step7 as I started my siemens journey with TIA which is pretty easy and do a lot of stuff...
Replies
3
Views
143
Back
Top Bottom