Author Topic: AIRCRAFT PITCH AND ROLL INDICATOR  (Read 2855 times)

joko markono

  • Full Member
  • ***
  • Posts: 132
    • View Profile
AIRCRAFT PITCH AND ROLL INDICATOR
« on: August 28, 2019, 09:55:41 PM »
Hi Guys,

I'm new here so please don't be too hard with me.  :)
Can someone help me with the PITCH AND ROLL INDICATOR in the Advance HMI please.

Otherwise, can i use Animation Picture Box in the toolbox and assign the PLCAddressImageRotationValue as roll and PLCAddressTranslateYValue as pitch?

Thanks in advance.

Phrog30

  • Guest
Re: AIRCRAFT PITCH AND ROLL INDICATOR
« Reply #1 on: August 28, 2019, 10:01:17 PM »
I think you're confused what AdvancedHMI is.  But, you'll figure it out I'm sure.  Besides this forum, there is a ton of support and info out there.  Remember, AHMI is built on .NET.

Here's one example, using C#, that may help you.

https://www.codeproject.com/Articles/27411/C-Avionic-Instrument-Controls

joko markono

  • Full Member
  • ***
  • Posts: 132
    • View Profile
Re: AIRCRAFT PITCH AND ROLL INDICATOR
« Reply #2 on: August 29, 2019, 10:12:40 AM »
Hi Phrog30,

I know how to use scada software but not visual studio (i have to admit that i'm not a programmer). I'm getting lost while trying to combine the code in the c# that you gave the link into the .vb AdvanceHMI file. please guide me.

Phrog30

  • Guest
Re: AIRCRAFT PITCH AND ROLL INDICATOR
« Reply #3 on: August 29, 2019, 11:12:44 AM »
please guide me.

I'm going on a startup and won't have time.  I was just showing you the link.  If you have questions or issues you need to be very specific and I'm sure others can help.  But nobody is going to be able to go off of 'guide me'... that's just too vague.

VS is very good software.  I think it's intuitive.  Sounds like you need help in .NET, not VS.  Try Google first.  More than not you will find what you are looking for.

Good luck.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5320
    • View Profile
    • AdvancedHMI
Re: AIRCRAFT PITCH AND ROLL INDICATOR
« Reply #4 on: August 29, 2019, 11:55:43 AM »
There are 2 ways to go about adding a C# control to AdvancedHMI. The first is to run the C# code through one of the online C# to VB converters. The converters are ok, but rarely 100% so they do require some code editing.

The other option is to add a C# class library the AdvancedHMI solution.

- In Solution Explorer, right click on Solution AdvancedHMI35 and select Add->New Project
- Select a C# Class Library (.NET Framework)
- Name is CSControls and select .NET Framework 4

You will now have a C# controls project as part of the solution. You can now add the C# files downloaded from the internet into the AdvancedHMI project

- In Solution Explorer, right click CSControls and select Add-.Existing Item
- Browse to the downloaded files
- Rebuild Solution

If the rebuild is successful, you will see the new controls in the Toolbox when you have a form open in design view

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: AIRCRAFT PITCH AND ROLL INDICATOR
« Reply #5 on: August 29, 2019, 07:06:43 PM »
Or maybe try using this solution (rebuild the solution once you open it in Visual Studio):

https://www.dropbox.com/s/f6dfnp5jxg2xf25/advancedhmi%20v399y%20beta33.7z?dl=0

The attached picture shows what these controls look like in AHMI.

If you might be looking to do this in an existing AHMI project then pay careful attention to all the details from the solution in the link.

Generally speaking, you can copy the whole CSControls project folder to your project (where all other projects are), add it as existing project to your solution in VS, add references to AdvancedHMI and AdvancedHMIControls projects, add AHMI controls from AdvancedHMIControls/CSControls folder as existing items to the same folder you would create within your AdvancedHMIControls project, rebuild the solution and try it.

The AHMI version of all these AvionicsInstrumentsControls are together with other AHMI controls in the ToolBox and have "HMI" at the end of the names.

One can always modify the resource images to have the controls possibly look like the 2nd attached picture.
« Last Edit: August 30, 2019, 03:13:05 AM by Godra »

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: AIRCRAFT PITCH AND ROLL INDICATOR
« Reply #6 on: September 01, 2019, 01:06:21 AM »
VB .Net version of these controls can be found here:

https://www.advancedhmi.com/forum/index.php?topic=2491.0