Jump to content
The simFlight Network Forums

Recommended Posts

Posted

GDay Peter. I am a newbie to FSUIPC and have been studying the forums closely to help me get off the ground

I am using FSX, with the Premier Aircraft CRJ200 and I have the NPSimpanel for the 700 installed in the crj200 panel.cfg - All works Well

I am running SIOC and mastercards from Opencockpits

My question

there are 4 X buttons on the NPSimpanel overhead for Hydraulic Switches

When Logging the switch movement I get the following code

433932 *** EVENT: Cntrl= 66712 (0x00010498), Param= 0 (0x00000000) HYDRAULIC_SWITCH_TOGGLE

451997 *** EVENT: Cntrl= 66712 (0x00010498), Param= 1 (0x00000001) HYDRAULIC_SWITCH_TOGGLE

456147 *** EVENT: Cntrl= 66712 (0x00010498), Param= 2 (0x00000002) HYDRAULIC_SWITCH_TOGGLE

462621 *** EVENT: Cntrl= 66712 (0x00010498), Param= 3 (0x00000003) HYDRAULIC_SWITCH_TOGGLE

From the information above how do I find the offsets so I can then compile them into my SIOC script

I have tried one offset I found for Hydraulic switch ($341E) however when I use that and actuate my Hardware switches the switches in NPsimpanel don't move like all the others I have programmed

Thanks in Advance

Kevin

Posted

there are 4 X buttons on the NPSimpanel overhead for Hydraulic Switches

When Logging the switch movement I get the following code

433932 *** EVENT: Cntrl= 66712 (0x00010498), Param= 0 (0x00000000) HYDRAULIC_SWITCH_TOGGLE

451997 *** EVENT: Cntrl= 66712 (0x00010498), Param= 1 (0x00000001) HYDRAULIC_SWITCH_TOGGLE

456147 *** EVENT: Cntrl= 66712 (0x00010498), Param= 2 (0x00000002) HYDRAULIC_SWITCH_TOGGLE

462621 *** EVENT: Cntrl= 66712 (0x00010498), Param= 3 (0x00000003) HYDRAULIC_SWITCH_TOGGLE

From the information above how do I find the offsets so I can then compile them into my SIOC script

Won't this SIOC thingy send button presses? Then it would be easy -- just assign to those controls with those parameters.

I have tried one offset I found for Hydraulic switch ($341E) however when I use that and actuate my Hardware switches the switches in NPsimpanel don't move like all the others I have programmed

At present writing to offset 341E merely uses HYDRAULIC_SWITCH_TOGGLE with a parameter of 0. I didn't realise it took a parameter to operate 4 switches. However, writing 1 to 341E when it currently contains 0, or vice versa, should operate the first switch, as it will send the same value.

Possibly the panel has been written in such a way that toggling the switch sends the control to FS, but changing the simulated switch in FS isn't reflected in the graphical switch position. That would be a shortcoming in the programming of the panel -- not a lot you can do about that, unless it is using a Local Variable which you can access (see "L:Vars" in the dox).

See if using 341E does actually change the hydraulic operation in FS. If so, then it is only a graphic problem. If it works let me know and I'll possibly extend 341E to use 4 bits, one for each hydraulic switch.

Regards

Pete

Posted

Thanks for the reply Peter

I came across some code that works.... ALl I do is change the PAR and the switch number to the required one it changes the required switch.

I just have to brush up on my Skills with SIOC so I can have more than one switch working.. At the moment when I add the script 4 times to the code and change the PAR and Switch values required for each switch the first actuation of a switch seems override the rest and the PAR remains the same . So if anyone out there can supply me the code below for 4 switches (10,11,12,13) with 4 different PAR (0,1,2,3,4) I would totally apprieciate it

Var 1 name FS_CONTROL Link FSUIPC_OUT Offset $3110 Length 4

Var 2 name FS_PAR Link FSUIPC_OUT Offset $3114 Length 4

Var 3 Link IOCARD_SW Input 12 Type I

{

&FS_PAR = 1

&FS_CONTROL = 66712

&FS_CONTROL = DELAY 0 10

}

Posted
At the moment when I add the script 4 times to the code and change the PAR and Switch values required for each switch the first actuation of a switch seems override the rest and the PAR remains the same .

Sorry, I don't understand. Each parameter value (0 to 3) operates the correct switch, but also reverses the other three? Is that what you mean?

Or do you just mean that the SIOC code doesn't work. I don't know anything about SIOC, but I assume that when you reproduce that section 4 times you would need to renumber the "Var 3 Link" for each switch?

Pete

Posted

Sorry, will try to explain better

When I add 1 (One) switch code it works.

Whatever PAR and Switch Input I use it changes the right switch on the NPSimpanel

But when I add all four switches to complete the code for the Panel , I actuate one of the switches and it works but when I actuate another switch it turns the first switch on and Off.

It is like the first actuation of a Switch via its PAR seems to lock or hold that value of the input code, it doesnt reset after actuation. (Does that make sense)

I presume it is something I have written wrong in my coding.... (Have to remember I am a compete novice at this)

Posted
Sorry, will try to explain better

... I presume it is something I have written wrong in my coding.... (Have to remember I am a compete novice at this)

Okay, I understand your problem now, but unfortunately since I know nothing about SIOC I cannot really help. Does SIOC have a Support Forum? Or else you could try the Forums at MyCockpit -- there are a number of SIOC users there.

http://www.mycockpit.org/forums/

Regards

Pete

Posted

At present writing to offset 341E merely uses HYDRAULIC_SWITCH_TOGGLE with a parameter of 0. I didn't realise it took a parameter to operate 4 switches. However, writing 1 to 341E when it currently contains 0, or vice versa, should operate the first switch, as it will send the same value.

I've checked, and it seems that the HYDRAULIC_SWITCH_TOGGLE control takes parameters numbered from 1, so that agrees with your findings. And I can also read the switch states separately in SimConnect. So in the next update for FSUIPC4 I have changed offset 341E to use separate bits for each of the 4 possible switches.

[LATER]

If you want to try using the offset 341E in this way, try

http://fsuipc.simflight.com/beta/FSUIPC4608.zip

Bit 0 = pump 1, bit 1 = pump 2, bit 2 = pump 3 and bit 3 = pump 4.

Regards

Pete

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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.