Jump to content

OPLC to/from modem communication.

Recommended Posts


I have this small project where i use vision 120-22-R6C OPLC to gather information(battery voltage, pressure,

water tank level) from fire truck. That is easy but the hard part is to send that data over gprs net to computer.

I have intelligent modem so all i need to do is write some text to OPLC's COM port.

I have made a program that uses Protocol Send FB to write data to COM. It works fine. But i'm worried about AT commands that modem needs to work.

In COM Init FB i can write AT commands to start and configure my modem. If i use this Init FB, can my modem respond

to my AT commands, like OK when i write AT in COM init? And can i use Protocol Send and Scan FBs to communicate with my

modem with AT commands or is there easier way? Or can i write maybe C or C++ program and then use it as subroutine?

Or can i maybe use data tables?

If you could tell me some tips or otherwise point me to right direction, i would be grateful.

Thanks for your time and effort.

Niko from Finland

Link to comment
Share on other sites

  • MVP 2014

To answer you fundamental question, yes it is possible to send AT commands to a modem using the protocol block. Any response from the modem can be scanned using the protocol block, or it can be simply ignored if not relevant to your requirements.

Unitronics do have built-in GPRS support for a number of modems, but you need one of the supported modems. I am also not sure whether it is possible to set up the GPRS connection using the Unitronics functions, then switch to protocol FB for sending general ASCII data.

Link to comment
Share on other sites


First - as Simon already stated, theoretically it's possible to manage AT commands via FB Protocol. It even seems not so difficult task. But, in practical level, it can take days, even weeks of works and testing - in case you have very good support from modem's side!

If the modem is not one fo Unitronics supported, but for any reasons you want to use it in many (hundreds!?!)projects, maybe it worth the efforts. In this case I recommend you to write your code in a special, "standard" subroutine and then to import it in each new project.

In any case using one of suppoted modems with standard COM Init and FB GPRS is much easier!

Simon - when GPRS connection is established, you can perform FB Protocol or FB Modbus config and then to have relevant protocol running on already opened communication pipe.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...