PDA

View Full Version : Help on small Phidgets job...U/C and low volts.



Tony Hill
08-04-2010, 04:57 AM
Hi all,

I've finished the Spitfire to all intents and purposes, except for a bit of added detail I have yet to add.

What I have not done and, frankly am a bit intimidated by, is the lights. There are only three lights that I need...

undercarriage up

Undercarriage down (and NO lights when in transit)

And,

Low Volts.


I had an old version of FS2Phidget which I thought I understood, at least in theory. but that won't work with my new computer and W7. Computers are NOT strong point. The new version of FS2Phidget seems infinitely more powerful but also more complicated for a moron such as myself.

I would rather spend time on detailing her as opposed to many hours working out the lights (the gauges took me over 100 hours to get working).

So what I am hoping for is for some kind soul to save me the steep learing curve for sake of three lights? I am not being lazy or defeatest (my F-16 has something like 80 different lights that I eventually got working) I am just trying to get the project wrapped up in a reasonable time.

Any help, pointers, greatly appreciated.



Darryl

CocnutAir
08-05-2010, 12:25 AM
Darryl,

Maybe we ask get Bill or GoHot to send you their projects to help jump start you.
I know if you offer to share a pint with Bill he might be up for it.
Not sure what GoHot's tastes are.


Regards,
Alan

Tony Hill
08-05-2010, 04:18 AM
That would be marvellous,cheers, I am certainly not above having a pint or two. (or three, or four, or........)

gokhotit
08-07-2010, 04:10 AM
I will send you my diagram as soon as i get home...My tastes are cheap..advise is free ;)

Tony Hill
08-07-2010, 06:07 AM
I will send you my diagram as soon as i get home...My tastes are cheap..advise is free ;)



That would be great mate!! I am a firm believer in Kharma... somehow I or someone else will repay you, cheers


Darryl

gokhotit
08-08-2010, 02:22 AM
4128

Here is my landing gear diagram. AS you can see there is are two sets of outputs per wheel (except the nose). One output is for all the way (set valve to Min=16484 and MAx=16485) dont know the exact numbers off the top of my head, but you get the idea. Set next set of ouputs for the desired other light (i use transition but for gear up and locked indication Min=0, max=1). DONT FORGET TO SET THE VALVES TO SHUTOFF=TRUE, it is the very bottom option on the valve config. Your LOW VOLTS light is the same thing (output, valve, light). Set the valve to the desired parameters and voila. There is probaly a more complex way of doing it, but this way works for me. The program is quite simple once you learn its quirkiness. If I have totally confused you please let me know. Forgot to mention, when it asks to set ratio to true..say no.

Tony Hill
08-08-2010, 04:14 AM
Thanks for the suggestions...I'm getting an "invalid attachment" when I try to follow yoyur link though??

I had a look at the programme yesterday for a couple of hours, I got the Phidget working finally (although it said a 6v power supply was OK, mine wouldn't budge it..as soon as I put on a 12vlt it came to life!) but try as i could mucking about with the software I couldn't get it to light the light.

I'm usually OK at seeing how something works if I can pull it apart, but "building" something to work isn't my strong suit!.

Once I can have a look at your circuit I should (hopefully) not have to bother you with any stupid questions!! :)


thanks

Darryl

gokhotit
08-08-2010, 06:35 AM
4129

here is that attachment


the only stupid question (especially around here) is the one not asked.

Tony Hill
08-09-2010, 07:33 AM
Ok, I see how the structure should look but I can't get it to take any notice whatsoever of the actual FS variables. the best I got was the ability to turn the LED on and off with the test button...that was just before it stated to tell me "failed to load resources from resource file" and shut down. Now it won't run at all..same mesage each time .. still, after two complete removals and reinstalls of both the Phidgets Libray and the FS2hidgets programme?

Help?


Darryl

gokhotit
08-09-2010, 09:15 AM
This happened to me a few times forgot what causes it.. the program glitched or whatever, then it save it with the glitch..I had to rewrite mine a few times before it worked fully. Best thing to do is start over and take it a little at a time. when you complete a circuit save a seperate backup and continue, that way if it does glitch, you just revert to the "working copy". Oh,turn off the autosave option.

Tony Hill
08-09-2010, 09:53 AM
Ok, I couldn't even get teh programme to run but you gave me an idea ...that it was the project that was corrupt...I actually found that even though I had deleted the whole program and the directories, when i reinstalled it bought back my project!!!! So that was stuffing it up...I deleted the project (how the ^&%%^$%^& did that survive a complete delete and reinstall??)

So I now have it starting again but will have to leave it until the weekend to have another look at getting it working....cheers mate!! and hope I can lean on you a bit more as I go.


Thanks


Darryl

gokhotit
08-09-2010, 08:55 PM
lean away..I will help where I can..

Tony Hill
08-09-2010, 09:30 PM
Thanks for that. Just to make sure I have the concept right:

For the "Gear down light":
I assign a "high value" to the offset (0FB4 being left gear) say 16383 and make this switch the light on by reading the FSoutput through the valve and into the "output". So when I drop the gear, the offset increases from 0 to 16383 as the gear goes down. When it is down and locked (16383) the light comes on. When I pull th gear up, the value decreases steadily to 0 and the light goes off as soon as the value is 16382 or lower (approximate numbers of course).

I have no "gear transit light" so the other thing needed is to do the opposite on another phidget port for the "up" figure (ie 0FB4 = o) to turn the light on when the gear is "up".

At the moment I can turn the light on and off with the test button, can get the offset reading to follow the sim...but can't make the light come on at the appropriate value?

I have organised some more time Wednesday night now and hope to crack it.

The "UP" is lit by two LEDs and the "DOWN" by four, I presume I need a port for each light and a duplicated circuit for each port.

How am I looking so far?

Darryl

CocnutAir
08-09-2010, 10:54 PM
You have got the SHUTOFF property set correctly, right?

Tony Hill
08-10-2010, 01:07 AM
You have got the SHUTOFF property set correctly, right?


I think so Alan,

the Valve section, shutoff is set to "true' as suggested.

I think the main problem is that I am not at all sure where to put each value, ie the vavle, the light and the input all have spaces for "max" and "Min"... but I can't see whether i need the 16383, for instance, in ALL of them, or just the input etc.

I have a mental block when it comes to software. I used to be able to pull it apart (in the days of dOS and "BASIC") and do whatever i wanted but these days unless it is a GUI and I understand it (ie it is "moron proof") I don't seem to be able to grasp it easily...I either have to do it "parrot fashion" or spend ages learning the software inside out (as I did in over a 100 hours or so with the gauges). It doesn't come naturally at all these days!!

I can at least see the philosophy behind your marvellous software now, just the details are not sinking in! I'll get there!

thanks


Darryl

gokhotit
08-10-2010, 09:29 AM
lets use your gear down light. Goto the valve for that light. Make sure Shutoff is set to true (last value for the valve),got the ComponentValue section set Minvalue to 16382 and maxvalue to 16383. Light will only come on when the gear is down.

CocnutAir
08-11-2010, 01:08 AM
Let me chip in with an analogy:
The valve is like an adjustable pressure valve on a steam pipe.
The FS Variable supplies the "steam pressure".
The valve shuts off the steam supply (Shutoff = True) when the supplied "pressure" is outside its Min and Max Value. If the pressure from the FS Variable is outside the valve's range, the valve switches off the steam supply completely. The digital output that is connected downstream to the valve receives no steam and the light goes off (LEDs aren't really steam-powered these days, at least not directly).

If Shutoff = False, the valve will restrict the line "pressure" to a range between the valve's Min and Max setting. In this mode, the valve acts more like a regulator.

I only added this steam analogy to, hopefully, help others who might also be struggling with the concept, not to imply in any way that you were being slow. I don't want you to get wrong idea. Any person that can replicate a Spitfire is pretty sharp.

Let me know if you think I should try this approach in the documentation. If this did not work for you let me know too.

Regards,
Alan

Tony Hill
08-11-2010, 11:27 AM
OK, gokhotit... Thanks, yes I see so I was on the right track.

Alan,

No offence taken, largely because when it comes to this I AM slow....but I am at last starting to catch on, the steam makes sense.

I have, tonight, got the Undercarriage lights working. I have so far been unable however to tie them to the main battery. I have two lights for "UP", one left and one right and four lights for DOWN..two left and two right...ONLY so that each letter in the words has its own LED for light distribution. So at the moment when the left gear retracts, say, that light comes on "U" and then a few seconds later the "P" comes on as the right gear hits the well. This is necessary to track both wheels, but it is NOT how the Spitfire gear indicator works. In reality unless BOTH wheels have retracted fully NO "UP" indication comes on...same for "DOWN"

So I have to work out how to give them independant lights (done) but make them co-dependant (to be done). I guess the theory for that will work for the lights being restricted to when the Generator is on!!

The LOW VOLTS light is also problematic as I can't seem to find which offset the A2A Spitfire uses for the light.


Thanks guys, any help wth the next step would be appreciated....I am out of town on business until Saturday now though,

THANK YOU BOTH!!!!!!!!


Darryl

CocnutAir
08-13-2010, 12:14 AM
If there was an offset for a switch that detected when the left undercarriage is up and locked and another offset for a switch on the right undercarriage would that help?

You could connect both switches in series to the UP lights. If both switches are closed the UP lights would go on. In other words, both switches would have to be closed for the UP lights to come on?
Each switch only closes when their respective undercarriage is up and locked.
Would that work?

Regards,
Alan

gokhotit
08-13-2010, 01:05 AM
That sounds like it might work.. If both offsets are in the same line as both lights with a valve in between each offset, then both lights at the end, sound good. Something like this:

--rt gear--valve--lr gear---valve---U light---P light--

CocnutAir
08-13-2010, 10:55 PM
Don't need the valves:

rt _gear_switch -> lt_gear_switch -> U_ light -> P_ light

gokhotit
08-14-2010, 06:37 AM
didnt know there were actualup switch offsets...learn something new everyday

CocnutAir
08-14-2010, 01:03 PM
There isn't such an offset, but one can use the existing gear offsets to make an FS Variable that is a switch. Stay tuned. I will show you how to do that in a follow-up response.

Tony Hill
08-14-2010, 01:05 PM
Hi guys, back form the business trip.

I had a bit of a look today....I can't find an offset for "gear up", left or right...just one for "state" that varies from 16383 or so to 0. I will awit tomorrow's instalment from Alan.
I think I understand what you are getting at to make them co-dependant now though.

Another question...some offsets (2400, RPM for instance) read, say, 0-3600 in my gauge software but in FS2PHIDGET the value will wildly fuctuate between MANY millions positive and negative. AMPs is the same. Am I missing something...the RPM particularly should be straight forward and 1-35 amps seems simple enough?

Anyway, tomorrow will have to be split between the office, the remake of the trim panel and the lights


thanks again, closer every second to understanding this.



Darryl

CocnutAir
08-14-2010, 01:49 PM
Here is how to set up FsVariables and circuit I described:
From the menu bar select Tools -> Manage FsVariables.
If the incorrect FS File is not displayed, Open correct file from the menu bar.
From the FS Variable drop down, select LANDING_GEAR_LEFT.

On the menu toolbar selet FSVariable -> New.
Enter GEAR_LEFT_UP_SW as the variable name when prompted.
Click OK button to close the text box.
You now have a new fSVariable that is a copy of LANDING_GEAR_LEFT.
In the FsVariable property box change the:
ValueFunction from Proportional to Digital.
Set HighValue to 0.
Set LoValue to 1.

From the FS Variable drop down, select LANDING_GEAR_RIGHT.
On the menu toolbar selet FSVariable -> New.
Enter GEAR_RIGHT_UP_SW as the variable name when prompted.
Click OK button to close the text box.
You now have a new fSVariable that is a copy of LANDING_GEAR_RIGHT.
In the FsVariable property box change the:
ValueFunction from Proportional to Digital.
Set HighValue to 0.
Set LoValue to 1.

From the menu bar File -> Save.

Create a new circuit.
Add an FS Output component.
Assign the component to FsVariable GEAR_LEFT_UP_SW.
Add another FSOutput in series.
Assign the component to FsVariable GEAR_RIGHT_UP_SW.
Add Digital Outputs in series.
Label the one output U, and the other P.

You don't have to assign the digital outputs to Phidget outputs
until you have tested the circuit.

CocnutAir
08-14-2010, 01:53 PM
I have most probably set up the RPM and Amps FsVariables incorrectly.
Let me have the offsets you using for those again.

CocnutAir
08-14-2010, 02:06 PM
Just looked in FS Files. I don't have offset 2400 in those.
Did you create a custom FsVariable for offset 2400?

Tony Hill
08-14-2010, 08:21 PM
Just looked in FS Files. I don't have offset 2400 in those.
Did you create a custom FsVariable for offset 2400?

Alan,

OK, now I can see part of why I have been having SO much trouble.....I don't have any usable offsets (for the Spitfire) in any file...the only ones that are "in" your software here are a few autopilot offsets and other "airliner" type ones in a file called 737_MCP.xml or similar (sorry, I'm away from that machine and at work today). That is the only file that is available in any of the drop down boxes and the only one I can see in the directories under Explorer. Therefore I am using my gauge software to plough through the entire list of raw variables from FS2000 and before to FSX, testing the output in that programme and then creating new variables in your software.

So things like "gear left" are straight forward but obviously others aren't.

I've been wondering why so much was apparently left to the user and it was assumed that he had access to offsets...but I am also somewhat aware of the problems you have had with people and therefore assumed that you had created very powerful software, were tired of dealing with silly questions from ungrateful and abusive morons and expected people who used it to at least have basic programming abilities (as, it appears to me that SOIC, EPIC and other things that seem esoteric to me expect :-? ).

I wish now that I had at least asked "is there an easier way to get at the offsets?" :cry: that may have revealed the problem earlier but again, I thought a "soldier on" attitude best. :oops:

Now lest I am being a COMPLETE moron (entirely possible) and I'm missing something basic....where do I find all these variables? I would have expected a file called 737_basic variables.xml, another called 737_sundry controls.xml etc to go with 737_MCP.xml (main control panel??) If so, I am missing them.

So, my apologies for wasting some time and asking what now seem to have been some very silly questions!!! Please do not take anything I've said as criticism...as I said, I am aware of some of the "history" and perhaps was a little too ready to write any difficulties off as being (in the words of my dear departed grandmother) "T'ICK" :oops::oops::oops:

best


Darryl

gokhotit
08-15-2010, 01:07 AM
A lot of time payware manufaturers create there own offsets that wont show up in the standard FSUIPC offset log (which is what allan uses). He is building a 737 sim (hence the 737 offset section) and I believe (correct me if i am wrong) it is geared toward the PMDG 737. IF you download the FSUIPC toolkit, there is a utility call FS interregate ( or something like that). YOu can use that program for a complete list of offsets. OR you can contact the company that made the Spitfire model you are using, tell them what you are doing, and see if they will give you a list of the offsets they use. It is HIGHLY unlikely they will do that, but it is worht a try.

Once you either get the offset from the company or use FSINTERRIGATE, you can then create the custom offsets that you require for your sim within FS2P5.

Hope that helps.

Tony Hill
08-15-2010, 08:01 AM
Thank, yes that makes it a WHOLE lot easier!!! I have this afternoon got the whole lot working except that I still need to separate the U/C lights from the generator switch as they actually had their own power switch in the Spitfire and you could (and it was compulsory to) activate them for checking on entry to the cockpit by means of a separate switch connected to the accumulator.

Thanks to all the advice, the gear lights now come on TOGETHER and ONLY when the both wheels are down or up.

I used the SDK to dig out exactly how the RPM worked and although I can't make the Low Volts work on "power" I can make that light come on and off at the correct time with RPM.

Real progress once I realised that there were many more tools that I needed!!

cheers both!


Darryl

CocnutAir
08-15-2010, 02:22 PM
Darryl,

That is a problem. Fs2Phidgets has always come with a usable set of offsets.
If product is not working as advertised than let me know sooner.
Copy FSVariables4316.xml from the folder where you installed fs2phidgets to the FsVariables folder.
737MCP are offsets for project Magenta's 737 MCP.

Regards,
Alan

CocnutAir
08-15-2010, 03:07 PM
I have uploaded 5.0.21 to Downloads page.
As soon as the Dee or Matt have approved, it will be visible for download.
This takes care of minimized bug and will copy offsets file to fsvariable folder.

Tony Hill
08-15-2010, 08:03 PM
Cheers Alan,

Yes, I know but didn't want to be one of the "complainers" when I wasn't really aware that something wasn't working properly. I truly appreciate the help though!!

Maybe the Steam Valve analysis and a definate note in the manual to select from "available" variables may have helped. But the main problem really was that, for me, this was a very small part of the overall job, to be done in a hurry...and I never intended to "learn" the programme... a mistake to say the least.

That, in hind sight, seriously handicapped me. The only excuse that I have to offer is that I had looked at the old version some time ago and it "seemed simple enough" to get three lights working. There is no doubt that they are now working much better and more accurately than they would have under the old version. (but in any case W7 64 bit wouldn't run the old stuff on my machine ).

So another of my grandmother's old wise sayings applies...usually the longest distance between two points is the "short cut".




I'll still have to play around with a seperate "U/C light power switch but I'm almost there now,


Thanks again to you and Gokhotit for the help, courtesy and patience,

Darryl