Tags |
(This content has not been tagged yet)
|
![]() |
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 ,.
|
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
|
||
|
|
|||
| Ad |
Aug 19 2008, 07:51 PM
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
|
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
|
||
|
|
|||
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 ,.
|
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
|
||
|
|
|||
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
|
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).
TS_Var_Example.vi ( 30.33K )
Number of downloads: 69
|
|||
|
|
||||
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 ,.
|
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).
TS_Var_Example.vi ( 30.33K )
Number of downloads: 69Right. 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?
|
|||
|
|
||||
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
|
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 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.
TS_Var_Example.vi ( 136.64K )
Number of downloads: 50
|
|||
|
|
||||
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 ,.
|
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.
|
||
|
|
|||
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
|
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.
|
||
|
|
|||
Aug 22 2008, 08:35 AM
Post
#9
|
|||
![]() Confucius say: Crowded elevator always smell different to midget 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
My Blog
My Gallery
|
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. --------------------
|
||
|
|
|||
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 ,.
|
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)
|
||
|
|
|||
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 ,.
|
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.
|
||
|
|
|||
Aug 23 2008, 12:54 AM
Post
#12
|
|||
![]() Confucius say: Crowded elevator always smell different to midget 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
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.
--------------------
|
||
|
|
|||
![]() ![]() |
| Time is now: 1st December 2008 - 11:34 PM |