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.
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
Similar Messages
-
Using SQLplus command in LabView Database toolkit
Hi ,
I would like to ask something but before that this is my set up background
OS : Win 7,
LabVIEW : 2012
I have successfully connected with Oracle database using Labview Database toolkit.
The problem now is since I need to query the data from the database,
it will takes time for the labview to process it (since there is so much data in a specific table),
let say that the table in database is "Serial Number", and the data that I want from that table is "SN123"
if I query the data from that table, the labview will process it in a long time since it will not only give me "SN123" but also other data inside the "Serial Number" table.
(Refer to attachment)
but if in SQLplus, there is a command that can be execute to specifically call the "SN123" data,
For the SQLplus, the steps to retrieve the data is like this:
1. Key in the command to get the ID of the "SN123"
2. Key in the command "SN123" ID to retrieve the data.
I wonder if there is a way to put this command on labview database so it will be faster to retrieve the data.
Attachments:
Database.png 84 KBAn instrument driver written in Labview, is not the same as a instrument driver used by say Windows. A Labview instrument driver uses standard Labview functions to send SCPI commands to the instrument. You can learn a lot about the instrument by looking into the Labview instrument driver, and how it sends the commands to the instrument. But having the instrument programming manual at hands is also important.
Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far) -
Hi
I was wondering if there's anything like a "goto" command in labview. For example, if I am in a for loop (and the for loop hasn't reached it's number of time to loop yet) and need to exit the loop and jump to somewhere else in a code because I encounter some error condition. I know I can use a while loop for this if there isn't any goto command, but that's my last choice because it's kinda complicated for a nested loop with many procedures.
ThanksI too would like to find a way to mimic a "goto" function.
In my program, I have a VI that determines if temperature (T1) is stable to within a certain limit for a certain amount of time. After I've found that it's stable, I need to check if another temperature (T2) is within a certain range of a set temp. If it's not, I need to raise T1 so that T2 will also rise to be within range. Then I need to use the aforementioned VI again to check when T1 is stable again. I wish I could just do something like loop the error cluster wire back on itself, making a sort of "goto" command. Otherwise I need to make a very complicated nested While Loop structure. Perhaps I can figure something out with an Event List. Anyone got any suggestions? -
does anyone knows how to run an ssh command in labview?
I know how to run some linux commands in labview but my problem is when I try to run an ssh command ...
thks
JPUnfortunetly, I don't know how to script in a password for ssh. SSH closes the stdin and re-opens the tty that you are logged in at. This is actually a security feature. As well as a way to send stdin to remote programs (otherwise your password would get in the way.)
If you don't need to ssh to a remote host, and you want to chmod something on the localhost, you could use sudo instead. With sudo you can specify certain users (or all users) to run certain commands. (so you could make a shell script to chmod for you).
I don't know your exact needs, but I think that a public/private keypair could still work. In your authorized keys file on your "root" account, you can even specify that "this public key does not get shell access, and can only execu
te this one command." This would probably be the most secure method. But it requires the user to have the correct private key as well.
If you know that won't work for some reason, then maybe you could setup a inetd process that will execute a command whenever someone connects to a certain port (then you could use LabVIEW's TCP VIs).
Or, if you are not connecting remotely, you could setuid your LabVIEW executable (A VERY BAD IDEA!).
Also, it is possible to script "telnet." It would of course transmit your root password as plaintext, but trying to script your ssh session would also embed your password in your LabVIEW VI. Out internet toolkit for LabVIEW has some helpful telnet VIs.
May I ask why you want to chmod something on a remote system that requires root? Sounds like maybe you should create a LabVIEW application on the remote side that acts as a daemon (running as root) and accepts connections and commands and does the chmodding for you.
-Duffey -
Execute system commands from LabVIEW
Hi,
can anybody please help me with how to execute sytem commands from labview
(WIn98 in particular).
Basically I would like to execute the command "javac example.java"
Looking forward to responses.
Please be kind enough to send me a email also
manjul [email protected]Oops. Looks like I lost the attachment on the way. Sorry... Here it comes
Attachments:
Command_Execution.vi 21 KB -
Hi.
I've found an instrument driver for keithley 6221 on keithley.com.
Here is a question: I wana to control this model directly by using SCPI command instead of instrument driver. But, I don't know how can I do this in Labview 8.0.
Tnx.An instrument driver written in Labview, is not the same as a instrument driver used by say Windows. A Labview instrument driver uses standard Labview functions to send SCPI commands to the instrument. You can learn a lot about the instrument by looking into the Labview instrument driver, and how it sends the commands to the instrument. But having the instrument programming manual at hands is also important.
Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far) -
Instrument I/O Assistant (sending command from labview to arduino)
Hi,
I am a beginner in Labview. I would like to control the intensity of AC loads using labview. In this case, i would prefer to use instrument I/O assistant. The instrument I/O assistant in labview will have to send a command to Arduino. The intensity will be controlling by using slider in labview. How to write the vi for this example? Please advice.feliciacpw92 wrote:
Hi,
I am a beginner in Labview. I would like to control the intensity of AC loads using labview. In this case, i would prefer to use instrument I/O assistant. The instrument I/O assistant in labview will have to send a command to Arduino. The intensity will be controlling by using slider in labview. How to write the vi for this example? Please advice.
In the thread for your other post, you were told that LabVIEW installs by default example programs on how to use LabVIEW with serial port.
Have you bothered looking at that?
You need to do some work on your own. -
Run a cmd command in LabVIEW with parameters
I have an executable program, for example myprogram.exe, located in "C:\Documents and Settings\myname\myprogram.exe" (I use windows xp 32 bit)
When I run the program (by running cmd and type "myprogram.exe > to_text.txt" on the command line), the program will print out the result to that text file.
But when I try to run the whole thing on LabVIEW, I can't manage to do so. LabVIEW only supports using the "Run Command" of Windows, not the cmd. (using the SystemExec vi)
So how can I run "myprogram.txt > to_text.txt" on LabVIEW as I run it in cmd? Moreover, how can I send the break event (by pressing Ctrl+C in the cmd) by LabVIEW to stop the program?
With my appreciations!I made this a while ago and haven't tested it too much but it should do what you want. Provide the application path, then the switches in the array. It does work with built in commands like dir and copy.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.
Attachments:
Execute Command Line With Switches.vi 24 KB -
How to add CR and LF on a command in Labview?
Hi,
I am using the Walker MG-10D Gassmeter, and this instrument requires that all commands must be terminated with CR and LF. How can I do that? Could you please give me an sample example for " *IDN? " command? I am using Labview 6.0.
Thanks a lot.You just need to form a string that contains these special characters. There are several possibilities, two are shown on the attached image.
(1) right-click on the string constant and select '\' Codes Display. Now you can add \r for carriage return and \n for linefeed.
(2) Just use "concatenate strings" with the special diagram constants found in the strings palette.
Now send the final string to your device.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
AddCRLF.gif 2 KB -
Convert Agilent 34972A command to labview program
Hi,
I'm using labview to remote control Agilent 34972A.
i need to read from one channel at a higher frequency,and write the result in a file. I think the following command would do that, but I couldn't make it work in labview program.
CONF:RES 70000,1(@101)
ROUTCAN(@101)
TRIG:COUN 1000
INIT
FETC
I attached the program that I'm using right now to get data from different channels with lower frequency.
Thanks.
Attachments:
VI.jpg 190 KBIt was suggested at http://forums.ni.com/t5/Signal-Conditioning/reading-from-one-channel-without-mechanical-opening-and-... that you use the monitor function but I guess you didn't read that or bother to try.
-
LCD, extented commands and Labview
Hello,
I am using a serial LCD (https://www.sparkfun.com/products/9395) associated with a TTL-USB converter (http://www.miniinthebox.com/fr/cp2102-usb-2-0-vers-uart-ttl-convertisseur-6pin-serie-du-module_p3910... and labview with VI n°1. Sending simple commands such as the one in VI n°1 works fine. My problem is that I don't know how to send the Extended commands on page 2 here https://www.sparkfun.com/datasheets/LCD/SerLCD_V2_5.PDF.
For instance as far as I understand the data sheet I need to send 124 128 in order to turn off the brightness of the screen. If I type "124 128" in VI n°1 the LCD screen displays "124128". I get the same result with VI n°2.
Would anybody know what I could try next?
Thansk a lot.
User1979
Solved!
Go to Solution.
Attachments:
VI n°1.png 8 KB
VI n°2.png 9 KBIt looks like those values (124 and 128) are the decimal equivalent of the bytes to be transmitted 0x7C and 0x80. It is not possible to tell for sure from your images but most likely you are sending the ASCII text characters for "1" "2" "4" and "1" "2" "8". Since they show up on the display that is almost certainly what is happening.
In your second VI pop upon the string constants and select Hex Display from the pop up menu. Then type in the hex values 7C and 80.
Lynn -
Calling a DOS command with LabVIEW
Is it possible to run commands that you might execute on the DOS prompt from
labview?
-- StephenWell at least you did a search- the thread you replied to is 7yrs old! please start a new thread
Jeff -
Calling a shell command from LabVIEW
Platform:
Labview 8.6 on Fedora 10.
The VI is generating some data that I wish to convert to a form that a Windows user can work with (with CR/LF as the EOL). Is there a way to issue a shell command (specifically: $unix2dos <generated file name>) from within labview ?
Solved!
Go to Solution.Hi,
have you tried the "System Exec" function? According to context help it should work on UNIX too...
Btw. you have asked a related question in an other thread. Wouldn't converting the string data in the VI itself work? Or making a special VI for that purpose and enable the conversion by a switch (like "Win compatible format?")?
Message Edited by GerdW on 02-13-2010 09:38 AM
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
Sending linux command through labview
Hi,
I am using Labview Professional Development system and I have to create a VI that opens a command prompt window to session into a linux based device.
I have used System Exec to open the window and got to "root-bash#" prompt.
Question:
- How do I send command to the linux prompt ? Do I need to buy the labview linux package for Pipe VIs ?How about a TCP connection?
Ctrl-Space (open quick drop) and TCP give me the TCP vis ....
Greetings from Germany
Henrik
LV since v3.1
“ground” is a convenient fantasy
'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ' -
AI MOTOR-701 mega robotics command using LabVIEW
Hi, I'm asking here has anyone had any experience working with the AI MOTOR-701?
I'm new to programming and I'm currenty working on converting a C program header for control of the motor mentioned above into LabVIEW and I've ran into some problem. See, the motor, according to the C program, receive hexadecimal code for control.
I've translated part of the the C program ( only the Rotate and SendOperaCommand function, the SendOperCommand is a subVI within the VI. According to my supervisor the rest aren't neccesary to be converted ) into a LabVIEW vi. with the same command, sending out the same hexadecimal codes however the motor isn't responding. The original C program and the LabVIEW version I've converted are attached to this post.
Can someone look at the program and let me know whether I've made a mistake converting the program or maybe the rest of the program are neccesary to be converted or maybe it's something I don't know about?
Solved!
Go to Solution.
Attachments:
AI701.txt 3 KB
Rotate02.vi 18 KBThanks for replying my post I'm quite new to programming and LabVIEW and I didn't know that boolean functions work on numerical values.
I forgot to mention that I'm using a touch panel to control the Motor thus I usually convert the VIs into builds and transfer them to the touch panel to work. Somehow the VISA you suggested dosen't seem to work with the touch panel. It didn't transmit anything when I tested the output pin with an oscilloscope. It just showed 5 volts.Also my supervisor just confirmed to me that the VISA isn't the problem.
My previous solutions has signals but the motor didn't run. As did the solution you offered when transmitting using the original serial port function.
The subVI is attached to this reply if you'd like to help out again. In the mean time I'll keep trying different combinations.
Attachments:
SendOperCommand02.vi 10 KB
Maybe you are looking for
-
Find the installation Path of the current running VM on Windows
Hello, I have a java class started by webstart. In this class I would like to find the absolute path of the current running vm? This is important to me because I need to start an exe file (using ProcessBuilder) and hand it the path of the java VM, Fo
-
Exporting pl/sql functions
Hi, I know how to register PL/SQL functions in discoverer Admin and also how to export a folder or entire EUL from discoverer Admin and then also how to import them back. But can someone please tell me how can i export existing pl/sql functions which
-
How do I find the Adobe Acrobat Pro Trial that I have downloaded?
I have downloaded the adobe acrobat pro trial, but I cannot find it among my downloads. I do see the Adobe download assistant only.
-
My iPad no longer sounds an alert for new email. Has anyone had this problem?
I have used to get a bell sound when new mail came into my mailbox, but it no longer sounds even though I have the settings showing a new mail sound.
-
Need BAPI for assignment of services to respective activity
Hello Friends, I need to assign services to respective activity through uploading. For this purpose i need BAPI which will update the specific field of uploaded file in standared transaction CJ20N. The field which i need to upda