08-12-2010 03:52 AM
Hi,
I am using a maxon modmax modem.
Using window hyperterminal I can send commands to the modem - for example ATE1 turns echo on, ATI returns modem serial number.
When I send data to the modem in Labview I get a timeout error?
In windows hyperterminal when you type for example "ATE1" enter - sends a text string "ATE1?????".
Can anybody tell me what the ???? are AND what text string I need to send in Labview to mimic the ATE1 command.
Thanks for your help.
08-12-2010 04:34 AM
08-12-2010 04:42 AM - edited 08-12-2010 04:46 AM
This KB may help.
Often, the problem is (extract from above document) :
Hyperterminal appends a \r\n, which corresponds to a carriage return followed by a line feed, at the end of each message it sends.
You have to add these termination characters in your LV code.
08-12-2010 04:56 AM - edited 08-12-2010 04:57 AM
Hey,
I have sent AT commands successfully.
serial read and write example is provided with labview examples.
1st open it.
select required COM port (NOTE:disable windows hyperterminal while doing this)
set baudrate(9600).
enter your command in command write control
You will get response in the read indicator.Hope this helps..
08-12-2010 05:10 AM - edited 08-12-2010 05:11 AM
another thing i missed is...for serial communication if you are using rs232 then no prob..if usb then install required modem driver
08-12-2010 06:16 AM
Hi srikrishnaNF,
Yes, I am trying to send the AT commands to the modem via Labview
Please see attached VI.
Any advice would be appreciated.
Does this application only do one read / write operation?
Do I need to put the VISA read and write inside a while loop? I am new to labView and would appreciate your opinion.
Cheers
Mark
08-12-2010 06:17 AM
thanks for your advice, I have added them to my VI
08-12-2010 06:20 AM
can you please send me the VI, i could not get the examples to work cheers mark
08-12-2010 07:17 AM - edited 08-12-2010 07:19 AM
Hi Mark,
I assume that the wait VI is used to be certain that the AT-command has been sent and received, correct? The way you have written your code now, you generate one command, waits, and then generate another one, the delay will not have any effect when you send it. If you want to do several serial writes with a delay in between each AT-command, you must call the VISA write VI several times (now you only write once). Some sort of loop is needed, if it's a while or for loop could depend on the purpose of the VI. If you only want to send all the commands and that's it, I would go for a for-loop like in the figure:
If you continuously want to write/read then a while loop would be necessary.
Also, you need to control the dataflow in your VI, you can turn on Highlight Execution to see how your code is executing at the moment. When you run it, you can see that the local variable "output string to write" is sent to the VISA Write VI before the string has been generated in the for loop. By using local variables you don't get the same predictable dataflow as with wires and there is no need for a local variable in this VI, everything can be done via wires. There are lots of pages about Labview dataflow, just search at NI to get started.
Hope this help!
/Anders