LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

network stream from cRio to host

Hi,

 

I stream data from the RT host (cRio 9024) to my host computer. The streaming is working and data in being transferd, but I got the following two problems:

 

1. The data stream is working and in the Host Vi the Property "Is Connected" has the value "true" as it should be. At the same time the Property "Is Connected" on the RT host has the value "false". Is this property not available/accessible on the RT host? (got the code of the RT host in the screenshot)

 

2. My second question is about the URL of the reader endpoint on the Host computer. The URL "//130.83.27.15/reader_NI_9239" with the IP of my host computer is working if the VI is also executed on the host computer. If it runs on the cRio RT processor the URL doensn't seem to be sufficient and no network stream is created. Also there in only one application running on the host.Is there something missing in the URL?

0 Kudos
Message 1 of 4
(2,979 Views)

Hi,

 

please always post executable code so everybody can really see what you are doing. So please attach a (simplified) project and at least VIs for your host and target.

 

Best regards,

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
0 Kudos
Message 2 of 4
(2,908 Views)

I uploaded the project and the two VI's (one runs on cRio9024, the other on my computer).

 

Problems:

-"Is connected" just show true on computer VI, not on cRio VI

- With the reader URL I cannot create a network stream (maybe wrong URL, with writer URL it works)

0 Kudos
Message 3 of 4
(2,898 Views)

Hi,

 

the "connected" can be used on the RT too, but both values dont have to be synchronized (afaik the connection is just a timeout, so you only get the information after a few seconds after the connection has been severed.

 

In your case I would want to make sure that the property node that you read from has no error wire coming in that transports an error (status==TRUE), in this case the output of the properties would be the default value, so FALSE.

In your case you might want to look into the property "Available Elements for Reading". You can not use the property there since this a a Network Stream Writer so you can only check the number of elements to write.

If you would have connected the error cluster you would have received the corresponding error code.

 

Please improve your coding style for better readability and error handling:

LabVIEW Style Checklist - LabVIEW 2017 Help - National Instruments
http://zone.ni.com/reference/en-XX/help/371361P-01/lvdevconcepts/checklist/

 

Best regards,

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
Message 4 of 4
(2,885 Views)