superslug Posted March 28, 2007 Report Share Posted March 28, 2007 I want to use datasockets to communicate between 2 vi's. I have them working fine except that i have to manually start the datasocket server. For development this is fine but to deploy the code I need to be able to do this automatically. Can it be done programatically or somehow in the exe for an application? thanks Quote Link to comment
Jonas Posted March 28, 2007 Report Share Posted March 28, 2007 QUOTE(superslug @ Mar 27 2007, 02:59 AM) I want to use datasockets to communicate between 2 vi's. I have them working fine except that i have to manually start the datasocket server. For development this is fine but to deploy the code I need to be able to do this automatically. Can it be done programatically or somehow in the exe for an application? thanks You can find Launch DS Server if Local URL.vi in ..\Program Files\National Instruments\Labview x\examples\comm. Or with find examples. Quote Link to comment
REM1 Posted March 28, 2007 Report Share Posted March 28, 2007 QUOTE(superslug @ Mar 26 2007, 07:59 PM) I want to use datasockets to communicate between 2 vi's. I have them working fine except that i have to manually start the datasocket server. For development this is fine but to deploy the code I need to be able to do this automatically. Can it be done programatically or somehow in the exe for an application? thanks Any particular reason for using the datasocket server as opposed to shared variables? Quote Link to comment
superslug Posted March 29, 2007 Author Report Share Posted March 29, 2007 QUOTE(REM1 @ Mar 28 2007, 05:28 AM) Any particular reason for using the datasocket server as opposed to shared variables? Being able to plug the datasocket straight into the front panel object was what I wanted. I am updating graphs on the main vi from a sub vi and using the references with property nodes was being processor intensive so my boss suggested that I use datasockets to see if that could reduce the load on the processor. Also I am under the impression that with a datasocket the data posted will only be read once by a particular subscriber and I didn't know whether or not this was the case with shared variables. Quote Link to comment
REM1 Posted March 29, 2007 Report Share Posted March 29, 2007 QUOTE(superslug @ Mar 27 2007, 08:13 PM) Being able to plug the datasocket straight into the front panel object was what I wanted. I am updating graphs on the main vi from a sub vi and using the references with property nodes was being processor intensive so my boss suggested that I use datasockets to see if that could reduce the load on the processor.Also I am under the impression that with a datasocket the data posted will only be read once by a particular subscriber and I didn't know whether or not this was the case with shared variables. The front panel connection mechanism does not require the use of the datasocket server. You can make a front panel connection to a shared variable in exactly the same way. Furthermore, the correction mechanism is the same in each case. The FPDS connection will subscribe to updates from the respective server and will be modified only when the value changes rather than constantly polling. So, up to this point, there is no difference between the two. Where the difference comes in is the server and the transport mechanism. PSP, the transport mechanism for the shared variable, is faster than DSTP, the transport mechanism for the datasocket server. It is also the case the the server for shared variables is already running on your system whereas the datasocket server would have to be started adding an additional executable for the OS to deal with. Lastly, the shared variable is the newer of the two technologies meaning that future improvements are more likely to be made there rather than the datasocket server. Quote Link to comment
superslug Posted March 30, 2007 Author Report Share Posted March 30, 2007 QUOTE(REM1 @ Mar 29 2007, 07:21 AM) The front panel connection mechanism does not require the use of the datasocket server. You can make a front panel connection to a shared variable in exactly the same way. Furthermore, the correction mechanism is the same in each case. The FPDS connection will subscribe to updates from the respective server and will be modified only when the value changes rather than constantly polling. So, up to this point, there is no difference between the two. Where the difference comes in is the server and the transport mechanism. PSP, the transport mechanism for the shared variable, is faster than DSTP, the transport mechanism for the datasocket server. It is also the case the the server for shared variables is already running on your system whereas the datasocket server would have to be started adding an additional executable for the OS to deal with. Lastly, the shared variable is the newer of the two technologies meaning that future improvements are more likely to be made there rather than the datasocket server. ok, cool. I will look into that. Quote Link to comment
superslug Posted April 5, 2007 Author Report Share Posted April 5, 2007 I have linked a shared variable directly to an xy graph to communicate between 2 vi's. When the XY graph updates it flashes the data up then it disappears until the next update. Has anyone encountered this sort of problem before. Is it some sort of setting that I have wrong? Quote Link to comment
REM1 Posted April 5, 2007 Report Share Posted April 5, 2007 QUOTE(superslug @ Apr 4 2007, 12:38 AM) I have linked a shared variable directly to an xy graph to communicate between 2 vi's. When the XY graph updates it flashes the data up then it disappears until the next update. Has anyone encountered this sort of problem before. Is it some sort of setting that I have wrong? If you use a graph you have to feed in all the data yourself...so you would need to build up an array of the data you got from the variable and feed it to the graph. Use a chart and it will keep track of the previous data itself. Quote Link to comment
Mellroth Posted April 5, 2007 Report Share Posted April 5, 2007 QUOTE(superslug @ Apr 4 2007, 07:38 AM) I have linked a shared variable directly to an xy graph to communicate between 2 vi's. When the XY graph updates it flashes the data up then it disappears until the next update. Has anyone encountered this sort of problem before. Is it some sort of setting that I have wrong? Hi, As REM1 is saying you should probably use a Chart instead of a Graph. However, I don't think that this is your problem, because you say that data "disappears until the next update". If the graph goes blank you are probably getting false updates, meaning that you either update the graph or the shared variable with invalid data. Regarding settings, it is very hard to say anything without looking at your code. /J Quote Link to comment
superslug Posted April 6, 2007 Author Report Share Posted April 6, 2007 The XY graph is showing a plot of movement which is why I went for the graph over the chart. The error i was getting that I was reading faster then a full sentence arrived and going through a case that produced empty data. thanks for the advice anyway. 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.