PDA

View Full Version : FS2Phidget5



johnnyg
01-04-2011, 06:17 PM
Can anyone tell me how this works FS2Phidget5. I can't seem to grasp it. All I would like is for someone to show me how to simply turn on and off an led using this program.Where do you put the data and how do to run the program to do this. Using a 1031 - PhidgetLED-64 Advanced is this the right one for doing this or do I need another one? They really confuse people when they say plug and play.:(

AK Mongo
01-05-2011, 02:16 AM
The basics go like this for the LED64:

open fs2phidget
create an FS Output by clicking on that item in the component list. (top left under the box that says toolbox). This output should then show up in the gray box at lower right.
set this output to whatever you are trying to do in the sim by clicking on it in the gray window, and scrolling down the menu in the top right corner that has three tabs(component, fsvariable and lookup). You are looking for section 4 that is titled fsvariable in the COMPONENT tab. click on the dropdown titled fsfile and choose the file that looks something like "FSVariables4316.xml". In the next line down titled FsVariable, pick the fsuipc variable that you are trying to read from fs.

Next you need to create a digital output. Click on that item in the component window, and it should show up in the gray box connected with a green or red line to the right of the digital output you created.

That is basically the process, but there are many different choices you can make within the component drop down that can make this process more frustrating, and there is no substitute for reading the manual and this forum if you are having trouble. Most likely you won't find the answewr there and need to find them through playing with settings, unless you are doing something really common.

If you let us know what you are trying to do, you may get more specific advice.

FS2P5 is very powerful, and will do what you want, but it most certainly will not be plug and play.

Let me know here what you need, and I will help all I can. I have used the program to make a cessna style warning panel(low fuel, oil pressure, vaccuum, volts) and OMI Markers. Can't help at all with any of the Pm, LevelD, or PMDG stuff if that is what you are after.

Good Luck!

Reid

johnnyg
01-05-2011, 01:15 PM
ok got to here (Next you need to create a digital output. Click on that item in the component window, and it should show up in the gray box connected with a green or red line to the right of the digital output you created.) but what makes the LED light up? every time I go to test it gives a error message.

AK Mongo
01-05-2011, 02:59 PM
Forgot to write that in the digital output you need to choose a physical location it is associated with(1-63). Plug the cable into that location and the test button should illuminate all if the connected outputs.

If you let us know what the error message says, we may bs able to help more if the above is not the issue.

johnnyg
01-05-2011, 03:10 PM
OK where do I find this box to change this (in the digital output you need to choose a physical location it is associated with(1-63).) Where do I find this physical location thing?

AK Mongo
01-05-2011, 04:28 PM
Should have said 0-63. You need to click on the digital output, then click on the open slot you want to assign it to. With your card plugged in, the slots will appear in the gray box just to the right of where you picked the component. That should do it.

johnnyg
01-05-2011, 04:57 PM
ok did all that and this is what I get in the error message when i click on 1 thats where I have the wire to the phidget plugged into (See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: The parameter is incorrect.
at Phidget21COM.PhidgetLEDClass.set_DiscreteLED(Int32 Index, Int32 pVal)
at XSystem.frmMain.TestComponent()
at XSystem.frmMain.cmdComponentTest_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2470
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
FS2Phidget5015
Assembly Version: 1.0.3669.33316
Win32 Version: 1.0.3669.33316
CodeBase: file:///C:/Program%20Files/FS2Phidget5/FS2Phidget5015.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2470
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.6001.4
CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
Accessibility
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------
Interop.Phidget21COM
Assembly Version: 2.1.0.0
Win32 Version: 2.1.0.0
CodeBase: file:///C:/Program%20Files/FS2Phidget5/Interop.Phidget21COM.DLL
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.


+

AK Mongo
01-05-2011, 05:12 PM
Never seen this, and this is Wwwwwwaaaaayyyyyy beyond my ability to help. Might try to pm CocnutAir. His name is Alan, and he wrote fs2p. Other than that, reinstallation of fs2p might be in order. Sorry I can't help more.

Reid

AK Mongo
01-05-2011, 05:17 PM
Just noticed the error message says fs2p 5015. Are you using the latest version? I think they are up to 5021 now. It is available in the downloads section of this site.

Reid

johnnyg
01-05-2011, 05:35 PM
Hey that did the trick led works with assignment to button. Thanks a million. Had to use updated fs2phidget file. One other question if you don't mind is. Can you control the brightness of the led in some way?

AK Mongo
01-05-2011, 05:43 PM
I think so. How to do it is undoubtedly in the manual, or in a forum search. Sorry, I have not played with that yet, but I remember other posts that addressed it.

johnnyg
01-05-2011, 06:07 PM
Thanks I will look around for it. There for a while I though I was going to have to send all this back but now it looks like I have suceeded in getting started to build my cockpit.

AK Mongo
01-05-2011, 10:21 PM
Sounds good, enjoy the journey. When you find the answer, please post it here. Might make it easier on the next guy.

Reid