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

Hi Janusz,

Let's work on the "Fatal error: GPS is configured incorrectly or not plugged in.: 52" issue first. This error comes up when the expected GPS messages are not received by the sensorless autopilot.

GPS Tx is J34 pin 6 (orange wire) which then goes to the green connector on the sensorless autopilot, J2 pin 24.

GPS Rx is J34.8 (purple wire) which then goes to the green connector on the sensorless autopilot, J2 pin 22. 

GPS PPS (pulse per second) is J21 pin 2 (red wire) which then goes to the green connector on the sensorless autopilot, J2 pin 26.

There should be constant activity on the GPS Tx line. There should only be some activity on the GPS Rx line about 30 s after power on. There should be a pulse every second on the GPS PPS line. You can use an oscilloscope to check these things. 

Another test you can do is, open your current VRS using notepad, finding the line "585 0 (forceInitialReport) force MP to initialize with particular report" and change it to "585 144 (forceInitialReport) force MP to initialize with particular report". Save. Then transmit to the autopilot. Power off. Open a terminal program and start a log. Power up the autopilot. This change makes it so the GPS report is the initial report. So just let it run for about 5 minutes. Then send me this log. 

Hello Kevin, 

Signals on the pins were like this:

GPS Tx is J34 pin 6 (orange wire) - constantly was 3.3V, after start of autopilot, and also after few minutes later.

GPS Rx is J34.8 (purple wire) - constantly was 3.3V, after start of autopilot, and also after few minutes later. 

GPS PPS (pulse per second) is J21 pin 2 (red wire) - It was puls every second and it takes 100ms.

And I sent the log report with modification of vrs file. after last line there wasn't any changes during last 4 minutes of the test. 

Regards
Janusz 

Attachments:

Hi Janusz,

Your results show that no GPS messages are being sent to the sensorless autopilot. Did you have the model loaded, simulation running and analog and digital boxes powered on? If not, please do that and re-test.

Hi Kevin, 

During this experiment all devices were powered on (digital and analog interfaces, SPI interface and autopilot). I loaded 2015b_THWIL_2_Heli_with _GPS_ACK project, and i changed the parameters on those that I got after calibration process. The simulation was runing and i didn't run the Horizon program, i monitored the autopilot with terminal program. The voltages was measured with the ground point on the autopilot top PCB board, also for comparizon i used as a ground the 1 pin of J35 plug (black wire). In both versions the signals levels in J34 pin 6 and 8 were the same. 

 

Hi Janusz,

Your testing procedure sounds correct.

We need to figure out why there are no GPS messages being sent on the GPS Tx line J34 pin 6. Check J35 pin 6 using an oscilloscope. 

With everything off, remove the front connector on the analog interface board. Use a multimeter and check for continuity from J30 pin 69 to J35 pin 6.

Remove the top cover of the analog interface box and send a picture of what's inside. Did you ever change anything in this box?

Where did you get the 2015b_THWIL_2_Heli_with _GPS_ACK project from and when?

Was GPS working with your old sensorless autopilot?

Hi Kevin, 

The voltage on J35 pin 6 was 3.8V constantly, and there was a continuity between J30 pin 69 and J35 pin 6. 

The inside of the analog device looks ok, any element weren't burned, and electrical fuse is good. Because of attachment limit I put the photo on the google drive:
https://drive.google.com/file/d/1P5MdZT2LJrHbTC7Cw1-uvrxPNjm_Kraa/v...

The 2015b_THWIL_2_Heli_with _GPS_ACK project was downloaded from Yours support page few weeks ago, when You told us to do it. 
This TrueHWIL setup was originally bought with fixed wing autopilot in 2015 by our company partner. And I was told that this setup wasn't never runned properly. 
In the mean time i checked also the voltages on the serial port "B" on the outside of the QSCLP-100 card and we got the constant -5.7V on the 3,4 and 7 pin. The rest of the pins shows 0V. So our assumption is that the RS232 card could not work correctly. When I check in Matlab2015b the xPC target pci cards with getxpcpci command i got:

List of installed PCI devices:

B&B Electronics (Quatech)QSC-100
Bus 8, Slot 1, IRQ 3
Serial Ports
VendorID 0x135c, DeviceID 0x0170, SubVendorID 0x135c, SubDeviceID 0x0170
Released in: R14SP2 or Earlier

National Instruments PCI-6703
Bus 8, Slot 2, IRQ 4
AO
VendorID 0x1093, DeviceID 0x2c90, SubVendorID 0x0000, SubDeviceID 0x0000
A/D Chan: 0, D/A Chan: 16, DIO Chan: 0
Released in: R14SP2 or Earlier
Notes: 8 DIO channels on board not supported by Simulink Real-Time

National Instruments PCI-6602
Bus 8, Slot 3, IRQ 11
Counter ENC
VendorID 0x1093, DeviceID 0x1310, SubVendorID 0x0000, SubDeviceID 0x0000
Released in: R14SP2 or Earlier
Notes: 8 32 bits 80 MHz (125 MHz)

So the Matlab see the RS232 card but maybe the library of RS232 block werent installed correctly? But the TrueHWIL_CC didn't require matlab so it should work independly.

Best regards
Janusz

Hi Janusz,

On the back of the analog interface box, verify that the serial cable is connected to the "COM1" connector on the back of the analog interface box. 

Hi Janusz,

Two of your jumpers are incorrect. See the attached picture. 

The QSCLP-100 should have 4 9 pin connectors labeled A, B, C, D. B should go to COM1 on the analog interface board. A should go to the SPI interface board. Please verify this.Analog%20interface%20jumpers.png

Hi Kevin, 

I verified the connection of the A plug to the SPI interace board (pluged in the port nearest power plug), and B plug connected with the COM1 port on the analog device. After correcting the jumpers the GPS signal started working in terminal log almost immediatly, next small success. I runed the Horizon and it recognized the GPS signal (It displayed the color of indicator as green) but in the error monitor we steel have Fatal error connected with the GPS. I supose that it just require proper configuration. But its good to see that we finaly have some response from GPS sensor.

Attachments:

Hi Janusz,

This is great news! However, Fatal error: GPS is configured incorrectly or not plugged in: 52 & Runtime error: Timeout with GNSS fix rate settings shouldn't be coming up. Please power everything off, stop the simulation, unload the target and perform the start up procedure I previously described. Let me know what errors you get. 

Hi Kevin, 

It looks like the previous test i take too fast and GNSS didn't lock on time. Now I tested it four times and every time the only fatal errors we have from AGL and Pitch gyro. 

Fatal error: AGL is out of range (could be on a bench).: 15
Fatal error: Pitch gyro is broken.: 90

The other errors that occur:
Error on RC CH5 input (1521 total)
Error on RC CH5 input (1589 total)
RC CH5 input is broken

And warnings:
AGL altitude error detected (2 total)
Caution: RC Failure Pattern is Disabled
Caution: GPS Failure Pattern is Disabled
Caution: GCS Communication Failure Pattern is Disabled

Best regards,

Janusz

I checked also the errors when i run the calibration project, and there we have errors with AGL is out of range and with the GPS is configured incorrectly. But there pitch gyro works properly. 

Regards,
Janusz

RSS

Share

© 2024   Created by MicroPilotNingAdmin.   Powered by

Report an Issue  |  Terms of Service