Welcome to Cockpitbuilders.com. Please login or sign up.

May 09, 2024, 07:28:13 PM

Login with username, password and session length

PROUDLY ENDORSING


Fly Elise-ng
562 Guests, 0 Users
Members
Stats
  • Total Posts: 59,641
  • Total Topics: 7,853
  • Online today: 588
  • Online ever: 831
  • (May 03, 2024, 12:39:25 PM)
Users Online
Users: 0
Guests: 562
Total: 562

COUNTDOWN TO WF2022


WORLDFLIGHT TEAM USA

Will Depart in...

Recent

Welcome

CTS288 encoder on Opencockpits IOCard?

Started by HondaCop, September 14, 2010, 08:33:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

HondaCop

Hello guys,

I am building my EFIS set and I have everything already programmed via SIOC and working, EXCEPT the encoders for the MINS and BARO settings.

I have an Opencockpit USB expansion card with 2 mastercards connected to it. One of the mastercards has an input connector with the encoder card attached to it.

I just have no idea on how do I wire the encoders to the inputs on the mastercard. On the Opencockpits site it says that if you have CTS288 encoders, you don't even need to use an encoder card and can simply connect the encoders directly to the inputs on the mastercard (it will use 2 inputs per encoder). I am going this route because one less thing to worry about (encoder card), but I have no idea how I would program the encoder via SIOC.

Can anyone help me out a bit? I'm a quick learner. ;-)

BTW, I didn't even bother to ask on the OC site because I will have to wait weeks for the first reply.

fordgt40

#1
Efrain

The common pin on the encoder goes to one of the input grounds and the other two pins to adjacent inputs within the same gnd/input set on the breakout board
I list below my sioc code for the EFIS hooked up to the SA package, which I believe you use. The latest version of SA has tinkered with the logic on the Baro, and this code predates it, so you might have to do some amendments but at least this example should help you understand the encoder programming

Regards

David

Edit ( I will repost the sioc code shortly)

HondaCop

Hi David,

I did the changes necessary and now I see the altimeter incrementing but with a couple of issues:

1. It will increment on the default FSX B737's panel, but not on the SA display.
2. It increments in .03 steps. Is this normal?

I see you said you will be updting the code shortly, so you probably will fix it before I even finish asking! LMAO!

fordgt40

#3
Hi Efrain

I seem to have lost the efis file I was looking for - that will cause me some grief!!

Anyway here is a snippet of code that "should" work


Var 30, name E_BARO, Link IOCARD_ENCODER, Input 30, Aceleration 1, Type 2
{
L0 = &E_BARO * -1
&SUB_BAR = &SUB_BAR + L0
}


Var 31, name SUB_BAR, Link SUBRUTINE
{
L0 = &SUB_BAR * 16
&FS_QNH = L0
}



Var 32, name FS_QNH, Link FSUIPC_OUT, Offset $(to match your sa entry in the fsuipc.io file), Length 2 // FS_QNH_MB

Re your latest post, you must tell SA that the value is changing by passing the revised value to the offset you have allocated in the FSUIPC.IO.INI file. It sounds as if you are writing the value directly to the FSUIPC offset. Sorry, but it is a while since I used the h/w efis (too busy building), but if you try the sa software efis then that should show you the value incs/decs

Hope this helps

David

HondaCop

David,

It worked perfectly, but I had to delete the *16 from the subroutine. I believe we have to delete that now, since the newest build of SA. Works like a charm now.

Don't flip out now, but do you have the SIOC code for the MINS DH encoder settings? =P

fordgt40

#5
Efrain

Here you are below, though there is something wrong, as the code is writing to a Project Magenta offset >:( That was why I was trying to find my corrected file, without success. Anyway, try changing the PM_DH offset to a SA one with matching change in the FSUIPC.IO.INI file

Var 0, value 0
{
&SUB_DH = 3000
}


Var 5602, name E_MIN, Link IOCARD_ENCODER, Input 22, Aceleration 1, Type 2
{
L0 = &E_MIN * 100
&SUB_DH = &SUB_DH + L0
}

Var 1000, name SUB_DH, Link SUBRUTINE
{
IF &SUB_DH > 20000
{
&SUB_DH = 20000
}
IF &SUB_DH < 0
{
&SUB_DH = 0
}
L0 = DIV &SUB_DH ,100
&PM_DH = L0
}

Var 1203, name PM_DH, Link FSUIPC_OUT, Offset $04FA, Length 2 // PM_EFIS_D

HondaCop

Worked perfectly, David!!!!!  ;D My Captain EFIS is completely programmed! Thanks a million, buddy.

fordgt40

Efrain

That is great news and I am delighted to be of use.

Regards

David

HondaCop

David, you wouldn't happen to be able to recommend me a good FSX B737-800 to use with SimAvionics? I posted a new thread on the subject.

fordgt40

Efrain

Sorry, but I have been too busy building to bother greatly about the flight models. However, perceived wisdom is that the PMDG is the best AND it is possible to use a cut down FS9 PMDG flight model on FSX. It was discussed briefly on either this forum or Mycockpit - might be worth doing a search

David

HondaCop

#10
Will do, thanks!

BTW, I've read that the FS9 PMDG 737-700 can be used on FSX. Using the -700 instead of an -800 has no adverse effect on Sim-Avionics, as far as you know?

fordgt40

Quote from: HondaCop on September 14, 2010, 11:56:03 AM
Using the -700 instead of an -800 has no adverse effect on Sim-Avionics, as far as you know?

Efrain

Would not have thought so

David

HondaCop


Like the Website ?
Support Cockpitbuilders.com and Click Below to Donate