Jump to content

Oakes SIOC Export/Import Scripts


Oakes

Recommended Posts

Thanks Superbus, tried but no effect.

 

Question, if using the basic scripts as is ( using Oakes "Export_0_93_beta"). is there some mandatory actions in the files (Export.lua, ExportSupport.lua etc) thats need to be edited or enabled to get the outputs work ? (just if the defined set may be correct but failes due to another reason)

 

For 3-pos toggles, haven't got that far yet, sorry. focusing right now to get the first step made on the ones connected (have 2-pos switches only on the fuel quad)prior to connect the others.

 

Really appriciate you helping out. Hope I'm able to return the favor somehow

 

Cheers

Gus

- - - -

Link to comment
Share on other sites

  • Replies 125
  • Created
  • Last Reply

Top Posters In This Topic

I started to read through your files again and I think line 134 in your Export.lua is wrong. You never send your warningIndicators, you are only sending some (I'm guessing) variometer data:

 

  lSIOC_SendString = lSIOC_SendString..Variometer(gVariometerSIOCParam)

Try this instead:

  lSIOC_SendString = lSIOC_SendString..ProcessIndicators(gIndicatorTables)

This would all be in line with the the fact that your switches work but your indicators do not. Indicators are updated after each frame, switches are updated before the simulation frame. This line is only executed after a frame.

 

I found out that the line I told you about earlier (gIndicatorTables = etc.) is duplicated in your siocConfig, so moving it is not necessary. It's redundant and can be removed altogether from Export.lua, as long as you keep it in siocConfig.

 

Question, if using the basic scripts as is ( using Oakes "Export_0_93_beta"). is there some mandatory actions in the files (Export.lua, ExportSupport.lua etc) thats need to be edited or enabled to get the outputs work ?
Sorry, I don't remember which one was "0_93_beta" but I'm afraid none of them work with any version of DCS A-10C without modifications, because they are for Black Shark. The way DCS A-10C handles input and output has changed at least once too, so not all Lua code for A-10 out there works any more with the current version.
Edited by LeLv30_Superbus
Link to comment
Share on other sites

One more thing I noticed: I had to reverse the "=0:" and "=1:" in ExportSupport, please see comments:

 

               
lSIOC_SendString = lSIOC_SendString..lSIOC_Var.."=1:" -- In my cockpit "1" turns the led OFF - go figure!
           else
lSIOC_SendString = lSIOC_SendString..lSIOC_Var.."=0:" -- In my cockpit "0" turns the led ON

These would be on lines 38 and 40 in your ExportSupport.lua.

Link to comment
Share on other sites

  • 2 weeks later...

It woooooorks !!!

 

I can't thank you enough, mate. It's so bleeding beautiful just to see these small LEDs blink.

 

Absolutly wonderbaum

 

I owe you big time my friend, Rep inbound and highly deserved. I finally see a future in my Rig, hehe

 

(only made a preliminary connection soo far, have to rearrange the IOCards and install the P/S in the correct place. Will post the result in near future

 

Cheers (and thanks again) Sorry for being a bit sentimental here but the feeling of getting it to work is super

 

Gus

edit: Sorry SuperBus. Unable to add rep to you currently, due to forum rules, will clear that debt in the future, hehe.


Edited by Duckling

- - - -

Link to comment
Share on other sites

  • 2 weeks later...

Rotaries and gray encoders (to a mastercard) now working great but I run into a problem connecting a 3 pos rotary that had a "missing" wire (had to cut down to save some ports)

For you veterans here using SIOC coding I'm sure this is old news but to ease the task for next one entering the quiz...

 

(same approch should be working also to generate 3 values out of a 3 pos switch On-Off-On switch, where middle position has no connection)

 

Example here is the VHFAM Radio mode select Rotary (dev 55, knob 3):

 

3 pos rotary, with no connection to pin 1, the "OFF" position of the Mode switch. Pin 2 [Mode TR, input 36, Var 46] and pin 3 [Mode DF. input 37 Var 47]. Var 45 is the one forwarded to siocConfig.lua

 

# In siocConfig.lua:

[45] = {SimpleRotary, 55, 3} -- ANARC186-VHFAM-MODE

 

# In sioc.ssi:

Var 0045, name VHFAM_MODE_act // PTR-ANARC186-VHFAM-MODE_action

 

Var 0046, name VHFAM_MODE_TR, Link IOCARD_SW, Input 36, Type I // PTR-ANARC186-VHFAM-MODE_TR set

{

IF &VHFAM_MODE_TR = 0

{

IF &VHFAM_MODE_DF = 0

{

&VHFAM_MODE_act = 1

}

}

IF &VHFAM_MODE_TR = 1

{

&VHFAM_MODE_act = 2

}

}

 

Var 0047, name VHFAM_MODE_DF, Link IOCARD_SW, Input 37, Type I // PTR-ANARC186-VHFAM-MODE_DF set

{

IF &VHFAM_MODE_DF = 0

{

IF &VHFAM_MODE_TR = 0

{

&VHFAM_MODE_act = 1

}

}

IF &VHFAM_MODE_DF = 1

{

&VHFAM_MODE_act = 3

}

}

 

Hope it can be of some help

 

Cheers

Gus


Edited by Duckling

- - - -

Link to comment
Share on other sites

  • 2 months later...

Hello Oakes!

I have problem with synchronise virtual cockpit with real cockpit

 

You say:

Hmm, well the only way to "fix" this problem is to run through a checklist before start-up and set the switches to the correct positions. No other way that I can think of......

 

When you first connect DCS to SIOC you tell SIOC which variables you are interested in and SIOC then sends the status for all these variables. If you disregard this answer then the switches of the virtual cockpit will remain in their startup position but of course they might not match with the physical switches (not until you manipulate your physical switch that is).

After I start the game i must manipulate physical switches, then virtual cockpit match with physical.

 

Other day switches are sets correctly after at second launch game (not working with first run). I don't know what happened, now it's not working at all.

 

Sorry for my english

Link to comment
Share on other sites

Hi Lancer. some input (but remember that I'm far as skilled as Oakes and several others here, so I might be getting this wrong, LOL)

 

Have something of the same situation myself where sometime I have to activate a switch twice before anything happends.

You can (If I understood things correct) use either SIOC Var "0" to initilize VARs at SIOC start or use LUA to trigger the same thing.

 

 

When SIOC starts, If not mitigated all Vars are uninitialized, i.e. regardless of what the switches position are, their position is unknown seen from the SIM. When you activate'em, their values in SIOC will respond accordingly but it's also dependent on how you connected em and coded their values that going into SIOC.

If recycle the DCS while having the SIOC started, SIOC Var's will still have an active state in the "database" of the last known value/position (at least I think ;-)

 

I haven't ventured into this due to time and effort so far. Also interested in a more clear description of the case so anyone up to it please correct me and/or fill in the blanks

 

Cheers

Gus


Edited by Duckling

- - - -

Link to comment
Share on other sites

Thanks for you reply Duckling

 

I try with VAR 0 but doesn't work.

I think have solution. I use one input to synchronise switches.

This is part of my code:

 

Var 9000, Link IOCARD_SW, Input 43 // Synchronise button
{
 IF &WP_GUNSIGHT = 1
 {
   &WP_GUNSIGHT = 1    
 }
 ELSE
 {
   &WP_GUNSIGHT = 0    
 }
}

Var 0109, name WP_GUNSIGHT, Link IOCARD_SW, Input 12, Type I     // Weapon Panel Gun Sight

This is now working but need futher tests

Link to comment
Share on other sites

  • 4 weeks later...

Dear Oakes, I have used your scripts with DCS A10 with a little modification ( http://www.ru.wiki.eagle.ru/showpost.php?p=1033108&postcount=1 )

 

They work perfect !

 

The only thing that I cannot resolve is how to add HELIOS compatibility because with your files HELIOS doesent work but SIOC works great.

 

Without HELIOS my cockpit is dead :-( no instruments.

 

 

I have read all the post, asked for help everywhere but i cant fix it.

I dont know what to do.

I need help.

Link to comment
Share on other sites

  • 5 months later...
  • 2 years later...

Maybe it will be relevant to someone. The script attached to this thread takes only positive values sent over IOCP. If you want to have all functionality (with negative values) you need to modify SIOC_Parse function accordingly from this:

 

return tonumber(string.match(pSIOC_String, ":(%d+)=%d+",i)) , tonumber(string.match(pSIOC_String, ":%d+=(%d+)",i)) 

 

to that:

return tonumber(string.match(pSIOC_String, ":(%d+)=[+-]?%d+",i)) , tonumber(string.match(pSIOC_String, ":%d+=([+-]?%d+)",i))

Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...

Hey Oakes,

 

do you have some sioc-code for this 4-way switch laying around?:music_whistling::helpsmilie:

I have made one of this switches by myself but can´t get it to work with the use of:

[1327] = {SimpleRotary, 40, 12}, -- TFS Sensor Mon G1-G2-G3 selector

 

https://postimg.org/image/4lrssnzlt/]Extinguish_Panel.jpg[/url]fotos hochladen

 

 

 

The switch position GR1 and GR2 are working correct but middle (off) is not working and position GR3 isn´t moving.

Would be great if you or someone else could take a look into my noobish piece of code here:

 

Var 1327, name TFSsensor     // TFS Sensor Mon G1-G2-G3 selector  switch                                          


Var 1328, name TFS_GR1, Link IOCARD_SW, Device 5, Input 69    // TFS  Sensor Mon GR1 EXTING-GROUPS-CTRL-01         
{
  IF &TFS_GR1 = 1
  {
    &TFSsensor = 1    
  }
  IF &TFS_GR1 = 0
  {
    IF &TFS_GR2 = 0
    {
      &TFS_GR1 = 1    
    }
 }
}

Var 1329, name TFS_GR2, Link IOCARD_SW, Device 5, Input 66    // TFS  Sensor Mon GR2 EXTING-GROUPS-CTRL-02                  
{
  IF &TFS_GR2 = 1
  {
    &TFSsensor = 2    
  }
}

Var 1330, name TFS_GR3, Link IOCARD_SW, Device 5, Input 70    // TFS  Sensor Mon GR3 EXTING-GROUPS-CTRL-03
{
  IF &TFS_GR3 = 1
  {
    &TFSsensor = 3    
  }
}

Regards,

Terrorvogel

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Link to comment
Share on other sites

Hi Terravogel. Looks like a three pos switch with a release value thats missing but can't say for sure. Possible eqv to the 10Cs "tempcontrol" switch. Below is for the 10C 3-pos switch on the env panel (working) but it's been a while since I made that. Check or post your switch function within your clickabledata.lua for some insight of the switch

 

Var 0532, name ENV_CON_OPR, Link IOCARD_SW, Device 1, Input 121 // ENV_CON_OPR_AUTO

{

IF &ENV_CON_OPR = 0

{

&ENV_CON_A_act = 1

}

IF &ENV_CON_OPR = 1

{

&ENV_CON_A_act = 2

}

}

 

Var 0533, name ENV_CON_HOT, Link IOCARD_SW, Device 1, Input 122 // PTR-ENV_CON_HOT

{

IF &ENV_CON_HOT = 0

{

&ENV_CON_H_act = 1

}

IF &ENV_CON_HOT = 1

{

&ENV_CON_H_act = 4

}

}

 

Var 0534, name ENV_CON_COL, Link IOCARD_SW, Device 1, Input 123 // PTR-ENV_CON_COL

{

IF &ENV_CON_COL = 0

{

&ENV_CON_C_act = 1

}

IF &ENV_CON_COL = 1

{

&ENV_CON_C_act = 3

}

}

 

Var 0538, name ENV_CON_A_act // ENV_CON_OPR_AUTO activate

Var 0539, name ENV_CON_C_act // ENV_CON_OPR_COLD activate

Var 0540, name ENV_CON_H_act // ENV_CON_OPR_HOT activate

 

# within Clickabledata.lua (10C)

elements["PTR-ENVCP-CABIN-AIR-COND-OPER"] = {class = {class_type.TUMB,class_type.TUMB}, hint = _("Air Conditioner MAN/AUTO"), device = devices.ENVIRONMENT_SYSTEM, action = {device_commands.Button_10,device_commands.Button_10}, arg = {285,285}, arg_value = {0.1,-0.1}, arg_lim = {{0.0, 0.1},{0.0, 0.1}}}

elements["PTR-ENVCP-CABIN-AIR-COND-OPER-COLD"] = default_button(_("Air Conditioner to COLD"),devices.ENVIRONMENT_SYSTEM,device_commands.Button_11,285,0.2,{0,0.2})

elements["PTR-ENVCP-CABIN-AIR-COND-OPER-HOT"] = default_button(_("Air Conditioner to HOT") ,devices.ENVIRONMENT_SYSTEM,device_commands.Button_12,285,0.3,{0,0.3})

 

#SiocConfig.lua

[538] = {SimpleRotary, 41, 10, 0.1}, -- PTR-ENVCP-CABIN-AIR-COND-OPER

[539] = {SimpleRotary, 41, 11, 0.2}, -- PTR-ENVCP-CABIN-AIR-COND-Cold

[540] = {SimpleRotary, 41, 12, 0.3}, -- PTR-ENVCP-CABIN-AIR-COND-Hot

 

#Exportsupport.lua for reference

function SimpleRotary(pValue, pDevice, pNumber)

GetDevice(pDevice):performClickableAction(pNumber + 3000,(pValue - 1)/10)

end

 

Code above a bit rough but it works im my case. Hope it could be some help

 

Cheers

Gus

- - - -

Link to comment
Share on other sites

Hi Duckling!

 

the switches in clickabledata.lua are looking this (so different to yours from A-10):

 

elements["EXTING-GROUPS-CTRL-01"] = {class = {class_type.BTN}, hint = LOCALIZE("1st fire warning sensors group BIT"), device = devices.FIRE_EXTING_INTERFACE, action = {device_commands.Button_11}, stop_action = {device_commands.Button_11}, arg = {251}, arg_value = {0.1}, arg_lim = {{0, 0.1}}, use_OBB = false, updatable = false, use_release_message = {true}}

elements["EXTING-GROUPS-CTRL-02"] = {class = {class_type.BTN}, hint = LOCALIZE("2nd fire warning sensors group BIT"), device = devices.FIRE_EXTING_INTERFACE, action = {device_commands.Button_12}, stop_action = {device_commands.Button_12}, arg = {251}, arg_value = {0.2}, arg_lim = {{0, 0.2}}, use_OBB = false, updatable = false, use_release_message = {true}}

elements["EXTING-GROUPS-CTRL-03"] = {class = {class_type.BTN}, hint = LOCALIZE("3rd fire warning sensors group BIT"), device = devices.FIRE_EXTING_INTERFACE, action = {device_commands.Button_13}, stop_action = {device_commands.Button_13}, arg = {251}, arg_value = {0.3}, arg_lim = {{0, 0.3}}, use_OBB = false, updatable = false, use_release_message = {true}}

 

What do i have to change in your A-10 code to make it fit?

 

regards,

Terrorvogel

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Link to comment
Share on other sites

Hi Terravogel.

 

(hope this is correct, other are welcome to chime in o.c.)

Each position of the 3pos switch above has an unique button ID (11-13)

Activating position 1 (ButtonID 11), the sim expect an argument value = "0.1" and "0"when release

Pos 2 (ButtonID 12) "0.2" and "0" on release

Pos 3 (ButtonID 13) "0.3" and "0" on release

 

the 'SimpleRotary' function (if it's same as I posted above) only parse the value (and neglect the ButtonID)

[edit: the ButtonID is supplied from SiocConfig]

 

If the switch in the sim always has to return to middle pos to be able to select another position, the following should work

(if you can flip directly between 1-2-3 without going center it needs some additional SIOC code to set each VAR to '0' prior setting the new position)

[Assuming DeviceID 40 on the your panel]

 

Define three Vars (say 1331-1333, I nicked your earlier 1327)

Var 1331, name TFSsensG1 // TFS Sensor Mon G1-G2-G3 selector G1

Var 1332, name TFSsensG2 // TFS Sensor Mon G1-G2-G3 selector G2

Var 1333, name TFSsensG3 // TFS Sensor Mon G1-G2-G3 selector G3

 

in SiocConfig:

SiocConfig

[1331] = {SimpleRotary, 40, 11}, -- EXTING-GROUPS-CTRL-01

[1332] = {SimpleRotary, 40, 12}, -- EXTING-GROUPS-CTRL-02

[1333] = {SimpleRotary, 40, 13}, -- EXTING-GROUPS-CTRL-03

 

In your .ssi/SIOC

Var 1328, name TFS_GR1, Link IOCARD_SW, Device 5, Input 69 // TFS Sensor Mon GR1 EXTING-GROUPS-CTRL-01

{

IF &TFS_GR1 = 1

{

&TFSsensG1 = 2

}

IF &TFS_GR1 = 0

{

&TFSsensG1 = 1

}

}

 

Var 1329, name TFS_GR2, Link IOCARD_SW, Device 5, Input 66 // TFS Sensor Mon GR2 EXTING-GROUPS-CTRL-02

{

IF &TFS_GR2 = 1

{

&TFSsensG2 = 3

}

IF &TFS_GR2 = 0

{

&TFSsensG2 = 1

}

}

 

Var 1330, name TFS_GR3, Link IOCARD_SW, Device 5, Input 70 // TFS Sensor Mon GR3 EXTING-GROUPS-CTRL-03

{

IF &TFS_GR3 = 1

{

&TFSsensG3 = 4

}

IF &TFS_GR3 = 0

{

&TFSsensG3 = 1

}

}

 

Let me know the results. Allways fun to joggle my remaining gray..

 

Cheers

Gus


Edited by Duckling
  • Like 1

- - - -

Link to comment
Share on other sites

Thank you very much Duckling, your´e my hero!!!:smartass::thumbup:

 

It is working perfect now so i can use my created 4-Way switch as it should work. That makes my day mate! This code is for sure nice for other users in the future too.

 

May i ask you another little question due to sioc?

I would like to connect a red 12V-driven-rotating-police lamp at the top of my homepit to simulate the "Anti-Col-Beacon" for immersion.

I haven´t found some internal sioc variable for grabbing this, so do you know a simple sioc-code, that when i use this switch to get additional output directly to my USB Outputscard?:

 

Input switch:

Var 0517, name LighAnticol_SW, Link IOCARD_SW, Device 5, Input 56 // SWITCH LIGHT ANTICOLLISION BEACON

 

I would like to directly switch this two outputs of my USB Outputscard:

Var 0420, name LighAnticol_L1, Link IOCARD_OUT, Output 0 // --LIGHT ANTICOLLISION BEACON (12V LED light USB Outputscard Output Nr.1)

 

Var 0421, name LighAnticol_L2, Link IOCARD_OUT, Output 1 // --LIGHT ANTICOLLISION BEACON (12V motor for rotating USB Outputscard Output Nr.2)

 

Would be so sweet if you could answer me this too:)

 

regards,

Terrorvogel

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Link to comment
Share on other sites

good to hear it works, always a bit 'scary' to make suggestions when I can't verify it first :)

 

Var420 is the light and 421 the motor ?

 

Why not use a 5V relayboard controlled by the cards ports ? such as http://www.ebay.com/itm/5V-1-2-4-6-8-Channel-Relay-Board-Module-Optocoupler-LED-for-Arduino-PiC-ARM-AVR-/222135332058?var=&hash=item33b84c2cda:m:mgnWPfoXCbjWi3z8ochdzrw

 

just remember the fuse on the 12V line (I didn't first time : -)

 

Trigger it from the regular switch on the panel like

Var 0517, name LighAnticol_SW, Link IOCARD_SW, Device 5, Input 56 // SWITCH LIGHT ANTICOLLISION BEACON

{

IF &LighAnticol_SW = 1

{

&LighAnticol_L1 = 1

&LighAnticol_L2 = 1

}

IF &LighAnticol_SW = 0

{

&LighAnticol_L1 = 0

&LighAnticol_L2 = 0

}

}

 

Good idea is also to initilize those outputs as "0" in Var0 so they don't starts automatic when SIOC starts

 

Cheers

Gus

- - - -

Link to comment
Share on other sites

Great!!! Your code is working as expected! Thank you very very much mate:thumbup:

I haven´t still connected the rotating-lamp but at the two channels of the dedicated USB-Outputs are 12Volts coming out when switching the Anti-Col Beacon switch:)

 

Thx for that link with the cheap relay-boards. I´m thinking over it, because it is the much more safe way to solve the power-connection due to a limit of 500mA per channel.

 

With this "Var0" initialisation thingy, ist this the right way to insert it because its not working somehow?

 

Var 0000, Value 0

{

&LighAnticol_SW = 1

}

 

regards,

Terrorvogel

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Link to comment
Share on other sites

You're very welcome

 

With this "Var0" initialisation thingy, ist this the right way to insert it because its not working somehow?

 

Var 0000, Value 0

{

&LighAnticol_SW = 1

}

 

Think you should go

Var 0000

{

&LighAnticol_SW = 0

&LighAnticol_L1 = 0

&LighAnticol_L2 = 0

}

 

It's the output ports that goes active by random on fresh start of SIOC (after poweron). On a restart of SIOC the database keeps erlier state of each Var.

 

Pusching both outputports and switchstate to 0 would eliminate that you have the blipper goes active on SIOC Start. Might happen even so just by power on the IOCards ;-)

- - - -

Link to comment
Share on other sites

This piece of code seems to work:thumbup:

No i have learned a little bit more with programming Sioc:).

 

Now that i have still contact to an expert in this Sioc language, could you give me maybe a final hint for my last question?

How to switch or control an USB-Outputscard port with an changing inside DCS parameter like the A-10´s oxygen flow from mainpanel_init.lua?:

 

A-10C mainpanel_init.lua:

 

BreathFlow = CreateGauge()

BreathFlow.arg_number = 600

BreathFlow.input = {0.0, 1.0}

BreathFlow.output = {0.0, 1.0}

BreathFlow.controller = controllers.BreathFlow

 

If this is not that a big deal (what i don´t believe to be honest:cry:), could you give me a sample code for that?

 

Something like:

If oxygenflow parameter = 1 then output to var 1500

If oxygenflow parameter = 0 then no output to var 1500

 

.ssi/SIOC:

Var 1500, name Oxy_Power, Link IOCARD_OUT, device 3, Output 50 // Turning Oxygengenerator-Power-Relay (12V-to-220V) ON/OFF

 

How to grab such parameters out of DCS in general and integrate them to something usefull? Are there some exaples of code somewhere in the www to play arround?

 

What my intention for this is:

I would like to switch an 220V breathing machine (used for sleep apnea) which is fitting my connected mbu-20/p oxygenmask with air.

So when oxygen is flowing inside DCS i´d like to turn on a relay with 12V USB-Outputscard-channel to switch the breathing machine on. If oxygen is not flowing anymore (due to damage during fight etc.), relay should close.

I know this is crazy:music_whistling: but i have all this stuff laying arround and can´t get it connected due to lack of SIOC knowledege.:doh:

 

Thank you so far for your time an patience Duckling!

 

regards,

Terrorvogel

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Link to comment
Share on other sites

Simulated OXY system ? really cool, Not crazy at all.

 

When possible, please elborate on that, need to read up on that type of breathing system. (Not for my rigg but one cold-warbird simpit under restauration)

 

Lua export from mainpanel is a bit messy (for me) but doable but I think using the 'breathing' gauge might not work as expected

since if flipping between between on/off so an additional timer is needed in sioc

 

Can the OXY warning indicator be used instead to trigger the relay to drive the 'breathing' machine relay ?

(Guess that you have the warning panel running, the OXY warning might fullfill that trigger value ?)

 

i.e. something like this in SIOC stated under the OXY-Warning indicator:

if oxy_warning = 0 AND OXY-Switch = 1 and Power_exist = 1

then BreathingMachine = 1 (start)

if OXY warning = 1

then BreathingMachine = 0 (stop)

 

edit: above if you need to have the machine air preassure static during usage. I assume you dont want to start/stop if with the 'breathing' sequence. You might want to check for a Oxy regulator system/panel in good condition. These are machanical (at least on Nato standard) and connecting the mask through that panel would likely trigger the on/of indicator also ?

 

 

Cheers

Gus


Edited by Duckling

- - - -

Link to comment
Share on other sites

Hi Duckling,

 

the most parts are running with Touchsceens and Helios. Only the right electricpanel, UV26 and some other parts for KA-50 are running with Opencockpits hardware and the Gear Lever and the three T-Handles for A-10C. So there is no physical switch to turn on the oxygen supply. I need it to get working when i push the oxygen supply button to "On" in Helios (if OXY Sys FLOW INDICATOR Warning is not lighting) , the USB-Outputscard should switch my 230V relay for breathing machine.

If OXY Sys FLOW INDICATOR is lighting then USB-Output should stop although the oxygen supply button is still "On".

As simple as possible. If building a "real" cockpit sometime in future, it can be done more perfect:)

 

i have now made in A-10C.ssi:

 

Var 9600, name OXY_Sys_FL_IND, Link IOCARD_OUT, Output 49 // OXY Sys FLOW INDICATOR

 

Var 9601, name Oxy_Gen, Link IOCARD_SW, Device 5, Input 200 // PTR-OXYGENCP-SUPPLY (Switch in DCS: Oxygen Supply On/Off)

 

Var 9605, name Oxy_Power, Link IOCARD_OUT, device 3, Output 0 // Opencockpits-USB-Outputscard Power-Relay (12V-to-220V) ON/OFF

{

IF &Oxy_Gen = 1

{

&OXY_Sys_FL_IND = 1

&Oxy_Power = 1

}

IF &OXY_Sys_FL_IND = 0

{

&OXY_Sys_FL_IND = 0

&Oxy_Power = 0

}

}

 

In siocConfig.lua (i hope this is right:music_whistling:):

[9601] = {TwoPositionSwitch, 40, 1, 1}, -- PTR-OXYGENCP-SUPPLY (Oxygen Supply On/Off)

 

In Clickabledata.lua (10C) under --Oxygen System Control Panel which should be ID40:

elements["PTR-OXYGENCP-SUPPLY"] = default_2_position_tumb(_("Oxygen Supply On/Off"), devices.OXYGEN_SYSTEM, device_commands.Button_1, 603)

 

But it is not working. Something seems very wrong again:cry:

 

regards,

Terrorvogel

ASROCK X79 Extreme11 (WC), i7-4930K (WC), 32GB G.Skill TridentX, Vertex 3 120GB, GTX 980ti, 3x 39,5" Philips 4K, TrackIR 5, TM Warthog with PeterP´s FFB2 Mod, 2xSaitek Throttle, 2x Thrustmaster Cougar MFD Bezel, Simped Vario Pedals modded with toe brakes, Opencockpit Cards, 4x Soundcard, 2x Buttkicker Gamer 2, 4x GTX 950 with tons of touchscreens...

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...