Assign Variables procedure

Any questions regarding JoinFS.
Post Reply
fatcharlie
Posts: 3
Joined: Mon Jan 03, 2022 2:36 pm

Assign Variables procedure

Post by fatcharlie »

Hi Peter,

Thanks for such a fantastic program!

A friend and I are looking in to shared cockpit online with Xplane 11.5x.

We're using the default Boeing 738 for now but will want to use addon aircraft later with custom datarefs.

At the moment we're exploring the built-in capabilities such as Plane.txt. We note that for the B738 the files already assigned were Plane.txt and SingleProp.txt - is that right? We played around with adding our own .txt file to see what we could synchronise, but to be honest we were not sure of the procedure. So a couple of questions:

1) Is there a recommended order to start JoinFS on the two aircraft? We know there has to be a flight active.
2) Does the .txt file have to be assigned to both aircraft? For instance the "co-pilot" aircraft also had Plane.txt and SingleProp.txt assigned.
3) Is there a recommended procedure for assigning the text files to the aircraft?
4) What is the separator character now? In the manual it shows a pipe (|) character, but in the release notes for version 3.0.3 it says "Fixed issue with variables file for models containing the character symbol '|'. Changed the separator to '[+]'"

We set up a single-line file called General.txt for both aircraft which has:

FLOAT|laminar/B738/electrical/gpu_pos||

... and tried the following

1) Both aircraft have the file assigned and separator = |
2) as above with separator [+]
3 each aircraft in turn as the only one with the file assigned, firstly with | separator and then with [+] separator


In all circumstances when it responded, the ground power was cycling on both aircraft, as if it was not possible for them to synchronise - Schroedinger's GPU, lol, both on and off at the same time! :-) My guess is that we were using the wrong dataref, or that we needed to synchronise more than one for the GPU to be fully active on in both aircraft.

Sorry for the long post, just trying to give you as much info as possible.

Many thanks,

Roger.
User avatar
Peter
Site Admin
Posts: 2281
Joined: Fri Sep 23, 2016 8:51 am
Contact:

Re: Assign Variables procedure

Post by Peter »

Hi Roger,

1) There is no specific order for starting JoinFS. It should pick everything up no matter which order you start things.
2) Both of you will need to apply the same .txt files when using the same aircraft in shared cockpit.
3) The procedure is to click on 'Assign Varaibles' then remove unnecessary .txt files and add the ones you need such as your own custom .txt files. JoinFS will remember the assigned variables for that aircraft when you restart.
4) The separator is still '|' for the .txt variable files. That comment is referring to the 'variables.txt' which is a different file that associates variable files with models. This is maintained automatically by JoinFS. I wouldn't worry about that file.

You could try adding the keyword 'PILOT'. This means that only the current pilot's simulator can change that variable. The state on both sides should settle on the pilot's state.

FLOAT|laminar/B738/electrical/gpu_pos||||PILOT

Peter
fatcharlie
Posts: 3
Joined: Mon Jan 03, 2022 2:36 pm

Re: Assign Variables procedure

Post by fatcharlie »

Thanks Peter. No free time now till the weekend but will try it then.
fatcharlie
Posts: 3
Joined: Mon Jan 03, 2022 2:36 pm

Re: Assign Variables procedure

Post by fatcharlie »

Hi Peter,

Have been playing again.

I've tried two scenarios - firstly with the IXEG 737-300 and secondly with the default King Air C90.

With the IXEG 733, sadly I'm unable to get any connection. Both aircraft cold and dark, both on Global hub. One text file for each aircraft. Contents:

FLOAT|ixeg/733/electrical/elec_batt_on_act||

(everything is a float in the IXEG world!) In this scenario I get no response at all in either direction - perhaps it's because it's a custom Dataref? Does JoinFS cover custom Datarefs?

With the C90 I'm having more luck. My file is:

INTEGER|sim/cockpit/electrical/beacon_lights_on|LIGHT STATES|mask|MASK1
INTEGER|sim/cockpit/electrical/landing_lights_on|LIGHT STATES|mask|MASK2
INTEGER|sim/cockpit2/switches/landing_lights_switch||
INTEGER|sim/cockpit/electrical/taxi_light_on||
INTEGER|sim/cockpit/electrical/battery_on||
INTEGER|sim/cockpit/electrical/avionics_on||
INTEGER|sim/cockpit/switches/gear_handle_status||
FLOAT|sim/cockpit2/controls/parking_brake_ratio||
FLOAT|sim/flightmodel/controls/flaprqst||
FLOAT|sim/flightmodel/controls/flaprat||
INTEGER|sim/cockpit/engine/inverter_on||
INTEGER|sim/cockpit/electrical/gpu_on||
INTEGER|sim/cockpit/electrical/generator_on||

All of it works except for the last line - sim/cockpit/electrical/generator_on

The dataref is an array - I have tried putting [x] at the end of the dataref description, where x = 0, 1 or 8, but with that on the end it doesn't do anything. Without it, the [0] position of the array will change (generator 1) but nothing else - how does JoinFS deal with array datarefs?

In some cases, datarefs are not writeable such as:

laminar/c90/electrical/switch/gen1_switch_pos

Which means that even though I can turn the generator on, using the array dataref, the switch position doesn't change in the other aircraft. X-plane uses a Command to do this - does JoinFS allow Commands to be passed across like Datarefs?

Similarly the power for the EFIS in the C90 cannot be changed by editing the Dataref:

laminar/c90/avionics/switch_pos/EFIS_power

... since it's not writeable. It's activated by the Command:

laminar/c90/avionics/switch/EFIS_power

.. which is a simple toggle command. So in order to synchronise the two aircraft, it would need to be possible to assign Commands as well as Datarefs...?

Once again sorry for all the questions, and thanks for any help you can give :-)

Cheers,

Roger.
Post Reply