LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RT Restart Target.vi - what is the communication protocol?

Hello,

 

After gathering some information, I found that The Python script uses the IP address of the controller to restart the RIO. It was created for internal use and is therefore not supported. Feel free to open the script to see what is happening.

 

Regards,

Patricia

National Instruments
Applications Engineer
0 Kudos
Message 11 of 19
(1,784 Views)

Based on the information in the python scripts and a wireshark capture, I created my own reboot RT vi. It is possible to reboot RT through UDP or TCP. UDP uses broadcasts and this will only work if the system is on the same subnet. I have to reboot a remote system on a different subnet so I have to use TCP. For the reboot the MAC address of the remote system has to be known, but it is possible to request it by sending a Discovery request first. My vi modifies the Discovery response to create a Reboot request (command 0x0A). TCP communication uses port 44516.

 

Message 12 of 19
(1,773 Views)

@Theo wrote:

Based on the information in the python scripts and a wireshark capture, I created my own reboot RT vi. It is possible to reboot RT through UDP or TCP. UDP uses broadcasts and this will only work if the system is on the same subnet. I have to reboot a remote system on a different subnet so I have to use TCP. For the reboot the MAC address of the remote system has to be known, but it is possible to request it by sending a Discovery request first. My vi modifies the Discovery response to create a Reboot request (command 0x0A). TCP communication uses port 44516.

 


Hi,

 

I am trying to deploy the algorithm you used in Reboot RT.vi on another platform.

I'm a little confused.

 

1. I see a string "Reboot Command" in the vi. And then there is a display of "Reboot Request". Are they the same?

2. The string with hex numbers (label Reboot Request) ....that is exactly the hex numbers that you send to the target?

...because the algorithm seems to use the Discovery Result and just inserts the byte 0x0A between position 2 and 3. And that is the "Reboot Command". Or am I something missing here? What happens with alle the non zero digits in the middle of "Discovery Result"?

 

(I'm new to labview!)

0 Kudos
Message 13 of 19
(1,627 Views)

Hi,

 

The Reboot Request is basically the same as the Reboot Command indicator. I discovered that the Reboot Request has to send the MAC address of the RT system with the request, that's why you first have to send a Discovery Request to obtain it. It will not work if you just send the Reboot Request string constant.

The Discovery Result string contains the system name, serial number and also the MAC address. If you change the Discovery Result string to Normal Display instead Hex Display you can see the system name "NI-cRIO9075-016637E8". I just replace the command code with 0x0A to convert the Discovery Result in a Reboot Request and send it.

 

I attached a php script that does the same.

 

 

0 Kudos
Message 14 of 19
(1,619 Views)

@Theo wrote:

Hi,

 

The Reboot Request is basically the same as the Reboot Command indicator. I discovered that the Reboot Request has to send the MAC address of the RT system with the request, that's why you first have to send a Discovery Request to obtain it. It will not work if you just send the Reboot Request string constant.

The Discovery Result string contains the system name, serial number and also the MAC address. If you change the Discovery Result string to Normal Display instead Hex Display you can see the system name "NI-cRIO9075-016637E8". I just replace the command code with 0x0A to convert the Discovery Result in a Reboot Request and send it.

 

I attached a php script that does the same.

 

 


Thank you Theo!

 

I could successfully deploy your algorithm with a C# .NET 4.5 programm.

 

Does this also work if the controller requires some kind of authentication in the context of some NI Safety Context?

 

0 Kudos
Message 15 of 19
(1,599 Views)

I'm not sure it this works if authentication is enabled, we don't use that in our enviroment. I guess you should try :-).

0 Kudos
Message 16 of 19
(1,586 Views)

I believe the VI described here is on a legacy RT Utilities palette that's been deprecated for a couple of years. You should use NI System Configuration which is fully supported on Windows 32-bit and 64-bit and can reboot any NI target (Pharlap, VxWorks, or Linux RT).

0 Kudos
Message 17 of 19
(1,567 Views)

@Dan_Mondrik wrote:

I believe the VI described here is on a legacy RT Utilities palette that's been deprecated for a couple of years. You should use NI System Configuration which is fully supported on Windows 32-bit and 64-bit and can reboot any NI target (Pharlap, VxWorks, or Linux RT).


does it offer some kind of API or dll which I can use to reboot NI Targets from my own programm code?

0 Kudos
Message 18 of 19
(1,562 Views)

I guess I was a bit too terse. We were able to deprecate the old RT Utilities palette precisely because NI System Configuration offers a public API for LabVIEW, C (CVI), and C# (Measurement Studio).

 

In recent versions of LabVIEW, the VI appears both under the Measurements palette (which is a replacement for some old MAX-specific APIs that lived there) as well as the RT Utilities palette.

 

If you're not sure if you have the API installed, the most recently released version is 14.5 and supports LabVIEW 2011 and higher. Here's a link to the English installer:

http://www.ni.com/download/ni-system-configuration-14.5.0/5158/en/

Message 19 of 19
(1,556 Views)