Joyz Posted September 22, 2010 Report Share Posted September 22, 2010 Hello! 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 More sharing options...
MVP 2014 Simon Posted September 24, 2010 MVP 2014 Report Share Posted September 24, 2010 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 More sharing options...
Emil Posted September 24, 2010 Report Share Posted September 24, 2010 Hi, 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 More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now