LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

AT commands in labview

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.

0 Kudos
Message 1 of 9
(9,023 Views)

hi markwtc,

 How are you sending the AT commands from labview to the modem?

 

 

Thanks and regards,

srikrishnaNF

 

Regards,
Srikrishna


0 Kudos
Message 2 of 9
(9,015 Views)

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.

0 Kudos
Message 3 of 9
(9,010 Views)

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..

-------------------------------------------------------------
kudos welcome
0 Kudos
Message 4 of 9
(9,003 Views)

another thing i missed is...for serial communication if you are using rs232 then no prob..if usb then install required modem driver

-------------------------------------------------------------
kudos welcome
0 Kudos
Message 5 of 9
(8,996 Views)

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

0 Kudos
Message 6 of 9
(8,984 Views)

thanks for your advice, I have added them to my VI

0 Kudos
Message 7 of 9
(8,983 Views)

can you please send me the VI, i could not get the examples to work cheers mark

0 Kudos
Message 8 of 9
(8,980 Views)

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:

 

21231iA05B30AF758BDF7A

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

0 Kudos
Message 9 of 9
(8,957 Views)