LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

Tags
(This content has not been tagged yet)
 
Reply to this topic Start new topic
> Passing data to teststand from labview 7.1?
martin zhxie
post Aug 19 2008, 07:51 PM
Post #1


4 more posts to go!


Member
Posts: 6
Joined: 19-August 08
From: Waterloo, Canada
Member No.: 12317
Using LabVIEW Since:2008
LV:7.0 ,7.0 ,.
China Canada Nothing Selected


Hi,

I am new to labview. Currently I am doing a automation romote control to a testing system through TCP/IP. The communication from teststand to labview has been done by using queue. It outputs some data. Now I need to pass these data back to teststand and do some caculation to them. Then loop them back to labview.

anyone can help?

thanks

Martin


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Aug 19 2008, 07:51 PM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
Tim_S
post Aug 20 2008, 01:23 PM
Post #2


Very Active
***

Member
Posts: 99
Joined: 23-February 06
From: Detroit, MI USA
Member No.: 4230
Using LabVIEW Since:1994
LV:8.0.1 ,8.5.1 ,7.1
United States Nothing Selected Nothing Selected


QUOTE (martin zhxie @ Aug 19 2008, 03:51 PM) *
I am new to labview. Currently I am doing a automation romote control to a testing system through TCP/IP. The communication from teststand to labview has been done by using queue. It outputs some data. Now I need to pass these data back to teststand and do some caculation to them. Then loop them back to labview.


You may want to look in the Code Repository and on NI's website. There are network communication schemes such as the Publish/Subscribe (http://forums.lavag.org/Publish-Subscribe-file122.html). I also recall running across a networked queue, but can't seem to locate where that was.

Tim


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
martin zhxie
post Aug 20 2008, 02:17 PM
Post #3


4 more posts to go!


Member
Posts: 6
Joined: 19-August 08
From: Waterloo, Canada
Member No.: 12317
Using LabVIEW Since:2008
LV:7.0 ,7.0 ,.
China Canada Nothing Selected


QUOTE (Tim_S @ Aug 20 2008, 09:23 AM) *
You may want to look in the Code Repository and on NI's website. There are network communication schemes such as the Publish/Subscribe (http://forums.lavag.org/Publish-Subscribe-file122.html). I also recall running across a networked queue, but can't seem to locate where that was.

Tim

Thanks for your info.

Eventhough, I use a TCP/IP connection, it acts both server and client on the same computer. I think that the problem is still between teststand and labview. (How to pass variable from labview to teststand where the variable initialized in teststand at first.)

Martin


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
TobyD
post Aug 20 2008, 06:14 PM
Post #4


Extremely Active
****

Premium Member
Posts: 451
Joined: 19-June 07
From: Everett, WA
Member No.: 8758
Using LabVIEW Since:2007
LV:8.6 ,8.5.1 ,8.2.1
United States Italy Nothing Selected


QUOTE (martin zhxie @ Aug 19 2008, 12:51 PM) *
I am new to labview. Currently I am doing a automation romote control to a testing system through TCP/IP. The communication from teststand to labview has been done by using queue. It outputs some data. Now I need to pass these data back to teststand and do some caculation to them. Then loop them back to labview.


This may be more simplified than what you are trying to do, but if you send a reference to the Sequence Context from TestStand into LabVIEW, you can directly access the TestStand Variables. I have attached a small vi to demo this. You will have to create a Locals.Numeric variable in TestStand and then call this vi from TestStand. Setup the inputs as shown in the picture below. When you run it, it should increment the Locals.Numeric variable by one (you'll have to watch the variable in the watch window to see this happen).

Attached File  TS_Var_Example.vi ( 30.33K ) Number of downloads: 69

Attached Image


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
martin zhxie
post Aug 20 2008, 09:01 PM
Post #5


4 more posts to go!


Member
Posts: 6
Joined: 19-August 08
From: Waterloo, Canada
Member No.: 12317
Using LabVIEW Since:2008
LV:7.0 ,7.0 ,.
China Canada Nothing Selected


QUOTE (TobyD @ Aug 20 2008, 02:14 PM) *
This may be more simplified than what you are trying to do, but if you send a reference to the Sequence Context from TestStand into LabVIEW, you can directly access the TestStand Variables. I have attached a small vi to demo this. You will have to create a Locals.Numeric variable in TestStand and then call this vi from TestStand. Setup the inputs as shown in the picture below. When you run it, it should increment the Locals.Numeric variable by one (you'll have to watch the variable in the watch window to see this happen).

Attached File  TS_Var_Example.vi ( 30.33K ) Number of downloads: 69

Attached Image


Right. This sounds close to what I need. The problem is that I am using a old version of labview. (7.1) could not open the 8.6 version vi. Is there a 8.6 version can be downloaded for free. Or do you have the sample vi in 7.1 version?


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
TobyD
post Aug 20 2008, 09:20 PM
Post #6


Extremely Active
****

Premium Member
Posts: 451
Joined: 19-June 07
From: Everett, WA
Member No.: 8758
Using LabVIEW Since:2007
LV:8.6 ,8.5.1 ,8.2.1
United States Italy Nothing Selected


QUOTE (martin zhxie @ Aug 20 2008, 02:01 PM) *
Right. This sounds close to what I need. The problem is that I am using a old version of labview. (7.1) could not open the 8.6 version vi. Is there a 8.6 version can be downloaded for free. Or do you have the sample vi in 7.1 version?


Sorry about that oops.gif

I can't save back to 7.1, but here is a screenshot (it's pretty simple) and a version saved in 8.0. Maybe someone else can save it back to 7.1 if the screenshot isn't enough for you to recreate it.

Attached File  TS_Var_Example.vi ( 136.64K ) Number of downloads: 50

Attached Image


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
martin zhxie
post Aug 21 2008, 08:30 PM
Post #7


4 more posts to go!


Member
Posts: 6
Joined: 19-August 08
From: Waterloo, Canada
Member No.: 12317
Using LabVIEW Since:2008
LV:7.0 ,7.0 ,.
China Canada Nothing Selected


QUOTE (martin zhxie @ Aug 20 2008, 05:01 PM) *
Right. This sounds close to what I need. The problem is that I am using a old version of labview. (7.1) could not open the 8.6 version vi. Is there a 8.6 version can be downloaded for free. Or do you have the sample vi in 7.1 version?



Oh, Thanks a lot. I've recreate the vi tried it. It works for me. Now I just need to convert it into my own program. Hope it will work in a loop and continously sends data between teststand and labview.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
TobyD
post Aug 21 2008, 08:50 PM
Post #8


Extremely Active
****

Premium Member
Posts: 451
Joined: 19-June 07
From: Everett, WA
Member No.: 8758
Using LabVIEW Since:2007
LV:8.6 ,8.5.1 ,8.2.1
United States Italy Nothing Selected


QUOTE (martin zhxie @ Aug 21 2008, 01:30 PM) *
Oh, Thanks a lot. I've recreate the vi tried it. It works for me. Now I just need to convert it into my own program. Hope it will work in a loop and continously sends data between teststand and labview.


Can you describe the flow of your program and the interaction between TestStand and LabVIEW? Maybe post a flowchart if you have one. I'm curious what you are trying to do. There may be a better way to do it.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Michael_Aivaliot...
post Aug 22 2008, 08:35 AM
Post #9


Confucius say: Crowded elevator always smell different to midget
Group Icon
*****

Admin
Posts: 2367
Joined: 13-October 02
From: Planet Earth
Member No.: 2
Using LabVIEW Since:1994
LV:8.5 ,8.2.1 ,7.1.1
Greece Canada United States My Blog My Gallery


QUOTE (TobyD @ Aug 21 2008, 01:50 PM) *
Can you describe the flow of your program and the interaction between TestStand and LabVIEW? Maybe post a flowchart if you have one. I'm curious what you are trying to do. There may be a better way to do it.

No, the solution TobyD presents is how you should pass data from LabVIEW to Teststand. It is the official NI party line sorta speak. Isn't that great? (that was sarcasm).

One thing to note is that this solution is typically used to pass data from a LabVIEW operator interface into TestStand, not for VI calls in a TestStand step, however there is nothing preventing you from doing this. Now the other question still left is how do you pass data from Teststand to LabVIEW. Well instead of a Set Property, you do a Get Property.

There is one more method not mentioned. You can use TestStand ActiveX Callbacks. This allows your LabVIEW operator interface to respond to a TestStand event and receive a payload of data via Custom UIMessages. Again, a best practice. See here.

--------------------


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
martin zhxie
post Aug 22 2008, 02:41 PM
Post #10


4 more posts to go!


Member
Posts: 6
Joined: 19-August 08
From: Waterloo, Canada
Member No.: 12317
Using LabVIEW Since:2008
LV:7.0 ,7.0 ,.
China Canada Nothing Selected


Actually I am using a queue to pass script command from teststand to labview. Then in labview, it reads the output of the script. The whole purpose is to use this output to compare with the value of a variable in the teststand. Then adjust the command and send it back to labview again.

I don't know how to attatch a screen shot here, so I paste it in the doc.

"Local.Numeric In" is the one that I want to send to teststand. I know if I merge the sequence context part into my program, it is not gonna work since I can not call this vi directly by wiring the connect panel. How about sending this refference separetly?
Attached File(s)
Attached File  SS_vi.doc ( 98K ) Number of downloads: 62
 


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
martin zhxie
post Aug 22 2008, 09:43 PM
Post #11


4 more posts to go!


Member
Posts: 6
Joined: 19-August 08
From: Waterloo, Canada
Member No.: 12317
Using LabVIEW Since:2008
LV:7.0 ,7.0 ,.
China Canada Nothing Selected


I just found out that I can actually wire the connect panel for sequence context and the refference with IP address and port number at the same panel. That should solve my problem.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Michael_Aivaliot...
post Aug 23 2008, 12:54 AM
Post #12


Confucius say: Crowded elevator always smell different to midget
Group Icon
*****

Admin
Posts: 2367
Joined: 13-October 02
From: Planet Earth
Member No.: 2
Using LabVIEW Since:1994
LV:8.5 ,8.2.1 ,7.1.1
Greece Canada United States My Blog My Gallery


That diagram and your last reply makes no sense to me but the important thing is that it works for you and you can move on. have fun.

--------------------


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic

 




Time is now: 1st December 2008 - 11:34 PM