LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using labview to communicate over a modem?

I'm writing a program that polls instruments (Modbus) and would also like to add functionality of dialing up a modem to send/receive data.  Is this possible?  If so, how is it done?
0 Kudos
Message 1 of 10
(5,381 Views)
Yes. This is possible.To poll Modbus instruments,you need to know some basics of Modbus rtu/ASCII protocol.you can down load information from ni.com.you can download the VIs to communicate with modbus devices from ni's site.
 
Regarding modem dialing,you wll have to study modem's Hayes AT Command Set.
just see : [broken link removed; article no longer available]
 
Hope this helps.
 
- Vikas
0 Kudos
Message 2 of 10
(5,351 Views)

I'm already very familiar with modbus, my polling program already works on a direct serial connect, I'm just needing to have it dial up a modem and send/receive data that way as well.

I figured it would have something to do with AT commands, but I guess I still have a couple questions.  Do I just pass the AT strings with the visa write for the particular com port the modem is installed on?  And how when a connection is established, how do I pass messages, and read responses?  Does the outgoing message need to be framed anyway special for the modem (or just send out the normal modbus message)?

0 Kudos
Message 3 of 10
(5,337 Views)
I can use hyperterminal and the AT commands to make the modem dial, but for some reason, it won't work under Labview.  With hyperterminal, I just tried the '+++atdt1800...' and it dialed the modem.  I set up labview to do the same (with the same com port) and it won't work.  I started with a VISA configure serial port to the same settings as I had in hyperterminal, then I did a visa write with the AT string, and it did nothing.  Am I missing something?
0 Kudos
Message 4 of 10
(5,332 Views)
You need to add a termination character to the end of your write string. Are you doing this? Hyperterminal does this for you but when you write your own program, you have to add it in. With my modem, I append a carriage return. For your string control/constant, right click and select '\' Code Display and add a \r at the end of your string. You can also use concantanate to string and use the CR constant on the String palette. The shipping serial example called Basic Serial Write and Read shows a Carriage Return/Line Feed at the end of the command and the shipping example called Advanced Serial Write and Read shows how you can use a VISA property node to automatically append a termination character to each write.
Message 5 of 10
(5,329 Views)

Yep, adding that did it.

Thanks!

0 Kudos
Message 6 of 10
(5,325 Views)
Neilson, i m working with the same project as u were can you help me with that,, i have made LV program which give the response to AT command of modem but now difficulty with me is,, how do i transfer query using modem,  basically i have to send query to remote computer and read the response cuming from.....but,, this communication will take place on modem.....  using modem i have to send the data.. i dont think i have to send file for sending query, in modem,,,
 
can you help me somthing in this,,
 
thanks
0 Kudos
Message 7 of 10
(5,201 Views)
Sorry, but I can't really help with that.  At the time, I was just testing as to whether I could dial the modem.  I got that working and stopped development.  We weren't sure yet if that was going to be a requirement and may or may not continue the project.  Maybe someone else here can help?
0 Kudos
Message 8 of 10
(5,183 Views)
Once you've dialed and made the connection, communication should be nothing more than a series of VISA Read and Writes just like communicating with an instrument over a normal RS-232 cable. If the remote computer already has a program running to answer a call from a modem and respond to queries, then what is the exact difficulty that you are having? Have you tested communication with Hyperterminal? If you really do have to do file transfer with some sort of protocol such as Xmodem, then that's a different story and will be more difficult.
0 Kudos
Message 9 of 10
(5,180 Views)
ya,, i can send and receive file with hyperterminal,, but problem aries when i m trying to do same in labview,,,  even vi which i have made is responding atd,,(dialing command) but,,, wht happes is ,, i could not hear ring on remote pc until i stop the LV,,,, so,, i m confused little bit,, well,, still trying,, but soon come back,, if occured in problem,.,., well,,, thanks alot,, friend for help..
0 Kudos
Message 10 of 10
(5,158 Views)