Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VB6 example

Featured Replies

I wanted to share some code I used to drive 6 servo gauges using VB6 and SimConnect. This program also has USB connection. The snipit below is just the SimConnect communication. Hope it will help someone out.Private Sub SimConnect_Opened(ByVal ApplicationName As String, ByVal ApplicationVersionMajor As Long, ByVal ApplicationVersionMinor As Long, ByVal ApplicationBuildMajor As Long, ByVal ApplicationBuildMinor As Long, ByVal SimConnectVersionMajor As Long, ByVal SimConnectVersionMinor As Long, ByVal SimConnectBuildMajor As Long, ByVal SimConnectBuildMinor As Long, ByVal Reserved1 As Long, ByVal Reserved2 As Long) SimConnect.AddDataDefinitionEx 1001, "TURB ENG ITT:1", "Rankine", SIMCONNECT_DATATYPE_FLOAT64, 20, 0 SimConnect.AddDataDefinitionEx 1001, "PROP RPM:1", "RPM", SIMCONNECT_DATATYPE_FLOAT64, 20, 0 SimConnect.AddDataDefinitionEx 1001, "TURB ENG MAX TORQUE PERCENT:1", "percent", SIMCONNECT_DATATYPE_FLOAT64, 2, 0 SimConnect.AddDataDefinitionEx 1001, "TURB ENG ITT:2", "Rankine", SIMCONNECT_DATATYPE_FLOAT64, 20, 0 SimConnect.AddDataDefinitionEx 1001, "PROP RPM:2", "RPM", SIMCONNECT_DATATYPE_FLOAT64, 20, 0 SimConnect.AddDataDefinitionEx 1001, "TURB ENG MAX TORQUE PERCENT:2", "percent", SIMCONNECT_DATATYPE_FLOAT64, 2, 0 'This will update the data every second 'SimConnect.RequestDataOnSimObject 9999, 1001, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_SECOND, SIMCONNECT_DATA_REQUEST_FLAG_CHANGED, 0, 0, 0 'This will update the data when one of the trigger values is exceeded SimConnect.RequestDataOnSimObject 9999, 1001, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_SIM_FRAME, SIMCONNECT_DATA_REQUEST_FLAG_CHANGED, 0, 0, 0End SubPrivate Sub SimConnect_SimObjectData(ByVal RequestId As Long, ByVal ObjectId As Long, ByVal DefineId As Long, ByVal Flags As FSCSIMCONNECTLib.SIMCONNECT_DATA_REQUEST_FLAG, ByVal EntryIndex As Long, ByVal EntryCount As Long) pITT1.Caption = Format(((SimConnect.GetDataDouble(0, 0) / 1.8) - 273.15), "000") 'Rankine to celsius RPM1.Caption = Format((SimConnect.GetDataDouble(0, 1)), "000") pTorque1.Caption = Format((SimConnect.GetDataDouble(0, 2)), "000") pITT2.Caption = Format(((SimConnect.GetDataDouble(0, 3) / 1.8) - 273.15), "000") 'Rankine to celsius RPM2.Caption = Format((SimConnect.GetDataDouble(0, 4)), "000") pTorque2.Caption = Format((SimConnect.GetDataDouble(0, 5)), "000")'************** This section normalizes the data to drive the servos 0 to 255 range************************'******************* RPM ********************************************************PRPM1 = 225 - ((RPM1.Caption / 1000) * 112)If PRPM1 > 225 Then PRPM1 = 225If PRPM1 < 0 Then PRPM1 = 0PRPM2 = 225 - ((RPM2.Caption / 1000) * 112)If PRPM2 > 225 Then PRPM2 = 225If PRPM2 < 0 Then PRPM2 = 0'***************** Torque ***************************************************If pTorque1.Caption < 0 Then pTorque1.Caption = 0Torque1 = 255 - (pTorque1.Caption * 2.215) '* 100If Torque1 > 240 Then Torque1 = 240If Torque1 < 0 Then Torque1 = 0If pTorque2.Caption < 0 Then pTorque2.Caption = 0Torque2 = 255 - (pTorque2.Caption * 2.215) '* 100If Torque2 > 255 Then Torque2 = 255If Torque2 8)If ITT1 > 200 Then ITT1 = 200If ITT1 8)If ITT2 > 200 Then ITT2 = 200If ITT2 < 0 Then ITT2 = 0'*******************************************************************************WriteSomeData 'Send the servo values to USBEnd Sub

How does your code talk to the usb device? I assume the RPM values are sent to your USB device... but how?

I make my own USB devices using Microchip 18F2455 micro controllers. They have built in USB receiver and transmitter. I use Bicbasic Pro to program the devise. In VB6 I use a USB interface to receive and send data to the USB device. Most recently I use EasyHid. It is a free program from http://www.mecanique.co.uk/products/usb/easyhid.html.It automatically produces a VB project based on the paramiters you set for your device.Hope that helpsDave

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.