Hard Settings for Phidgets bridge 1046

Supporting Visual Studio on Windows
gwilkinson
Phidgetsian
Posts: 8
Joined: Thu Sep 01, 2011 5:00 pm
Contact:

Hard Settings for Phidgets bridge 1046

Postby gwilkinson » Tue Jan 28, 2014 3:30 pm

I have been using a Bridge and an RFID module for many years now in a research project involving pigeons and I would like to slim down the need for controls in the interface.

I would like to eliminate the following from my UI and hard code the specific settings

1- Gain
2- Datarate

3- Possibly the actual bridge control as well since we only use one of the four available

In eyeballing the samples again where would I set these statically, The Form Load event when the bridge is connected?

Thanks as usual! I know this answer is right in front of me but visual studio is being a dumdum and dislikes any syntax I try.

User avatar
Patrick
Lead Developer
Posts: 3064
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Hard Settings for Phidgets bridge 1046

Postby Patrick » Tue Jan 28, 2014 3:52 pm

You would set these in the bridge attach event callback function.

-Patrick

gwilkinson
Phidgetsian
Posts: 8
Joined: Thu Sep 01, 2011 5:00 pm
Contact:

Re: Hard Settings for Phidgets bridge 1046

Postby gwilkinson » Tue Jan 28, 2014 4:38 pm

Great thanks!

Now I am hoping you can shed some light on an issue I have been having recently since upgrading to Visual studio 2012/2013...

I know the phidgets libraries are built on .Net 2.0 and is supposed to be compatible in higher runtimes IE: 3.0 4.0 4.5.1 etc. (Unless I am mistaken) I have been getting a warning saying that Phidgets.Bridge is not available in the target framework and my main for refuses to load. Heres the weird thing, If I ignore and continue sometimes it works as intended like it always has before...other times it breaks the project and none of my UI element work anymore.

In the past I would put the

Code: Select all

<startup useLegacyV2RuntimeActivationPolicy="true">
flag in my app config. Now this does not seem to be working...... Any idea why Visual Studio seems to hate the bridge?

I need to be running .Net 4.0 Minimum as my target framework otherwise other portions of my app break....

gwilkinson
Phidgetsian
Posts: 8
Joined: Thu Sep 01, 2011 5:00 pm
Contact:

Re: Hard Settings for Phidgets bridge 1046

Postby gwilkinson » Wed Jan 29, 2014 4:28 pm

I seem to have resolved the issue... I went ahead and created a fresh project and imported my working forms and modules in and rebuilt the form causing issues. building on 4.5.1 framework and things are working great again. something in the parent form was just broken and now phidgets.bridge is reporting as ordered.....

Silly VB - Thanks!

gwilkinson
Phidgetsian
Posts: 8
Joined: Thu Sep 01, 2011 5:00 pm
Contact:

Re: Hard Settings for Phidgets bridge 1046

Postby gwilkinson » Fri Feb 07, 2014 3:14 pm

I have been able to set my data rate to a static 512ms in my Bridgeattach() call but I am still having trouble setting the Gain to 32. What syntax would get this done? I tried following without success:

Code: Select all

Dim Gains As Phidgets.BridgeInput.Gains
Gains = BridgeInput.Gains.GAIN_32


Am I barking up the wrong call all together?

Thanks Patrick!

User avatar
Patrick
Lead Developer
Posts: 3064
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Hard Settings for Phidgets bridge 1046

Postby Patrick » Fri Feb 07, 2014 4:05 pm

Something like:

Code: Select all

Bridge.bridges(0).Gain = Phidgets.BridgeInput.Gains.GAIN_32

Gain is set per channel, where DataRate is set for the whole board - so you just need to set it for the channels you are using.

-Patrick

DenisFerrari
Phidgetsian
Posts: 12
Joined: Tue Mar 28, 2017 12:41 am
Contact:

Re: Hard Settings for Phidgets bridge 1046

Postby DenisFerrari » Tue Apr 04, 2017 4:50 pm

I'm having same issue on Visual Studio 2017, after few days working openin forms it says Phidgets.Bridge is not available in the target framework...

Any idea ?

Thank you

gwilkinson wrote:Great thanks!

Now I am hoping you can shed some light on an issue I have been having recently since upgrading to Visual studio 2012/2013...

I know the phidgets libraries are built on .Net 2.0 and is supposed to be compatible in higher runtimes IE: 3.0 4.0 4.5.1 etc. (Unless I am mistaken) I have been getting a warning saying that Phidgets.Bridge is not available in the target framework and my main for refuses to load. Heres the weird thing, If I ignore and continue sometimes it works as intended like it always has before...other times it breaks the project and none of my UI element work anymore.

In the past I would put the

Code: Select all

<startup useLegacyV2RuntimeActivationPolicy="true">
flag in my app config. Now this does not seem to be working...... Any idea why Visual Studio seems to hate the bridge?

I need to be running .Net 4.0 Minimum as my target framework otherwise other portions of my app break....


Return to “VB .NET”

Who is online

Users browsing this forum: No registered users and 1 guest