View Full Version : TEST switch and blinking for my LED's
AK Mongo
03-06-2012, 10:38 PM
Gentlemen,
I am using a LED 64 card and fs2p5 for my cessna annunciator panel. I have everything conditionally working to light under the correct circumstances. My problem, is that I am trying to add 2 new functions and am stumped.
1. I want to add a test switch to my panel that will light up all of the outputs when engaged, regardless of the variable status (other than BUS VOLTAGE probably).
2. I would like to add a function that causes the warnings to blink for 10 seconds and then stay lit steadily.
Does anyone have any help for accomplishing this?
Thanks,
Reid
Tom_G_2010
03-07-2012, 08:05 AM
I was testing a bit of this last night but wasn't able to get either function working properly. I'm looking for the logic/FS2P component equivalent of a diode and with that the lamp test feature is feasible. For the 10 second blink I was experimenting with a combination of counters and timers but didn't get to a workable solution yet. Will keep hammering at it until solved....
Are you using FS2P V4 or V5 now? I'm still using 5 even though it was announced that it won't be seeing any further development. I like the graphical schematic based interface way to much. I'm hoping he will build that into a future release of V4.
AK Mongo
03-07-2012, 01:51 PM
Tom,
I am indeed still using 5, as my project was almost finished when development reverted to 4. Did not want to reinvent the wheel. It would be great if there was a software solution to the test switch.
I have been thinking about a hardware solution.
If I ran a power source through a switch, that went to the led's when closed I could just use it as a test switch. Not certain how that would interface with the led array I have now, in which each diode is attached to both + and - from the phidgets card. Don't really know enough about electronics theory to design it right now without extensive trial and error testing.
Can the led's be hooked up to a common ground on the card, or do they need to all be individually hooked up?
Reid
Tom_G_2010
03-07-2012, 03:15 PM
Tom,
I am indeed still using 5, as my project was almost finished when development reverted to 4. Did not want to reinvent the wheel. It would be great if there was a software solution to the test switch.
I have been thinking about a hardware solution.
If I ran a power source through a switch, that went to the led's when closed I could just use it as a test switch. Not certain how that would interface with the led array I have now, in which each diode is attached to both + and - from the phidgets card. Don't really know enough about electronics theory to design it right now without extensive trial and error testing.
Can the led's be hooked up to a common ground on the card, or do they need to all be individually hooked up?
Reid
I'll have to look at the card schematic to see if a common ground could be used. Sure would streamline the amount of wire I need to run.
As for a hardware solution to test, yes that is feasible and would only need some small diodes to prevent back feeding the P64 board. I'm still shooting for a software solution, but if I can't get there a hardware solution is available.
Tom_G_2010
03-08-2012, 01:21 AM
I was able to get the blinking function working with a timer looped back on itself through a valve. As a test I setup a low fuel warning lamp. The initial value of the bottom timer establishes the flash rate. The Initial value of the upper timer determines how long it blinks before the lamp turns on steady.
6327
Now I'm off to figure out the lamp test function.
Tom_G_2010
03-08-2012, 03:43 PM
It was way to simple! Of course I have to wait until I get home to test it all with a live P64 board...
An LED can be hooked to two different input components in the script but it took a little hand editing of the XML file. In the example below I have my blinking low fuel indicator from the prior post and I added two other simple switch/LED pairs to represent other warning lamps. All are connected to a single lamp test switch.
6329
AK Mongo
03-20-2012, 06:30 PM
Tom,
I received your file, and am having trouble making it work.
Do you know how I can assign the functions you created to the phidget serial I am using? It does not seem to want me to assign these functions to my card...
Tom_G_2010
03-20-2012, 06:44 PM
Tom,
I received your file, and am having trouble making it work.
Do you know how I can assign the functions you created to the phidget serial I am using? It does not seem to want me to assign these functions to my card...
I have started to have the same trouble on my end. I thought it was caused by my loading the latest library update from Phidgets but if the file is not working for you either I am suspicious of that file. Could you tell me if your script files are still able to map to the Phidget ports. If you can do that with your script files then some type of corruption may have found it's way into mine.
AK Mongo
03-20-2012, 09:24 PM
Tom,
Not sure exactly what I did...
It is now working fine on my end.
I am using fs2p5.0.21
fsuipc 4.704 (although I would have sworn that I updated to 4.80 recently!)
phidget21 version 2.1.8 and COM library 2.1.8
fsx accel
winxp sp3
I know you are using win7, but are you similar on the other versions?
Reid
Tom_G_2010
03-20-2012, 10:45 PM
Correct on the Win7 64bit.
FSUIPC is either 4.80 or I think he released 4.81 and I may have downloaded just after that. I'm away from the FSX PC at the moment though. I'm running the same version of FS2P as you and the phidget21 library is 2.1.8, the Feb 16 2012 14:03:09 build and the phidget21.net is 2.8.94
AK Mongo
03-20-2012, 11:17 PM
Ok, one of the things I tried was opening a second instance of fs2p5. It seemed to populate and I was able to assign components. May be worth trying.
You did a great job with the timers. I adjusted them a little to get a higher blink frequency and quicker advance to steady but you made it easy!
I am having two little issues. The low fuel light has a really rapid blink that is continuous if only one tank is low. It is continuous if both are though. Strange....
I am also having trouble getting the suction output to light at all. The test switch lights them up, but I can't get them working normally. Edit: The suction variable was not set correctly in 43.16. Works GREAT now!
Anyway, keep trying and good luck, sir.