Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    25+ Posting Member Demon's Avatar
    Join Date
    Feb 2011
    Location
    Quebec, Canada
    Posts
    42
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Read Offset 9000

    Hi,

    This happens with both v8.2 and v8.3.

    Lekseecon keeps issuing READ offset 9000 of 41 bytes. I wasn't getting this yesterday in my early tests.


    FSUIPC log:




    Leksecon log:

    lekseecon_f version 8.2
    C:\Users\Robert\Documents\lekseecon_f.ini found
    Number of lekseecon variable(-s) detected: 4
    39 40 876 877
    SDK connected.
    2 variables registered for polling by lekseecon from FSUIPC
    FSUIPC connected.
    Running...
    lekseecon_f stopped.
    Elapsed time 00:00 (hh:mm)

    I start FS-X as usual for testing and sit at an active with engines running. Then I start Lekseecon and these READs start on the FSUIPC log. They stop as soon as I terminate Lekseecon.

    My program is not running yet.


    Picture of FSUIPC log from yesterday; came back with FS time, Zulu time and my variable, no READ 9000 41 BYTES all day.



    Robert
    Last edited by Demon; 08-13-2012 at 03:57 PM. Reason: Log and pics

  2. #2
    25+ Posting Member Demon's Avatar
    Join Date
    Feb 2011
    Location
    Quebec, Canada
    Posts
    42
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Read Offset 9000

    UPDATE:

    If I remove information variables from Lekseecon INI and leave only 1 toggle (write) variable, the FSUIPC log shows only these calls when I start Lekseecon:

    (I included IPC WRITEs as well in case they helped debug)

    1365750 READ0 3304, 4 bytes: 00 00 30 45
    1365750 READ0 3308, 4 bytes: 08 00 DE FA
    1365750 WRITE0 330A, 2 bytes: D2 07
    1365860 READ0 3304, 4 bytes: 00 00 30 45
    1365860 READ0 3308, 4 bytes: 08 00 DE FA
    1366157 WRITE repeated 1 times
    1366157 WRITE0 936C, 1 bytes: 01 .

    If I put only 1 information variable and start Lekseecon:

    1565657 READ0 3304, 4 bytes: 00 00 30 45
    1565657 READ0 3308, 4 bytes: 08 00 DE FA
    1565657 WRITE0 330A, 2 bytes: D2 07
    1565750 READ0 3304, 4 bytes: 00 00 30 45
    1565750 READ0 3308, 4 bytes: 08 00 DE FA
    1565860 READ0 9000, 40 bytes: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    1565860 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    1565860 00 00 00 00 00 00 00 00
    1566063 READ0 9000, 40 bytes: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    1566063 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    1566063 00 00 00 00 00 00 00 00
    ... and so on...

    EDIT: I get 41 bytes if I put 2 information variables in the INI.
    Last edited by Demon; 08-13-2012 at 08:49 PM. Reason: 40 vs 41 bytes discrepancy

  3. #3
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Read Offset 9000

    Hi Robert,

    What is your problem/question???? (you do not post a problem imho...).

    What you see is the internal working of lekseecon_f, all by design and perfectly allright. Actually you do not have to know this internal working, but for clarification:

    Control variable offsets represent real hardware switches. If a switch changes value, the cockpit software of the home cockpit builder will change the corresponding control variable offset in FSUIPC.

    Lekseecon_f monitors control variable offsets 5 times per second ('polling'). It does not do that on an individual offset basis, but for efficiency reasons it will read as many bytes as needed, starting from offset HEX9000 (the beginning of the control offset block) up to the byte of the highest control variable in use.

    In your (simple) test situation with only two control variables, that is variable 40 (at offset HEX9028 ) so it will read 41 bytes (5 times per second). After each read it will check whether vars 39 and 40 have a different value, and if so send the corresponding Level-D commands.

    Cheers,
    Nico

    P.S. See http://www.mycockpit.org/forums/leks...good-post.html nr 2.
    Last edited by kiek; 08-14-2012 at 01:36 PM.

  4. #4
    25+ Posting Member Demon's Avatar
    Join Date
    Feb 2011
    Location
    Quebec, Canada
    Posts
    42
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Read Offset 9000

    Thanks Nico.

    I figured out why the white FSUIPC log above does not have READs blocks of 40+ bytes, but the black log does. I had no yet set the Lekseecon INI file, D'OH! Offset 93AB is Information Variable 939 Captain Flight Director, I hadn't created my INI file at this point in my testing.


    Adding something like this in a Lekseecon Debug FAQ could help others debug their application:

    Checking if your READs/WRITEs work properly:
    - Enable FSUIPC logging in FS to verify if Lekseecon READs/WRITEs are executed, and to see what values are returned (in HEX).
    - Information and Update Variables used by your program must be in the Lekseecon INI file.
    - Lekseecon will generate READ data blocks at offset 9000 if Information Variables are present in the Lekseecon INI file.
    - If your WRITEs to Update variables seem ignored by FS, make sure you did not change their state by clicking on the FS instrument panels.


    Keep in mind that I'm a mainframe programmer by trade, so seeing these READ 9000 pop up was unexpected. As many other noobs to custom cockpits, we assume we screwed up "something somewhere" when we see something unexpected.

    And yes, I remembered to set my ReadData timer to 200 milliseconds to process at the same pace as Lekseecon.

    I was also planning on READing larger datablocks later to improve efficiency.

    Robert

  5. #5
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Read Offset 9000

    Hi Robert,

    Debugging of your application should be done at the application level, not via the FSUIPC log...
    I have never ever looked into that log, no need to. Trust lekseecon_f, it is a mature program.

    If your VB6 application does not run as expected, put write/debug statement into your VB6 application (or use its Debugger). In this case you had no application problem at all, so why look into a FSUIPC log?

    Regards,
    Nico

  6. #6
    25+ Posting Member Demon's Avatar
    Join Date
    Feb 2011
    Location
    Quebec, Canada
    Posts
    42
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Read Offset 9000

    Hi Nico,

    The VB debugger does not work in this case, something about the call structure of C++ in the Level-D SDK, the call stack is not reset properly (I can't remember the exact details, but it won't even get past IPC connect, even if I move all my VB stuff into the FSX/Module folder and execute from there).

    I hadn't though of putting debug statements in my program. I'm getting old, Ialways put DISPLAY statement in COBOL when I had problems.

    YOU know I had no application problem, I didn't. The FSUIPC log clearly shows in realtime READs and/or WRITEs, or to a file, it helped me greatly to see what values were returned from FSUIPC.

    Don't forget that I'm unsure of VB syntax and how to define variables, so I never knew if my READ had worked and I was mishandling data conversion in VB. I trust FSUIPC and Lekseecon to work properly, it's the dude behind this keyboard that worries me. Using the FSUIPC log proved very helpful in showing I'm not a complete retard.

    Robert

  7. #7
    25+ Posting Member Demon's Avatar
    Join Date
    Feb 2011
    Location
    Quebec, Canada
    Posts
    42
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Read Offset 9000

    See, I can see what's going on in FS-X, update/execute my VB code and check the FSUIPC log on the fly:



    It's nice having 6 screens.

  8. #8
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Read Offset 9000

    Quote Originally Posted by Demon View Post
    The VB debugger does not work in this case, something about the call structure of C++ in the Level-D SDK
    ? I thought you were running a VB6 program interfaced to FSUIPC ...

    No worries I'm getting old too, I started programming in 1972, with a pile of punched cards on an IBM ...

    Nico

  9. #9
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Read Offset 9000

    Hi Robert,
    Yes, very nice indeed!
    When do you plan to add hardware switches and so on?
    Nico

  10. #10
    25+ Posting Member Demon's Avatar
    Join Date
    Feb 2011
    Location
    Quebec, Canada
    Posts
    42
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Read Offset 9000

    Quote Originally Posted by kiek
    ? I thought you were running a VB6 program interfaced to FSUIPC.
    ...
    I am, I mistyped. There's something about VB debugger not liking some C DLLs, and I'm pretty sure Pete wrote his in C.


    Quote Originally Posted by kiek
    ...
    No worries I'm getting old too, I started programming in 1972, with a pile of punched cards on an IBM ...
    I was probably the operator of the system.

    Reader, terminal and line printer, those things were noisy. The card-punch machines weren't bad once you figured how to use the "drum card" properly, it made indentation of code so much easier.


    Quote Originally Posted by kiek
    ...
    When do you plan to add hardware switches and so on?
    Nico
    I have to finish my batcave first. It's been 2 years in the making; have to finish electricity, insolation, and gyproc upstairs before I can start working on a complete gaming rig.



    It's kinda big, 30'x40', my house is only 26'x40'.



    But it's been a very hot summer so I've taken it easy; it goes over 40C upstairs. A steel roof is supposed to last a long time, but it like a stove until I get the inside insolated.

    Tons of pics of the adventure:
    Garage pictures by DemonDNF - Photobucket

    Robert

  11. Likes kiek liked this post
Page 1 of 2 12 LastLast