Forums.MrPLC.com: FX2N-32MR-DS and SmsFX - Forums.MrPLC.com

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

FX2N-32MR-DS and SmsFX Rate Topic: -----

#1
User is offline   MrJeff 

  • Hi, I am New!
  • Pip
  • Group: MrPLC Member
  • Posts: 3
  • Joined: 22-September 12
  • Country:Finland
    Finland
Hi guys

I'm new on this forum and I've tried to search everywhere online to solve this problem and i really need to get it solved.
I tried the SmsFX example and i have a few issues.
My setup is FX2N-32MR-DS with FX2N-RS232BD card installed and Westermo GS-01 GSM modem, tried with GX IEC Developer and GXWorks2.
For some reasons SmsFX code sample is not working for me as it should. I can send messages through the GS-01 and receive them on my mobile phone,
but when i send message to PLC, i cannot get data correctly.
Received buffer is stored temporary in ByteReg at D630 and then moved to D100 in my case.
I think the problem is with the index registers used to move data as received data in D1xx is wiped before FB can filter and process it. With monitor i see data going to D1xx but its wiped in a less than a second.
Have anyone tried this code and got it working?Any tips?

Thanks in advance,
Jeff
0

#2
User is offline   kaare_t 

  • Guru
  • PipPipPipPipPip
  • Group: MrPLC Member
  • Posts: 891
  • Joined: 02-February 09
  • Country:Norway
    Norway
Are you sure that you are not using any dataregisters from the system (system variables / labels) area? Could you post the test program you are currently using? Did you initialize the modem with the required commands (should be documented in the help file)?
0

#3
User is offline   MrJeff 

  • Hi, I am New!
  • Pip
  • Group: MrPLC Member
  • Posts: 3
  • Joined: 22-September 12
  • Country:Finland
    Finland

View Postkaare_t, on 22 September 2012 - 04:09 AM, said:

Are you sure that you are not using any dataregisters from the system (system variables / labels) area? Could you post the test program you are currently using? Did you initialize the modem with the required commands (should be documented in the help file)?


Hi,
Thank you for your reply. According to the manual, this sample should work.
Yes I have initialized the modem and selected the sms mode etc. the sample code also do initialization in Fx_InitModemSMS block.
Problem is in receiving process i assume, inside of Fx_232BDNoPrEC.
I get the RX data in ByteReg at D630 and in D100 StartAdrRecBuff but the date is never processed as its wiped from StartAdrRecBuff before its filtered.
For example, when I init the modem using Fx_InitModemSMS FB, NoNetwork is always TRUE as the FB never receive OK answer ftom the AT+CSQ command.
Also when i send SMS using Fx_SendSMS FB, I receive 3 messages in my mobile as there is a retry counter that try to send SMS 3 times if it wont get OK from the modem.

Attached File  SmsFXtest.zip (862.84K)
Number of downloads: 38
0

#4
User is offline   kaare_t 

  • Guru
  • PipPipPipPipPip
  • Group: MrPLC Member
  • Posts: 891
  • Joined: 02-February 09
  • Country:Norway
    Norway
You've used addresses in the system label area (see picture). You have to use an area outside of D512 - D999 or else other auto assigned variables will overwrite them. Try to change either your address area in the GVL, or move the system label area. Then post your result.

Attached thumbnail(s)

  • Attached Image: SysVariables.png

0

#5
User is offline   kaare_t 

  • Guru
  • PipPipPipPipPip
  • Group: MrPLC Member
  • Posts: 891
  • Joined: 02-February 09
  • Country:Norway
    Norway
And by the way: The function block library you are using is quite old. You should download the latest one (SMS_V120):
http://www.beijer.no...12577520043A1BA
0

#6
User is offline   MrJeff 

  • Hi, I am New!
  • Pip
  • Group: MrPLC Member
  • Posts: 3
  • Joined: 22-September 12
  • Country:Finland
    Finland

View Postkaare_t, on 22 September 2012 - 05:59 AM, said:

And by the way: The function block library you are using is quite old. You should download the latest one (SMS_V120):
http://www.beijer.no...12577520043A1BA


Thank you a lot, new library is working too. Problem solved :)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users