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.

New problems with FS Stepper. Building a compas

Featured Replies

Hello again.Now i try to build compas for my 737 cockpit.i have big problem now with "360 - 0 point" at compas.When the controller sees change of value with 360 on 0, it starts to rotate the engine counter-clockwise, instead of that what to make 1 step clockwise and to borrow zero position. When the engine comes back in zero position, having made a full turn, it begins rotating clockwise.How to solve this with FSBUS?Thanks.Alexander.

I don't know how the programming goes in FSBUS, but I'm currently fiddling with a compass run out of the serial port of my PC on a stepper motor, and determining the direction and number of steps is done this way...Variables are:compass - the heading you want to display, from FSUIPCposition - the heading currently being displayeddirection - clockwise (1) or counterclockwise (0)pulses - the number of stepper pulses needed to make position match compassfactor - the number of pulses per degreepseudocode:IF heading - position <> 0 THENIF heading - position < 0 AND ABS(heading - position) < 180 THENdirection = 1pulses = INT(ABS(heading - position)) * factor)MSComm.PortOpen = TrueMSComm.Output = directionMSComm.Output = pulsesMSComm.PortOpen = FalseELSEdirection = 0pulses = INT(ABS(heading - position)) * factor)MSComm.PortOpen = TrueMSComm.Output = directionMSComm.Output = pulsesMSComm.PortOpen = FalseEND IFEND IFThis way, the code first checks to see if the compass is already pointing the right way. If it is, nothing happens. Second, it looks to see if the current position of the card is less than what it should be. If it is, AND it's less than 180' less, then it's a clockwise move. If the current postion is MORE than what it should be, OR if it's more than 180' less, then it's a counterclockwise move.Richard

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.