Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

flatten to json causes sb-rio to disconnect

Hi there, I'm having a problem that I've never seen before and was hoping that somone could shed some light on it.

 

I have been using a vi with the following code on my 9606 single board rio.

ssxml.png

This vi sends data to a web service and works as I would expect in the above format. However, I was wanting to change from using xml to using json. I swapped the two 'flatten to xml' vis with 'flatten to json' vis, and kept everything else the same, so now my code looks like this.

ssjson.png

However, when I run this code, it seems to affect my sb-rio somehow. It seems to deploy fine at first, but then when the vi starts running I get a message saying that the connection to the target has been lost.

ssconnection.png

After this point my software will no longer connect to the sb-rio and when I connect to it via MAX I see that it says "safe mode - Software error". I have to restart the device in order to be able to connect to it again.

ssmax.png

I have repeated this several times, changing it back to 'flatten to xml' and it works fine. Change it to 'flatten to json' and it disconnects and puts the sb-rio in this 'safe mode'. Nothing else is changing that I can see in between tests.

 

Does anyone know what might be causing this issue and how to fix it?

 

Thanks in advance

 

 

0 Kudos
Message 1 of 3
(4,904 Views)

Hello vascibean, 

 

I have understood that you have made no changes what so ever to the hardware/software connections while changing the functions from 'Flatten to XML' to 'Flatten to JSON'. When use the former function, you establish the connection between your 9606 single board RIO and the code works as expected. This is not true when using the 'Flatten to JSON' function. 

 

Could you let us know what version of LabVIEW you're using as we may have come across this problem or something similar previously. You could try altering the code so that the 'data' control is a cluster input.  The following manual gives a breif description of what this function can accept as its inputs. 

(http://zone.ni.com/reference/en-XX/help/371361K-01/glang/flatten_to_json/)

 

If this does not resolve the problem and you still get problems establishing a connection with the amended code let me know and we will look further into it. 

 

Hope this helps, 

 

Shazil M.

Application Engineer
National Instruments 

Shazil M.
CLAD
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 2 of 3
(4,877 Views)

Hi Shazil and thanks for your reply.

 

For now we have just decided to stick with using xml instead - which we know works, but for your information I am using LabVIEW 2013 and the 9606 single board rio has 'NI CompactRIO 13.0 - August 2013' installed on it.

 

vascibean

0 Kudos
Message 3 of 3
(4,875 Views)