Bryan Posted May 13, 2004 Report Share Posted May 13, 2004 Hello Gentlemen! I just joined the board yesterday. Nice place you have here! I've been programming in LabVIEW since I graduated college in 1999 and have worked with LabVIEW from 5.1 -> 7 Express (Soon to upgrade to 7.1). My overall fort Quote Link to comment
Michael Aivaliotis Posted May 21, 2004 Report Share Posted May 21, 2004 I tried executing script commands from LabVIEW to Tcl through TCP/IP, but found that if I for example set a variable in TCL, then later tried to retreive its value, I got an error. (I'm assuming Tcl started a new interpreter with each command sent). I started looking at TCL and found it interesting. I've created several test executives in pure G but never thought of trying an external script engine like TCL. Going through the TCL docs doesn't give me specifics on the TCP/IP comm you describe. Where do I start with this approach? Quote Link to comment
Bryan Posted May 21, 2004 Author Report Share Posted May 21, 2004 When you created test executives in "pure G" do you mean you wrote your own scripting language and develop a LabVIEW interpreter? Isn't G = LabVIEW, or is G a text-based version of LabVIEW. I've heard people say "G programming " and "LabVIEW programming". Correct me if I'm wrong, but isn't it the same thing? Also, what I did with TCL and LabVIEW through tcp/ip is use the Tcl "Socket" commands found in the Tcl manual. Either in LabVIEW or Tcl, I created a kind of "server" that listens for and acquires connections. I set Tcl up as the "server" and wrote a "client" in LabVIEW. When LabVIEW connected to Tcl (via address and port) I had Tcl take any string that I sent to it from LabVIEW and use an "EVAL" function to execute it as a tcl script. Only problem with this is, if I sent a command from LabVIEW such as "set i 1", then next one I sent is "puts $i", I would get an undefined variable error, which tells me that it opens, uses, and closes a new interpreter each time the "EVAL" command is used. But like I said, if you're looking at communicating via tcp/ip using Tcl, look for the "SOCKET" commands in the Tcl manual. I'm basically a self-taught programmer in all of the languages I know, so while I know some basic and advanced stuff, there are a lot of "holes" in between that I don't know. Quote Link to comment
Bryan Posted May 21, 2004 Author Report Share Posted May 21, 2004 Oh, and nevermind about my "G" question, I found it in the FAQ. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.