05-25-2020 02:32 AM
Hello,
I have a Teraterm macro file. The contents of the macro file is as below..
;; Tera Term Macro
;; ============================================================================
sendln 'ATZ'
pause 1
sendln 'AT+NJM=0'
pause 1
sendln 'AT+TCONF=868000000:14:125:7:4/8:1:1'
pause 1
sendln 'AT+TCONF=868000000:14:125:7:4/8:1:1'
pause 1
sendln 'AT+DCS=0'
pause 1
ping_index = 0
do
ping_index = ping_index+1
sendln 'AT+TPING'
mpause 750
loop while ping_index < 10000000000
My question is Can I open serial port in LabVIEW and write these commands to the serial port, instead of running this Teraterm macro file.
From the macro, I understand that I have to write ATZ to serial port and then wait for 1 second. Instead of pause, I use Wait in LabVIEW.
The program pings Com port, is what I understand
Will it work out in LabVIEW. Please let me know.
Thank you..
05-25-2020 02:50 AM
Yes, it will work. Take care of appending the correct termination character - probably a Carriage Return = 0x0D - to each string you send.
Of course, you should also provide a way to terminate the sequence before that all the 10 billion "pings" are sent.
05-25-2020 03:20 AM - edited 05-25-2020 03:21 AM
Hi Hema,
@Hemagopal wrote:
I have a Teraterm macro file. The contents of the macro file is as below..
My question is Can I open serial port in LabVIEW and write these commands to the serial port, instead of running this Teraterm macro file.
From the macro, I understand that I have to write ATZ to serial port and then wait for 1 second. Instead of pause, I use Wait in LabVIEW.
Yes, you can use LabVIEW.
Read the help for TeraTerm (I didn't…) to be sure on these things:
05-25-2020 04:18 AM
@GerdW ha scritto:
Yes, you can use LabVIEW.
Read the help for TeraTerm (I didn't…) to be sure on these things:
- "sendln" might append an EOL char (like LF or CR or LFCR)
- "AT" might denote a special char (like "@")
- the unit of the pause might be s or ms…
Hi GerdW,
AT is the standard prefix for commands to control a modem, so it will not translate to a special character. The standard EOL for those commands is CR so we may be very confident that this character will work.
Although I didn't read TeraTerm's help too, it seems reasonable (and the OP seems to know this already) that pause is in seconds and mpause in milliseconds.
06-11-2020 01:30 AM
Hello,
I am able to send the commands which are there in the teraterm macro file by using VISA serial write. When I do VISA serial Read, i get output in the Read buffer output.
But this output is not consistent. Most of the time, I get blank output and sometimes I get output.
Why is this. Does it have to do with the byte count wired to Read input?
I have used the invoke node "read byte count at port" and wired this to Read Input.
That is not helping.
Why I is the blank output coming most times.
Thank you
Hema
06-11-2020 03:10 AM
"Read byte count at port" is not useful for you. Probably, your code is not waiting enough time.
Are you using the VISA Configure Serial port? You should define the CR character as the termination character and a resonable value for the timeout. Then do a single VISA Read wiring in a large number of characters (more than you expect). The Read will be terminated as soon as the CR character is received.
Please upload your vi for more precise advices.