Shutdown OPAL

advertisement
OPAL-RT Quick Start Guide
Keith Kukolich
Field Applications Engineer
OPAL RT Technologies, Inc.
May 5, 2009
OPAL-RT Quick Start Guide
1
Keith Kukolich
Table Of Contents
Shutdown OPAL-RT target ................................................................................................ 3
Reboot OPAL-RT target ..................................................................................................... 4
Failed Shutdown or Target not responding procedure........................................................ 5
How to Ping the target to verify that it is up and a model can be loaded ........................... 7
How to Ping Target from the Start Menu: ........................................................................ 11
Telnet to the OPAL-RT target: ......................................................................................... 13
Kill Processes running on QNX target ............................................................................. 14
How to manually FTP files from Host PC to OPAL-RT target: ...................................... 19
Target Management Basic Commands: ............................................................................ 23
OPAL-RT Quick Start Guide
2
Keith Kukolich
Shutdown OPAL-RT target
1. Goto Start Menu > Run.
Enter telnet 192.168.10.101
2. Telnet session will open up. This is your telnet login into QNX on your target.
Login: root
3. Enter shutdown –fb to shutdown the QNX OPAL-RT target computer.
4. Wait 1 minute for QNX shutdown after shutdown command. On OPAL-RT target,
manually flip the POWER switch labeled ‘PWR’.
OPAL-RT Quick Start Guide
3
Keith Kukolich
Reboot OPAL-RT target
1. Goto Start Menu > Run.
Enter telnet 192.168.10.101
2. Telnet session will open up. This is your telnet login into QNX on your target.
Login: root
3. Enter shutdown –f to reboot the QNX OPAL-RT target computer.
4. Wait a few minutes for QNX Target to startup again.
OPAL-RT Quick Start Guide
4
Keith Kukolich
Failed Shutdown or Target not responding procedure
1, If the target will not close from RT-Lab and there is a Controller exe running not
allowing you to close the model. Close Controller Window
Note:
You can open Controller.exe this from lower toolbar:
If the Controller does not open, right click on RT icon on System Tray and Select
Display Controller(s)
Do not close out controller window while model is running. This will process
handles the interaction between the model running on the QNX target and the
LabVIEW API interface.
OPAL-RT Quick Start Guide
5
Keith Kukolich
2. Verify that there are no longer Controller.exe processes running. From Windows Taks
Manager, Select Processes Tab. Highlight Controller.exe processes and Select: End
Process.
3. On OPAL-RT target, manually flip the RESET switch. Wait 5 minutes for the target
to reboot or verify that it is up by pinging the target, so that you can re-load the FS3
model.
4. Verify that RT-Lab MetaController is running on the Taskbar:
OPAL-RT Quick Start Guide
6
Keith Kukolich
How to Ping the target to verify that it is up and a model can be loaded
1. Double Click RT-Lab MainControl icon.
2. Right-Click on Open Model. Select Model Path
Note:
You can also Left click on Open Model to Browse for the location of the .mdl
file
OPAL-RT Quick Start Guide
7
Keith Kukolich
3. Click on Assign Nodes.
4. Highlight S01 Node and Click Ping.
OPAL-RT Quick Start Guide
8
Keith Kukolich
5. If the target OPAL_TARGET_1 is properly running, the following window should
appear.
6. Load Model using RT-Lab and Simulink:
OPAL-RT Quick Start Guide
9
Keith Kukolich
7. Execute Model using RT-Lab and Simulink:
OPAL-RT Quick Start Guide
10
Keith Kukolich
How to Ping Target from the Start Menu:
1. Click Start Menu from the Desktop. Select Run.
2. Enter:
ping 192.168.10.101
OPAL-RT Quick Start Guide
11
Keith Kukolich
3. This ping window shows the target properly responding to a Ping.
OPAL-RT Quick Start Guide
12
Keith Kukolich
Telnet to the OPAL-RT target:
1. Goto Start Menu > Run.
Enter telnet 192.168.10.101
2. Telnet session will open up. This is your telnet login into QNX on your target.
Login: root
3. You can now enter command line commands for QNX target. Such as: ps –A, pwd, cd,
SEE END OF DOCUMENT FOR LIST OF TARGET COMMANDS
OPAL-RT Quick Start Guide
13
Keith Kukolich
Kill Processes running on QNX target
Question
How do you kill a process running on a QNX target from HOST PC or Target PC? The
RT-Lab Main Control mentions that I cannot load another model on the QNX target
because I already have 1 model running.
Answer
1.Telnet into QNX target (Or log into QNX target directly using login: root)
Goto Start Menu > Run.
Enter telnet 192.168.10.101
 This is the IP address of your QNX target
* Telnet:
2. Telnet session will open up. This is your telnet login into QNX on your target.
Login: root
OPAL-RT Quick Start Guide
14
Keith Kukolich
* telnet window:
3. In command line, Enter ps –A to show processes that are currently running on the
QNX target:
# ps -A

processes:
4. To stop a certain process like a model that may still be running, enter kill [PID #]
For example:
#kill 22532123
OPAL-RT Quick Start Guide
15
Keith Kukolich
This command will kill the Simulink model from directory /home/rapter/main (c)/opalrt/.. that is currently running.
5. To make sure that the process stops running, enter ps –A to verify that the process has
been stopped.
#ps –A
OPAL-RT Quick Start Guide
16
Keith Kukolich
Display Target Info
Question
How do I display Target Info for my specific Target Node?
Answer
Use Target Info Button from Assign Nodes window: Select Target Node and press
Button:
This will return the following commands:
Saving output in :
C:\OPAL-RT\RT-LAB8.3.0\common\python\rtlab\diagnostic\TargetInfo.txt
Executing Commands:
/usr/opalrt/common/bin/flash_update –bim
ls -lo /usr/opalrt
uname -a
ps -A
OPAL-RT Quick Start Guide
17
Keith Kukolich
ifconfig -a
pidin info
pci -v
ls -lo /var/dumps
ls /dev
End of script...
OPAL-RT Quick Start Guide
18
Keith Kukolich
Python Scripts to Shutdown Target, Reboot Target, and Get Target Info:
Double click on Python script to either Shutdown Target, Reboot Target, and Get Target
Info:
These Python Scripts are tied within each script to the Fixed IP address of the Target
Node:
To edit and change IP address of Target, Right click and select: Edit with Idle
HOST = "192.168.10.102"
user = "root"
password = ""
OPAL-RT Quick Start Guide
19
Keith Kukolich
Change IP address to that of your Target:
OPAL-RT Quick Start Guide
20
Keith Kukolich
How to manually FTP files from Host PC to OPAL-RT target:
1. From the Start Menu > Select My Computer.
2. In the Address line, enter ftp://192.168.10.101/
OPAL-RT Quick Start Guide
21
Keith Kukolich
Note: If Windows asks for user and password, user: ntuser password: ntuser.
3. You can copy, drag, and move files to the target like a normal Windows Explorer
window.
On the OPAL-RT QNX target, this directory is /home/ntuser/.
OPAL-RT Quick Start Guide
22
Keith Kukolich
Target Management Basic Commands:
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
find Searches the named directory and it"s sub-directories for files. Most
frequently called like this: find ./ -name "t*" -print Which searches the current
directory ( and all of its sub-directories ) for any files that begin with the letter "t"
and then prints them out. If you are looking for a specific filename, then replace
"t*" with "filename", and "find" will print out all incidences of this file.
ls {directory} Shows directory listing. If no "directory" is specified, "ls" prints
the names of the files in the current directory. The Command : ls –lo /usr/opal-rt
gives you the versions of RT-LAB installed on your target
cp {filename(s)}{path} Copies files from one directory/filename to another. "cp
f1 f2" makes a file "f2" identical to "f1". "cp *.c src/" copies all files that end in
".c" into the "src" subdirectory.
rm filename(s) Removes files. Careful with this one - it is irreversible. It is
usually aliased ( in a user"s .cshrc file ) to "rm -i" which insures that "rm" asks
you if you are sure that you want to remove the named file.
mkdir dirname Makes a sub-directory named "dirname" in the current directory.
pwd Shows current working directory path.
mv Moves files
uname –a Tells you the QNX version of your target
pci –v | less Tells you all the pci card in your target system
pidin info Tells you information about your computer’s memory and processor
speed
chmod {options} Changes the permission modes of a file.
vi: Runs the screen oriented text editor named "vi". If a filename is specified, you
will be editing that file. Type "[ESC]:q!" to exit without making any changes.
You could check basic VI commands on
http://www.la.unm.edu/computer/docs/basic_vi.shtml#modes
ifconfig –a Gives your network setting information. If you want to change the IP
address of your target, you need to edit the net.cfg file located in the etc directory
shutdown –f reboots QNX target
shutdown –fb shutdown QNX target
OPAL-RT Quick Start Guide
23
Keith Kukolich
Download