UEISIM Desktop
-
Upload
frederic-villeneuve -
Category
Software
-
view
129 -
download
0
description
Transcript of UEISIM Desktop
![Page 1: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/1.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
UEISIM Desktop
![Page 2: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/2.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
Overview
The UEISIM is a Linux based system that runs Simulink models.
UEISIM Desktop allows remote monitoring and parameter tuning while a model is running.
![Page 3: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/3.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
Remote monitoring/Parameter tuning
• External mode:• Use Simulink itself as client to connect to the
UEISIM target.• UEISIM Desktop:
• A client written in C#, C/C++ or LabVIEW can display the model’s signals and parameters without Simulink being installed.
• Signals and parameters are also accessible via a web page.
![Page 4: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/4.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
Extra features (UEISIM desktop only)
• Remotely start/stop simulation• Host PC client can start or stop simulations
remotely• Timing statistics:
• Average simulation step execution time• Minimum step execution time• Maximum step execution time• Model execution time
![Page 5: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/5.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
UEISIM
Simulation executable
LibSharedData
Client application
PC #2
Client Application
UeiSimTarget.dll
PC #1
Web browser
LibSharedData
Shared Data protocol
![Page 6: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/6.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
Shared data protocol• Implements a simple message based
protocol (set/get variable) using JSON or binary data representation
• Local processes communicate over UNIX sockets
• Remote processes communicate over TCP/IP sockets
• Web browser communicate over Web Sockets
![Page 7: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/7.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
Signal Monitoring • A model automatically publishes all “exported” signals
under the name:• /model_name/block_name/signal_name
• To export a signal, right-click and set “Storage Class” to “Exported Global”
![Page 8: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/8.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
Parameter tuning• A model also publishes all tunable parameters under
the name:• /model_name/block_name/param_name
• For example the constant block “value” parameter is tunable:
![Page 9: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/9.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
Data hierarchy
• This naming convention allows a hierarchical view of the model signals and parameters
![Page 10: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/10.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
Shared Data Client Shared Data client is an application that provides a
quick and easy way to monitor a model.
![Page 11: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/11.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
Client API
UEISIM Desktop API supports C/C++, .NET (C#, VB), LabVIEW and Javascript
The API provides the following services:• Start/Stop Simulation• Enumerate and read signals• Enumerate, read and write parameters• Reboot or shutdown UEISIM• Read timing statistics and CPU load
![Page 12: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/12.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
C# client API 1/4Create a client objectUeiSimTargetClient client = new UeiSimTargetClient();
Open communication with UEISIMclient.Open("192.168.100.2");
Load and Start Modelclient.LoadApp("/tmp/test_ai_rt2“, 2345);
if(client.IsAppRunning())
{
client.StopApp(); // Stop model if already running
}
client.StartApp();
![Page 13: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/13.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
C# client API 2/4Enumerate signalsfor(int sigIdx=0; sigIdx< client.GetNumSignals(); sigIdx++)
{
string sigName = client.GetSignalName(sigIdx);
double[] sigVals = client.GetSignalValue(sigIdx, client.GetSignalWidth(sigIdx));
Console.Write("{0} = {1}", sigName, sigVals);
}
![Page 14: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/14.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
C# client API 3/4Enumerate and tune parametersfor(int prmIdx=0; prmIdx=0<client.GetNumParams(); prmIdx=0 ++)
{
string prmName = client.GetParamName(prmIdx);
double[] prmVals = client.GetParamValue(prmIdx, client.GetParamWidth(prmIdx));
Console.Write("{0} = {1}", prmName, prmVals);
// Tune parameter
prmVals[0] = 102.90;
client.SetParamValue(prmIdx, prmVals);
}
![Page 15: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/15.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
C# client API 4/4Display timing statsConsole.WriteLine("Model ran for {0} secs", client.GetExecTime());
Console.WriteLine("Min TET = {0}", client.GetMinTET());
Console.WriteLine("Max TET = {0}", client.GetMaxTET());
Console.WriteLine("Avg TET = {0}", client.GetAvgTET());
Close communication channelclient.Close();
![Page 16: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/16.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
LabVIEW API 1/4
Open communication and start application
![Page 17: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/17.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
LabVIEW API 2/4
Enumerate and monitor signals values
![Page 18: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/18.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
LabVIEW API 3/4
Enumerate and tune parameters
![Page 19: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/19.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
LabVIEW API 4/4
Display timing stats
![Page 20: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/20.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
LabVIEW client example
![Page 21: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/21.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
HTML5 client • UEISIM Desktop web interface is built on top
of web sockets• Web sockets are part of HTML5. Supported in
the following browsers: Google Chrome Firefox Safari for MacOS and iOS Android web browser Internet Explorer 10
![Page 22: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/22.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
HTML5 client – default page
![Page 23: UEISIM Desktop](https://reader036.fdocuments.net/reader036/viewer/2022062308/5587963dd8b42aee408b4594/html5/thumbnails/23.jpg)
© 2013 UEI, Inc. All Rights Reservedwww.UEIDAQ.com
HTML5 client – custom page