3/31/2012 8:31 PM | |
Posts: 150 Rating:
|
I am writing an application where I need to communicate with a GPS, Garmin 18 LVC. Someone in another thread suggested I have a look at the following example. http://support.automation.siemens.com/WW/view/en/45147696 Looking at it, it seems that covers a lot to get me started with my I application. I tested the GPS with hyperterminal and it sends the NMEA string ok. I wrote a simple programm only using RCV_PTP and I get the GPS data in the buffer array. I then copied the code from the link above and I changed the CPU to 1212C DC/DC/DC as this is the one that the project will run. As soon as the PLC went into run mode, it failed and it went to stop mode immediatelly. I checked the diagnostics buffer and the problem was that the cycle time watchdog tripped because the cycle was over 150ms. I then started debugging the code. In networks 9 and 10 it looks like that the program is looping through the NMEA GPS string to count the commas ',' within the string. I believe that the intention is that when a comma is detected and depending on which comma it is the programm jumps to the relevant network for further processing (evaluation of time, latitude, longitude etc.). I believe that there is an error in the program and the plc drops in an infinite loop, thus making the watchdog to trip. If I disable NW10 (and specifically the bottom part), the PLC does not enter the stop mode, but it also cannot proceed any further. Does anyone have a S7-1200 + GPS handy to check if the same behaviour occurs? Does anyone have used that code from the example in the past and got it working. To be honest I would probably have written that programm another way but since there is something ready I would rather use that to save time. I dont want to believe that the fact that I am using a 1212C CPU instead of the 1214C in the example has something to do with it. Any help will be highly appreciated. Regards |
5/3/2012 4:11 PM | |
Posts: 150 Rating:
|
No I didnt try to fix the code from the example. I just wrote my own programm. I think the example is overcomplicated. |
2/4/2013 3:39 PM | |
Posts: 267 Rating:
|
I don't know if it's still actual but the FAQ is updated: http://support.automation.siemens.com/WW/view/en/45057335 |
8/21/2013 11:44 AM | |
Posts: 1 Rating:
|
Hi Fedenaa! Could you please send me your program, becaus I'm struggeling a bit to get it working. Even Siemens Support can't help me at the moment. |
4/3/2014 6:21 PM | |
Posts: 1 Rating:
|
Could I get a copy of this code, as I am working on the same type of controller, with a slightly different GPS, 16x. Any help would be appreciated. |
Follow us on