08-22-2007 09:58 PM
08-22-2007 10:26 PM
@user_1 wrote:
What is the better idea to reduce the delay in display? I thought if you check the modem every 10 second and if new data got,fetch the data ,decode it ,display the information and then insert into the database, the system will be better. But if a single check of modem can give any number of messages which contain data. If you get 10 messages you have to decode 10 messages display 10 records and then insert 10 records into the database. Is there any better way for this?I havent worked with serial communication applications. I haven't thought about the coding side now. Just thinking of the overall idea only.Thanks in advance for the suggestions.
I think you already answered your own question. Of course it makes sense to decode the data and display it immediately rather than writing it into and then reading it back out of a database. I don't know of any other way to do this. I'm a little confused as to what else your question might be.
Your subject is about communicating with a modem making it sound like you have modem communication problems, when actually you are asking about program architecture problems. Is there anything special about this modem? Are you dealing with the need to communicate with this other device over a phone line and you have to worry about dialing issues? Or is the phone line just a hardwired, direct phone line to connect with the remote device?
To most software, a modem is basically a serial device to communicate with but you would just have to worry about some communication settings to write in order to get it to do certain things like pick up the line "ATH1", dial "ATDT" or hangup "ATH0". Everything else is just writing characters to or reading characters from the buffer. Look at the VISA examples for basic serial read/write to see how to do that. Rather than reading the serial port every 10 seconds, you should just read it whenever bytes at port is greater than 0.
08-26-2007 09:40 PM
08-27-2007 08:31 AM
10-15-2007 10:12 PM
10-16-2007 08:09 AM
10-16-2007 08:43 AM
10-16-2007 08:49 AM
@MaiMai wrote:
I am thinking of using some other dial-up program to do the dial-up and answering manually. Once the connection is established, LabVIEW on each PC reads and writes to serial port (where the modem is connected) for communication and data transfer. Is that possible? Or must the dial-up and answering be done by LabVIEW program?
I don't think this will work. Because what will happen is that the other program will take the COM port. It will block the accessing of the COM port from within labview. Thus it would be necessary for the other program to close the COM port once it is done so that labview can access it. I don't know for sure, but I think it is likely that once the other program closes the COM port, the modem may automatically hang up. Even if it doesn't, you will still have the headache of syncronizing the two programs so they don't step on each other.
@MaiMai wrote:
Once the modem connection is established, there will be no difference in communication as compared with 2 PCs connected directly by serial ports using null modem cable right?
Correct.