Jump to content
Sign in to follow this  
Guest o2drink

FSBUS; switching lights with 0x0d0c

Recommended Posts

Guest o2drink

I'm sure this is pretty basic, but after searching here and the fsuipc forum I'm running out of ideas / or search strings to query. I built the FSBUS NG hardware and recently updated to the CDK software. I am working on a light switch panel and I am using this as an exampleC, CInstrumentLight,SWITCH,1,35,0,0,0F, FInstrumentLight,0,0x0d0c,I16,1,1,7,5,BIT | RWR, CInstrumentLight,FInstrumentLight,1,1,0Within the same ini, I have each (nav, taxi, bcn) switch and also the pitot and fuel pump. My question/problem is that operating a switch causes more than one switch throw at a time with no obvious pattern (affecting those only included within the 0d0c offset). Do I need to build these lights within a word and send the whole word at once? Is there an issue with my parameter (above it is '5')?One other thing: on my IO NG board, the second slot/connector for the key section (J7) is reporting as key 32-39. Is this correct?Any input would be greatly appreciated.Eric

Share this post


Link to post
Share on other sites

Hi Eric,im no expert but have played with my one and have a few switches working with this offsett.My line is like thisF, FInstrumentLight,0,0x0d0c,I16,1,1,7,5,BITI dont know why you are ORing with RW.I suggest you use the VC panel to try with your programe.Run Fsim in a small window along with Fsbus and watch what happens.If your logic is right the switches should work.Does the switch work ok in Fsadmin?Good luckLes

Share this post


Link to post
Share on other sites
Guest o2drink

Thanks to both for the replies. Les, I'm 'OR'ing to follow suit with the example provided within the doc and because FSinterrogate reports it in the variable section. I tried it without and did not have success. I have spent time and did find a consistent and reproducible pattern though it does not answer my question. Using FSinterrogate and analyzing the data while using a mouse directly in MSFS04, I produced the expected values:Becon/strobe- 00 0001 0010Nav/Insrument-00 0010 0001Taxi- 00 1000 1100Landing- 00 0000 0100Here is what I saw while operating one switch at a time - and returning all to off when operating the next switch (0x0d0c = 0000):Switch on Switch offLand 0x0005 0x0001Taxi 0xB27C 0xB274Nav 0x2021 0x2020Bcn 0x0007 0x0005Instrment 0x0020 0x0000Break out the bits and the InstrumentLights are the only one behaving as expected. Operate the Landing Light switch and NavLight turns on too. Operate the Taxi lights and Land/Instrument turns on too.I'm not real familiar with how much is too much to post up here but I wanted to supply info as much as I had too. The lights are really not that critical but if I'm making a newbie mistake in offset word toggle bits I'd like to catch it now before I get into big boy instruments.Finally, Admin reports the change in position corresponding to the expected CID/KEY/Val. That is how I tested which is all I know of.Thanks again for the responses.Eric

Share this post


Link to post
Share on other sites

Hi Eric,Ive just tested my ini file using the VC option and Ox0d0c and my one works fine.Make sure you have your syntax as follows,F,FPANELL, 0, 0x0d0c, I16, 1, 1, 1, 5, RW|BITI think you may have SPACEs between RW | BIT like this.Try this RW|BIT.I tried this on my ini file and it no longer operated the correct switch but operated a random one.Hope this helpsLes

Share this post


Link to post
Share on other sites
Guest o2drink

Les,Thanks again for all the input. Unfortunately, I still have had no success. Another thing I've noticed is every time I resave the ini (seems to be required before I run the dab) is I get new data from the switches and new results in FS. I hope you are not finding the same - that your working lights are still working. I made a new ini and called it from the dab with no luck. I also tried specifying the bits as a hex which returns the same results.One more question and if you have a moment, are you only using one light bit? If not are they all within the same ini?Thanks again...at least it seems to be a local problem and still fixable. I'll have to try a different system next to rule that out.Best regards,Eric

Share this post


Link to post
Share on other sites

Eric,Ive really not fully tested all bits for that offset.i am using0 to BIT 5.All in the same ini file.Can you answer me this question.1.Forget about using your hardware,have you tried to get your switches to work using the VC Option?.When i tested my files,i only had the three lines you listed andran FSBUS(no Hardware) and Flightsim at the same time and configured one of the switches in the VC panel and had my switches operate in the Plane that was running FS at the time.This way it proves your files are ok.i made my swithes toggle so i could operate the vc switches and the switch in FS would toggle also.Cut and paste me your dab and ini file and i will run it here and see what i get.Les

Share this post


Link to post
Share on other sites
Guest o2drink

Les, it hasn't been a great day. I had a brainstorm earlier and thought since I upgraded to CDK, maybe I should check the flash file -there was a date difference so I decided to reflash. In doing so I must have reversed the ISP cable and I pop'ed the grnd trace (pin6) and who knows what else. Ponyprog says unknown device which I can ignore and read/write the chip with reported success but I'm getting an error led on the IO. So, I guess I probably will start etching a new board at some point and order more parts and pieces. I am very sad. On top of it all, I had double checked with the FSBUS router this morning and it was still working within that application. Probably should have left well enough alone.Here is the copy/paste. I am still curious if it works with yours. I did check the virtual controls and while I agree it works with one switch at a time, another switch would reset the other switches...at least in my world.Thanks,EricSUB OnBegin LoadConfigFile("sxpndr.ini") LoadConfigFile("Lights.ini")END SUBC,CLndLt,SWITCH,1,7,POSEDGE|TOGGLE,0,0,0C,CTxLt,SWITCH,1,32,POSEDGE|TOGGLE,0,0,0C,CNvLt,SWITCH,1,33,POSEDGE|TOGGLE,0,0,0C,CBcLt,SWITCH,1,34,POSEDGE|TOGGLE,0,0,0C,CInstLt,SWITCH,1,35,POSEDGE|TOGGLE,0,0,0'C,CStbLt,SWITCH,1,36,,0,0,0F,FLndLt, 0, 0x0d0c, I16, 1, 1, 7, 0x0002, RW|BITF,FTxLt, 0, 0x0d0c, I16, 1, 1, 7, 0x0003, RW|BITF,FNvLt, 0, 0x0d0c, I16, 1, 1, 7, 0x0000, RW|BITF,FBcLt, 0, 0x0d0c, I16, 1, 1, 7, 0x0001, RW|BITF,FInstLt, 0, 0x0d0c, I16, 1, 1, 7, 0x0005, RW|BIT'F,FStbLt, 0, 0x0d0c, I16, 1, 1, 7, 0x0004, RW|BITR,,CLndLt,FLndLt,1,1,0R,,CTxLt,FTxLt,1,1,0R,,CNvLt,FNvLt,1,1,0R,,CBcLt,FBcLt,1,1,0R,,CInstLt,FInstLt,1,1,0'R,,CStbLt,FStbLt,1,1,0

Share this post


Link to post
Share on other sites

Eric,Sorry to hear of the oops with the board.Been there and done that.Thats the problem with these freeware programs.A lot of the time its bugs and we pay dearly.Dont be discouraged.Back to the question,after more exstensive checking,my one does the same in vc.I hadnt tested thoroughly with my hardware and hadnt tried an offset with a few bits being toggled.I also found that the effect can be random.I am going to try again shortly and then will send my INI file to Dirk and get his comments.It may only be a problem where one uses a few bits of a word.As i had originally used gear and Instrument lights to test with.So now i will have to try a few more options.Will keep you posted via this thread.Keep your chin up.Les

Share this post


Link to post
Share on other sites

Hi Eric,Still had problems with other bits being reset.I ve emailed Dirk my ini files and he said he would look into within the next two weeks.Les

Share this post


Link to post
Share on other sites
Guest o2drink

Les, thank you for the follow up. Hopefully I am up and working again soon.Eric

Share this post


Link to post
Share on other sites

Hi Eric,Tried to reply to you via your email,no luck.Re your lates problem,sorry not been using rotaries,Have now abandoned Fsbus as there are still to many bugs.Unfortunately still some of the old onesfrom 2.4.3.Im going to start again with I/O cards.Fsbus is very goodbut support is very slow.No trouble with contacting me via email.Les

Share this post


Link to post
Share on other sites

>Im going to start again with I/O cards.>LesHi Les,If you need some examples of how you can do this quit easily in IOCards SIOC, look at my website, page New?!, news item of April 30, 2007.Rgrds,Nicohttp://www.nicokaan.nl

Share this post


Link to post
Share on other sites

Hi Nico,Thanks,i ve already saved many of your examples and will add those as well.While i get to grips with i/o cards.Les

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...