04-06-2016 01:47 AM
hi,
I'm using LabVIEW 2014 on Windows 7. I have a project which is developed to be a client GUI (192.168.1.208). This GUI communicates with an RT application (192.168.1.206) running on LV RT OS and the two are connected with a network. The NSV (network shared variables) are hosted at RT side (SVs is on RT side project/application). This part (communication and all) is working fine.
Now another part is data logging. For which NSV (hosted in GUI project) are used to communincate strings (of events with data) to a computer running data logging server from this PC (192.168.1.208). Please Note here, presently same PC (192.168.1.208) has been used for data logging server implementation but later there may be new PC that's why NSVs are used. I gave this information in case there may be any problem (are chances though).
I created an application (*.exe) and installer for GUI project. Data logging from this PC (192.168.1.208) if I use any of options- project/*.exe/installer works expectedly. but when I try to install this installer into another PC on the network which doesn't have any NI services installed it gives following error while installing:
Deploying Shared Variables.lvlib\\192.168.1.109\Shared Variables deployment failed (error: -1967362042, OS and Network Services: (Hex 0x8ABC7006) Unable to start service.).
I have experimented nearly all variations in building installer and .exe for it but couldn't get rid of this error.
I also want to know how would a PC not having NI services/programs installed would host NI Shared Variable Engine. Although for implementing Run Time Engine into the application we are giving option while building .exe. But not for SVE.
I have wasted many weeks over this issue so urgent help would be very much appreciated.
Thanks.
Solved! Go to Solution.
04-06-2016 05:19 AM - edited 04-06-2016 05:22 AM
NSVs work by having a copy of the NSV engine running on all applications that read/write to NSVs and they then communicate between each other asynchronously (and you just read from LV when your application makes the calls). You will need to make sure you have the required NSV components installed on the logging machine. If you try including the 'NI Variable Engine' and 'NI Logos', does it work then?
Also - how are you using strings for sending events via shared variables? I would have thought that network streams would be more suitable as they are lossless (NSVs only retain the latest value).
04-06-2016 07:23 AM
Thanks Sam_Sharp,
--- You will need to make sure you have the required NSV components installed on the logging machine.
> The machine, on which I want to install the setup (for data logging) built from PC having LV2014 (this pc has project and working fine with data logging and RT communincation via shared variables), I guess you are right doesn't have 'NI Variable Engine' and 'NI Logos'. The only engine I found while building installer was LV RunTime Engine and none other. Can you please tell how to get it on the list (while building installer).
--- Also - how are you using strings for sending events via shared variables? I would have thought that network streams would be more suitable as they are lossless (NSVs only retain the latest value).
> Yes you may very right that network streams would be more suitable for lossless data transmission and NSV may tend to miss some data. Actually I wasn't much aware about NSs at the time I started and the events are not very critical. I would look into this as well if I can convert all project from NSV to NS. How I do it:
On GUI, using event structure an event is recognised and encoded into a string using a VI. The encoding is simply 1/0+parameter name+associated data and an NSV is updated with this string. Here 1 means an event has occurred otherwise a 0 is sent at loop rate (~0.5s) meaning no event. As an event occurs at GUI, it waits for its acknowledgement from server (before letting other event to occur-case change) which again set GUI in its normal event detection mode. At server end, this NSV is continuously checked for 1 in first position (which means an event occured) and when it gets that, the string is decoded and the parameter is checked if it has to be logged. If it has to be logged it is logged in a file on that PC HD (all in 500ms) and an acknowlegement (through NSV) is sent back to GUI (to keep the NSV value same a wait has been added in case of an event). After that the acknowledgement is also changes to normal state so as not to acknowledge any event which has not been logged.
I know something else could also have been done. And any other suggestions are welcome, please tell any other way to do it simply (one has already been told as NSs).
04-06-2016 09:09 AM
If you untick the 'automatically select installers' option in the installer build specification, it should give you the full list of installers you can include. It's a bit weird that it hasn't detected the requirement for NSVs though.
I do think that you're making life difficult for yourself by trying to do some weird handshaking with strings/NSVs - NSVs are 'tag' based data - they're good for reading the latest value of a signal/variable. If you want to send messages around - use Network Streams, TCP/IP - there's even something like the Simple Messaging Reference Library (STM) - http://www.ni.com/example/27739/en/
04-11-2016 12:19 AM
Thanks Sam_Sharp,
For your quick and informative reply.
As it was in automatically selecting mode so only Run-Time Engine and not other engines were appearing and I couldn't think of this option. I think now it'll work I'll test and post.
I wasn't aware of the N/W Streams option although I knew communication via TCP/IP but I thought that would be tough. I'll change it to the standard message communication ways. Thanks for that too.