MicroPilot

MicroPilot Autopilot Users Group

Hello Everyone!

I try to run the autopilot MP2128HeliG2 in trueHWIL setup. After load a simulation to the xPC Target computer I run the Autopilot and I got a lots of errors from sensors. The message gathered from Terminal is:
[1B][2J[1B][0;0HFATAL ERRORS:
Watchdog CRC Mismatch[1B][K
x accl failed [1B][K
Accl Temperatures Failed[1B][K
GPS config error[1B][K
Compass is enabled but is not installed.[1B][K
[1B][K
WARNINGS:
Autopilot loaded with non-release code.[1B][K
[1B][K
Lockd 11.3V 0.0V
spd= 17
z acc=854
compass hdg=0 0 0 0
I tried to run the calibration trueHwil Control Centre program to calibrate sensors. When I load the callibration_2128.thprj file and tried to load it to run the simulation I got the error of different numbers of parameters between downloaded model to target PC and parameter file. In result I cannot load the model to xPC Target computer to run the calibration. In xPC Target I have this message:

Download started...
Download finished
Mismatch between model and kernel versions


Is the calibration proces necessary for those Horizon fatal errors? If Yes then how I can solve the problem with calibration program problem? 

Thanks for any advices
Regards

Janusz

Views: 1298

Attachments:

Reply to This

Replies to This Discussion

Hello Kevin,

The result was the same, altitude didn't converge. And i didn't have the airspeed sensor option to choose. So i upload the output only from altitude calibration process. 

Regards,
Janusz

Attachments:

Hi Janusz,

From your log I see "MPFID_PRESSURE_ALTITUDE: 0" on every iteration which isn't right. Our THWIL expect isn't in today. I will follow up with him on Monday and get back to you. In the meantime can you tell me in detail what your complete test procedure was starting from scratch?

Hi Kevin, 

The test was about performing the whole procedure that you proposed with powered on and off SPI Interface Board. You didn't mention about it so I checked both options. I power on the SPI board before runing the simulation. Also i checked the wires between Autopilot and SPI Board, is there any problems with conducting, and all pins passed the test. To make sure if the P3 ribbon wire is connected correctly between autopilot PCB boards could You take a look at uploaded photo. This ribbon conector to the top board could be plugged with both directions and in instruction the picture resolution didn't give me clear view on the red edge. Next i made the test when I turn off the AGL sensor in vrs file, and tried to run autopilot with fake GPS, because only those two elements gives a fatal errors, just to check if the horizon would start, but I still got the fatal error from GPS (GPS is configured incorrectly or not plugged in: 52). And other errors from:  timeout with GNSS fix rate settings,  and Error on RC CH5 input. But previously You typed that RC is not necessary for this simulation. So the main problem still is with GPS. I hope that my chaotic actions could give You some clues to figure out what we can do to make it run correctly. 

Best regards, 
Janusz

Attachments:

Hi Janusz,

Your P3 ribbon cable is connected correctly. The SPI board should always be on. I meant can you tell me in detail your complete test procedure that you did to try to calibrate the altitude. 

Ok, so after downloading and unpacking the files, i copied the THWIL_Fixed_Wing.vrs file to the vrs subfolder in Horizon folder. I powered up the autopilot and wait till Horizon program could transmit the vrs file. After message that the flash operation is complete i closed the Horizon, and turned off autopilot. Next I edited the IP adresses in Target_calibration_2128.thcfg of Host PC an Target PC to fit my network setup. I Opened in TrueHWIL Control Center the calibration_2128.thprj file. Then I powered on SPI and Target PC. When the system is up, then I loaded model and custom parameters in Thwil CC, I pressed the button Load Target. When Target status show that the Aplication and Parameters were Loaded successfully then I Start the Simulation. Next I powered on the Analog interface and run the terminal program, when it's ready I powered on the autopilot. I wait till the GNSS initialization is finished, and then I disconnected terminal com port, and in Thwil CC I swiched to the Auto Calibration tab. I Pressed the Start Calibration button, selected comunication via COM1 port, and after connection, I choose from avaible sensors X,Y,Z accelerometer, Pitch, Roll, Yaw Rate Gyro and Pressure Altitude the last option. And waited till 100 iterations finished.

Hi Janusz,

Your test procedure looks correct. But was the SPI board powered on? If not, it should be, try again. If it was I'm not sure what the issue could be. Our THWIL expert is unfortunately on vacation this week. I'll follow up with him when he is back. 

And also was the Digital box powered on? It should be. If not, try again. 

Hi Kevin, 

I don't have external plug in to power up digital interface. Is it powered from NI card via SH68-68-D1 cable? On the Connector Diagram i have only three power supplys (to Analog interface, to SPI and to autopilot). Or do I have to add extra power suply to Servo Board? I didn't connect any external servo drives so I didn't add additional power supply to this board. 

Hi Janusz,

The digital interface is powered from the NI card. You don't need to add an extra power supply to the servo board unless you want to connect servos and see them move. 

I didn't plan to add those servos so all elements of the THWIL system should be powered correctly. Every try of calibration of the altitude finished in the same way, after 100 iterations without convergetion. It looks like we have to wait till Yours expert goes back from its vacation.

Best regards

Janusz 

Hi Janusz,

Please perform the calibration of the altitude only again. But this time, before you click "Start calibration", open Horizon and connect to the autopilot. Let's assume you use UAV-01 to connect. Then go to tools, sensor monitor. In sensor monitor, go to setup, configure sensors, select sensor 1, in the field ID box, type 1085 and click add. Click close. Keep Horizon open.

Then click start calibration. Then connect to UAV-01 via the TCP/IP link. It should be the 2nd option in the list.

While it's auto-calibrating, look at field 1085 in the sensor monitor and the altitude in the monitor of the target PC. You should see both change with the simulink output. If they don't change together, you need to troubleshoot a connection or power issue as the signal from the target PC is not making it to the autopilot.

Hello Kevin, 

I performed this test and in sensor monitor the AGL oscilate +-3 around the 13775 value. On the Target PC all five parameters was constantly equal zero during calibration procedure (still no convergency). So I assume that the Digital interfeace didn't transfer proper values to the NI PCI-6602 card. I checked all wires conductivity (All of them were correct) and checked the power supply voltages (autopilot and Analog interface 12V, SPI interface 9V). Maybe I could check some signals on the plugs (J10...J35) in the middle of simulation with osciloscope that could tell us if the Digital interface work correctly. I tested individually all chanels in NI PCI-6703 outputs, and with help of external signal generator i tested all eight NI PCI-6602 counters. So those cards should work. I opened in Matlab program the trueHWIL2_Calibration_4UARTS.slx model and tried to build it, I had some errors with linking of RS232 block. But the altitude calculation is performed before RS232 block. So in scope 4 I should see acctual values different than 0 independly of the RS232 block.

Regards
Janusz

Attachments:

RSS

Share

© 2024   Created by MicroPilotNingAdmin.   Powered by

Report an Issue  |  Terms of Service