Jump to content

reentrant:which user pressed button


Recommended Posts

QUOTE(Mindstormer @ Aug 31 2007, 11:06 AM)

How is it possible to find out at the server side which client pressed a button on a reentrant vi?

thank you

Can we get some more info about this application, the best would be if you could upload the VIs and/or a picture.

It is more or less impossible to answer your question without any more information.

/J

Link to comment

QUOTE(JFM @ Aug 31 2007, 10:59 AM)

Can we get some more info about this application, the best would be if you could upload the VIs and/or a picture.

It is more or less impossible to answer your question without any more information.

/J

Ok, First I will explain what i want to achieve

I have a Reentrant vi and I published it with the web publishing tool. Now different clients can connect to it. To make it simple: on the vi is only a simple button. Now I want to know what the status of the button of every connected user/ip/client is. This information should be available at the server.

I added a reentrant vi with just one button.

thank you

Link to comment

QUOTE(Mindstormer @ Aug 31 2007, 07:58 AM)

Ok, First I will explain what i want to achieve

I have a Reentrant vi and I published it with the web publishing tool. Now different clients can connect to it. To make it simple: on the vi is only a simple button. Now I want to know what the status of the button of every connected user/ip/client is. This information should be available at the server.

I added a reentrant vi with just one button.

thank you

I have not played with this recently...

I believe reeentrant instance have unique references. If you track the references from each instance this may help you.

Another approach is to use templates (VIT) were each instance gets a unique name when opened.

Otherwise you will have to develop you VI's to "drop their own bread crumbs" so you can follow that path back home. :rolleyes:

Is thise the type of info you are after?

Ben

Link to comment

QUOTE(Ben @ Aug 31 2007, 12:24 PM)

I have not played with this recently...

I believe reeentrant instance have unique references. If you track the references from each instance this may help you.

Another approach is to use templates (VIT) were each instance gets a unique name when opened.

Otherwise you will have to develop you VI's to "drop their own bread crumbs" so you can follow that path back home. :rolleyes:

Is thise the type of info you are after?

Ben

thanks for the reply

The problem is that I searched in labview and on the internet how to get these reference to each instance. But I didnt found it. So you can narrow down my problem to just finding the instance reference from a clone from a reentrant vi. And then I probably can use this reference with vi server to monitor the status of the button.

I never worked with templates so I also will look further how it works

Link to comment

QUOTE(Ben @ Aug 31 2007, 12:58 PM)

I tried this but the property from vi server "this vi" always references to the original vi. So how do I get the reference to the cloned vi's?

Link to comment

QUOTE(Mindstormer @ Aug 31 2007, 10:58 AM)

I tried this but the property from vi server "this vi" always references to the original vi. So how do I get the reference to the cloned vi's?

Before we get into that mess, could you try the template appraoch first?

The behaviour of reentrant VI's has changed with LV 8.X and I am not able to recite the rules off-hand.

Ben

Link to comment

QUOTE(Ben @ Aug 31 2007, 03:06 PM)

Before we get into that mess, could you try the template appraoch first?

The behaviour of reentrant VI's has changed with LV 8.X and I am not able to recite the rules off-hand.

Ben

I dont exaclty understand how I should implement the template with the web publishing tool?And does the template need to be reentrant?

Link to comment

QUOTE(Ben @ Aug 31 2007, 03:42 PM)

I don't feel that I am serving you well. :(

In this nugget

http://forums.ni.com/ni/board/message?board.id=170&message.id=226491#M226491' target="_blank">http://forums.ni.com/ni/board/message?boar...=226491#M226491

I posted an example (see post #1) that shows you how to instaciate multiple instaces of a VIT.

Sorry about the lame replies. The Q will take time to answer and doing this while working is just not possible.

Ben

No no I am glad someone is trying to help me. I must leave now, but I will test this after I come back, and that will be monday. I will send u my email, and then you can add me to msn messenger

Link to comment

QUOTE(Mindstormer @ Aug 31 2007, 09:06 AM)

How is it possible to find out at the server side which client pressed a button on a reentrant vi?

thank you

I too am unqualified to chime in but your problem got me thinking.

Is the server launchin the re-entrant Vi's?

Reason I ask is there may be a way to get at the name of the instance if it is set up as a clone.

Maybe that could be used to get at the status of the button. (With Vi server)

Link to comment

QUOTE(TG @ Sep 2 2007, 03:47 AM)

I too am unqualified to chime in but your problem got me thinking.

Is the server launchin the re-entrant Vi's?

Reason I ask is there may be a way to get at the name of the instance if it is set up as a clone.

Maybe that could be used to get at the status of the button. (With Vi server)

yes the server has the clones in its memory so I know there must be a way possible. But I only dont know what way.

But maybe I gonna fix my solution with ASP.NET.I read that it cant be coupled to labview code. And I think with ASP it is possible to find out which user pressed a button

Link to comment
  • 3 weeks later...

QUOTE(tcplomp @ Sep 3 2007, 09:53 AM)

That post was what I was looking for I think, Now I did it with ASP. An example of asp code that is steering labview:

Set lvApp = CreateObject("LabVIEW.Application")

lvapp.BringToFront

VIPath = "c:\inetpub\wwwroot\test.vi"

Set VI = lvApp.GetVIReference(VIPath)

VI.FPWinOpen=True%>

<B>OS Name is :</B> <% =lvApp.OSName%><br>

<B>Target CPU is :</B> <% =lvApp.AppTargetCPU%><br>

<B>OS Version is :</B> <% =lvApp.OSVersion%><br>

<B>OS UserName is :</B> <% =lvApp.UserName%><br>

<%Set VI = lvApp.GetVIReference(VIPath)

Call VI.Call(ParamNames, ParamVals)%>

Degree C: <INPUT NAME="degc" SIZE="30" VALUE="<% =ParamVals(0)%>"><P>

Degree F: <INPUT NAME="degf" SIZE="30" VALUE="<% =ParamVals(1)%>"><P>

<INPUT TYPE=SUBMIT VALUE="Return">

<%set vi=nothing%>

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
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.