LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

accessing modem registers with serial interface

Is it possible to access the registers of a modem (which is under test)
with labVIEW, the modem is connected to my PC with a serial (RS232) interface,
I tried using the serial commmunication VIs but they did not work. I want to send read (RD) and write (WR)commands to the modem in a similar fashion to the way I use hyperterminal.
Ben suggested using the AT commands but I dont knowhow to do this from labVIEW, what I hope to do is download scripts, which are just register accesses, and then just view the status of some registers

Any ideas?
0 Kudos
Message 1 of 6
(3,041 Views)
Anything you can do with Hyperterminal you should be able to do with LabVIEW. You first use VISA Configure Serail Port to set baud rate, handshaking, etc. Then do a VISA write to send a command to the modem. What Hyperterminal does is append a carriage return to the command you send so you'll have to do this yourself in LabVIEW. For reading, you can enable or disable a termination character that when when detected, will halt the read operation. You can also use VISA Bytes at Serial Port in combination with VISA Read inside a while loop and stop the read when the number of available bytes is zero or when a specific string is read back. Could you save a Hyperterminal session and attach it so someone could look at the exact commands you send and the respon
ses. If you want an example, give us the version of LabVIEW that you're using.
Message 2 of 6
(3,041 Views)
Hi Dennis,

Interested in your idea, Im using ver6.1.

Kevin Staunton
0 Kudos
Message 3 of 6
(3,041 Views)
Dennis,

I do not have the exact commands that I will be using yet but the communication will be very similar(but with more RD and WR commands)to the attached hyperterminal session, this simple session works fine with the modem. I want to do this in LabVIEW, with the same settings.
Ive tried to use the "LabVIEW <-> Serial.vi" in the get examples section, but it was throwing out strange responses(even when I appended the commmand with the carriage return) it would return "r f2" or something for a read command and "w f2f" for a write command and then it would give the right reading on the next line.
Also just wondering is there a way to automatically append the command with the carriage return character?
regards,

Kevin Staunton
0 Kudos
Message 4 of 6
(3,041 Views)
i have just noticed what the above strange responses are they are every second character in the command, also something else strange is happening, when i run the LabVIEW <-> Serial.vi the read outputs every second character of the actual command given whenever execution highlighting is off, and when it is on, it gives every second character of the command followed by the expected result ie. the contents of the register.
whats going on here?
any ideas?
0 Kudos
Message 5 of 6
(3,041 Views)
anyone have any ideas whats goin on?
0 Kudos
Message 6 of 6
(3,041 Views)