08-28-2018 12:48 AM
Hi,
I created 2 VIs to collect and analyze data. The host VI, see attached Host VI, is using NI 9048 to collect data from the accelerometer. The data is then transferred to the local computer VI, see attached Local Computer VI, to do some analysis. Yet, when I ran the host VI, the local computer VI does not respond. I am sure the path is correct, see attached Dashboard. There is no error message pops up either. Please advise what will be the possible cause. Thank you!
08-28-2018 01:21 AM - edited 08-28-2018 01:24 AM
Hi Drakelau,
you use the same IP address for both endpoints of the stream.
Your cRIO and the local PC should use different IPs…
- Why do you use a network shared variable together with a network stream? Why not use just one of them?
- Why don't yo cleanup your block diagrams?
- Why is there no button to stop the "host" VI on your local computer?
09-01-2018 03:24 PM
Hi GerdW,
Thank you for your comments.
I have fixed my VI to use just network stream.I believe I only need one url for either end point (I tried both, but won't make any difference). The stop button is connected to the DAQ Assistant.
But, I still have difficulty to transfer my data from writer to reader (PC). I also attached my VIs in here. Really appreciated for any hints.
Thanks,
Drake
09-02-2018 04:32 PM
Hi GerdW,
Follow up with my previous reply. I created another set of VI to transfer integer from RT (writer) to PC (reader). Yet, it doesn't seem transfer any data. It seems like the RT is not connected to PC somehow. Do you know possible causes? I have attached my VIs in here.
Thank you,
Drake
09-02-2018 06:55 PM
For a LabVIEW-RT Project I first developed with LabVIEW 2011, I used four Network Streams to communicate between a PC Host and PXI RT Target (two Streams were for Host/Target two-way communication, and the other two were data streams from Target to Host). I looked at how I configured the Reader/Writer names, and found that I had an additional Field that you are missing. For example, Target/Data/Writer and //URL/Host/Data/Reader. If you look at the Help for the Create Network Stream Endpoint functions, you can find a link to Help for creating the Reader and Writer names and segments.
I can't say that the extra segments are necessary, but when I used them, I had no trouble getting Network Streams to work.
Bob Schor
09-06-2018 09:38 PM
Hi Bob,
Thank you for the reply. I used your suggestion and adjusted my VIs. But, I still couldn't make it work. See attached snippets. Please also let me know if I did what you had suggested.
Best,
Drake
09-06-2018 10:32 PM
When we say "Snippets" in LabVIEW, we don't mean "ordinary pictures that require someone to look at the picture and, by hand, generate the LabVIEW code". We mean a "LabVIEW Snippet", which (if done with a little incantation) can automagically turn into LabVIEW code, saving us, the unpaid Forum members, a lot of time and effort.
Since you don't know how to make LabVIEW Snippets, attach code, files with the extension .vi. That I can view much easier, can edit, can run, etc. I'm not going to waste my time on (you'll forgive the phrase) "mere pictures of code". Besides, it's time for bed ...
Bob Schor
09-07-2018 12:42 AM
Hi Bob,
Thank you for giving me the suggestion to properly post a question. I thought pictures are easier to open and view since we might have different versions of labview. But, I attached my VI files here (Version 18). Any suggestion will be appreciated.
Have a good night!
Drake
09-07-2018 09:35 PM
I'm confused. You have both the Reader and Writer on localhost, namely the PC running LabVIEW. Are you not using TCP/IP and connecting two boxes, your PC and your cRIO with an Ethernet cable? This means that you can't have //localhost for everything. Go back and read the "Specifying Network Stream Endpoint URLs" in the LabVIEW Help again.
Bob Schor
09-10-2018 01:53 AM
Hi Bob,
Can you elaborate the writer/reader naming a little bit more? When you say Target/Data/Writer and //URL/Host/Data/Reader, does target the same as host? What does data represent? According to the help page: Specifying Network Stream Endpoint URLs, the complete end point name for streaming to a computer that runs one application is "//host_name:context_name/endpoint_name", where
host_name = localhost (can be omit) / URL (172.22.11.2)
context_name = not applicable since use only one application
endpoint_name = reader / writer
Target or Host = My Computer or NI-cRIO-9048
Data = Drake_Reader VI / Drake_Writer VI
Please let me know if I interpreted your explanation correctly. I also attached the project file picture here for easy to see where I retrieve the names.
Thank you,
Drake