Jump to content

An introduction and a couple questions.


Bryan

Recommended Posts

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

Link to comment
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?

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.