Page 1 of 3 123 LastLast
Results 1 to 10 of 26
  1. #1
    25+ Posting Member
    Join Date
    Jul 2010
    Location
    Frequently over Denver
    Posts
    62
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Lekseecon Variable Name not Found

    Nico, or anyone else who can help,

    I just purchased the LvlD 767 and am trying to get my homemade mcp to work with it. So far, I have decided that the only two scripts I need at the moment are the 3.3_MCP_Generic and the 3.3_MCP_OutIAS. I entered the proper location and files into the Config_SIOC file as per the instructions, and edited the output numbers for the pins my 7 segment displays occupy on the display card. However, when I click on Group=>Run, it continues to give me the error, "Variable Name not found ==> &DECBCD3." I tried changing and deleting this line, but that just leads to a slew of other errors. To be clear, all I need is the script for the 7 segment displays, as my rotary encoders are interfaced through an arduino card.

    Here is the script I have been using:

    ///////////////////////////////////////////////////////////////////////////
    //
    // MCP 767 IAS/MACH, HDG, ALT, VS, Leds, Switches and Buttons
    //
    // With FULL (built in) cold and dark cockpit and lights test support!
    //
    // 3 May 2012
    //
    // for lekseecon 9.0+
    //
    // Nico Kaan
    // The Netherlands
    // www.lekseecon.nl
    //
    //*************************************************************************
    // HDG
    Var 6 Static name MCP_HDG
    {
    CALL &DecBCD3 &MCP_HDG
    &D_HDG0 = &Digit0
    &D_HDG1 = &Digit1
    &D_HDG2 = &Digit2
    }
    Var 9101 name RO_HDG Link IOCARD_ENCODER Type 2 Aceleration 2 Device 2 Input 6
    {
    L0 = TESTBIT &MCP_HDG 24
    IF L0 = 0 // not blank or lights test, so a valid Heading
    {
    L0 = &RO_HDG * -1 // turning right should be plus
    L1 = FROMBCD &MCP_HDG
    L1 = ROTATE 0 359 L0
    &MCP_HDG = TOBCD L1
    }
    }
    Var 9102 name D_HDG0 Link IOCARD_DISPLAY Numbers 1 Device 2 Digit 6
    Var 9103 name D_HDG1 Link IOCARD_DISPLAY Numbers 1 Device 2 Digit 7
    Var 9104 name D_HDG2 Link IOCARD_DISPLAY Numbers 1 Device 2 Digit 8
    //*************************************************************************
    // ALT
    Var 7 Static name MCP_ALT
    {
    CALL &DecBCD3 &MCP_ALT
    IF &Digit0 = -999999
    {
    &D_ALT0 = -999999
    &D_ALT1 = -999999
    &D_ALT2 = -999999
    &D_ALT3 = -999999
    &D_ALT4 = -999999
    }
    ELSE
    {
    IF &Digit2 = 8
    {
    &D_ALT0 = 8
    &D_ALT1 = 8
    &D_ALT2 = 8
    &D_ALT3 = 8
    &D_ALT4 = 8
    }
    ELSE
    {
    &D_ALT0 = 0
    &D_ALT1 = 0
    &D_ALT2 = &Digit0
    IF &Digit2 = 0
    {
    &D_ALT4 = -999999
    IF &Digit1 = 0
    {
    &D_ALT3 = -999999
    }
    ELSE
    {
    &D_ALT3 = &Digit1
    }
    }
    ELSE
    {
    &D_ALT3 = &Digit1
    &D_ALT4 = &Digit2
    }
    }
    }
    }
    Var 9201 name RO_ALT Link IOCARD_ENCODER Device 2 Input 2 Aceleration 2 Type 2
    {
    L0 = TESTBIT &MCP_ALT 24
    IF L0 = 0 // not blank or lights test, so a valid Altitude
    {
    L0 = &RO_ALT * -1 // turning right should be plus
    L1 = FROMBCD &MCP_ALT
    L1 = LIMIT 0 640 L0
    &MCP_ALT = TOBCD L1
    }
    }
    Var 9202 name D_ALT0 Link IOCARD_DISPLAY Device 2 Digit 9 Numbers 1
    Var 9203 name D_ALT1 Link IOCARD_DISPLAY Device 2 Digit 10 Numbers 1
    Var 9204 name D_ALT2 Link IOCARD_DISPLAY Device 2 Digit 11 Numbers 1
    Var 9205 name D_ALT3 Link IOCARD_DISPLAY Device 2 Digit 12 Numbers 1
    Var 9206 name D_ALT4 Link IOCARD_DISPLAY Device 2 Digit 13 Numbers 1
    //*************************************************************************
    // VS
    Var 298 Static
    {
    L0 = v298 // read/write VS from/to level-D panel
    L1 = DIV L0 100 // block a new value coming from the rotary
    IF &VS <> L1
    {
    &VS = L1 // new value coming from panel
    }
    }
    Var 9301 name RO_VS Link IOCARD_ENCODER Device 2 Input 11 Aceleration 2 Type 2
    {
    IF &VSActive = 1 // Respond only when in VS mode ...
    {
    L0 = &RO_VS * -1 // turning right should be plus
    &VS = LIMIT -99 99 L0
    L1 = &VS * 100
    v298 = L1 // to panel
    }
    }
    Var 9302 name VS
    {
    CALL &OutVS
    }
    Var 9303 name VSActive
    {
    CALL &OutVS
    }
    Var 9304 name OutVS Link SUBRUTINE
    {
    IF &ColdAndDark = 1
    {
    &D_VSS = -999999 // blank
    &D_VS0 = -999999 // blank
    &D_VS = -999999
    }
    ELSE
    {
    IF &TestMIP = 1
    {
    &D_VSS = 8
    &D_VS0 = 8
    &D_VS = 888
    }
    ELSE
    {
    IF &VSActive = 0
    {
    &D_VSS = -999999 // blank
    &D_VS0 = -999999 // blank
    &D_VS = -999999
    }
    ELSE
    {
    L0 = &VS
    IF &VS < 0
    {
    &D_VSS = -999998 // -
    L0 = L0 * -1
    }
    ELSE
    {
    &D_VSS = -999999 // blank
    }
    L0 = L0 * 100
    IF L0 >= 1000
    {
    &D_VS0 = DIV L0 1000
    &D_VS = MOD L0 1000
    }
    ELSE
    {
    &D_VS0 = -999999 // blank
    &D_VS = L0
    }
    }
    }
    }
    }
    Var 9305 name D_VS Link IOCARD_DISPLAY Device 2 Digit 14 Numbers 3
    Var 9306 name D_VS0 Link IOCARD_DISPLAY Device 2 Digit 17 Numbers 1
    Var 9307 name D_VSS Link IOCARD_DISPLAY Device 2 Digit 18 Numbers 1


    //*************************************************************************
    // leds
    Var 742 name MCP_leds Static
    {
    // set leds to the actual value
    &O_CMDLLed = TESTBIT &MCP_leds 0
    &O_CMDCLed = TESTBIT &MCP_leds 1
    &O_CMDRLed = TESTBIT &MCP_leds 2
    &O_LNAVLed = TESTBIT &MCP_leds 6
    &O_VNAVLed = TESTBIT &MCP_leds 7
    &O_FLCHLed = TESTBIT &MCP_leds 8
    &O_HDGHLDLed = TESTBIT &MCP_leds 9
    &O_VSLed = TESTBIT &MCP_leds 10
    &O_ALTHLDled = TESTBIT &MCP_leds 11
    &O_LOCLed = TESTBIT &MCP_leds 12
    &O_APPLed = TESTBIT &MCP_leds 13
    &O_BCRSLed = TESTBIT &MCP_leds 14
    &O_N1Led = TESTBIT &MCP_leds 15
    &O_SPDLed = TESTBIT &MCP_leds 16
    &O_ATLed = TESTBIT &MCP_leds 17 // needed in 737 MCP used as 767 MCP
    // set three special vars needed in IAS and VS
    &IASMACH = TESTBIT &MCP_leds 3
    &SPDDisplay = TESTBIT &MCP_leds 4
    &VSActive = TESTBIT &MCP_leds 10
    }
    var 9401 name O_N1Led Link IOCARD_OUT Device 2 Output 21
    var 9402 name O_SPDLed Link IOCARD_OUT Device 2 Output 23
    var 9403 name O_LNAVLed Link IOCARD_OUT Device 2 Output 29
    var 9404 name O_VNAVLed Link IOCARD_OUT Device 2 Output 25
    var 9405 name O_FLCHLed Link IOCARD_OUT Device 2 Output 24
    var 9406 name O_HDGHLDLed Link IOCARD_OUT Device 2 Output 26
    var 9407 name O_VSLed Link IOCARD_OUT Device 2 Output 31
    var 9408 name O_ALTHLDLed Link IOCARD_OUT Device 2 Output 30
    var 9409 name O_BCRSLed Link IOCARD_OUT Device 2 Output 32
    var 9410 name O_LOCLed Link IOCARD_OUT Device 2 Output 28
    var 9411 name O_APPLed Link IOCARD_OUT Device 2 Output 27
    var 9412 name O_CMDLLed Link IOCARD_OUT Device 2 Output 33
    var 9413 name O_CMDCLed Link IOCARD_OUT Device 2 Output 35
    var 9414 name O_CMDRLed Link IOCARD_OUT Device 2 Output 34
    Var 9415 name O_ATLed Link IOCARD_OUT Device 2 Output 22
    //*************************************************************************
    // CAP & FO FD Switches, AT switch and AP Disengage bar
    Var 292 Static Link IOCARD_SW Device 2 Input 33 Type I
    Var 293 Static Link IOCARD_SW Device 2 Input 15 Type I
    Var 294 Static Link IOCARD_SW Device 2 Input 16 Type I
    Var 295 Static Link IOCARD_SW Device 2 Input 14 Type I

    //*************************************************************************
    // Buttons (note not complete, see also other file)
    Var 275 Static Link IOCARD_SW Device 2 Input 21 Type P
    Var 276 Static Link IOCARD_SW Device 2 Input 19 Type P
    Var 277 Static Link IOCARD_SW Device 2 Input 18 Type P
    Var 278 Static Link IOCARD_SW Device 2 Input 13 Type P // IAS Mach
    Var 280 Static Link IOCARD_SW Device 2 Input 32 Type P
    Var 282 Static Link IOCARD_SW Device 2 Input 23 Type P
    Var 285 Static Link IOCARD_SW Device 2 Input 27 Type P
    Var 286 Static Link IOCARD_SW Device 2 Input 30 Type P
    Var 287 Static Link IOCARD_SW Device 2 Input 29 Type P
    Var 289 Static Link IOCARD_SW Device 2 Input 25 Type P
    Var 290 Static Link IOCARD_SW Device 2 Input 24 Type P
    Var 291 Static Link IOCARD_SW Device 2 Input 22 Type P
    //*************************************************************************
    // refresh
    Var 999 Static
    {
    CALL &OutVS
    }
    //
    ///////////////////////////////////////////////////////////////////////////

    ///////////////////////////////////////////////////////////////////////////
    //
    // OutIAS in OC MCP737NG used as 767 MCP
    //
    // (abstracted because not all MCP hardware support the same functionality)
    //
    // Nico Kaan
    // The Netherlands
    // www.lekseecon.nl
    //
    // ************************************************************************
    //
    Var 9001 name OutIAS Link SUBRUTINE
    {
    L0 = TESTBIT &MCP_IAS 24
    C0 = L0 = 0
    C1 = &SPDDisplay = 0
    IF C0 AND C1 // not active but not a lights test possibility
    {
    &D_IAS0 = -999999 // blank
    &D_IAS1 = -999999 // blank
    &D_IAS2 = -999999
    &O_MACHDP = 0
    }
    ELSE
    {
    CALL &DecBCD3 &MCP_IAS
    &D_IAS0 = &Digit0
    &D_IAS1 = &Digit1
    &D_IAS2 = &Digit2
    &O_MACHDP = &IASMACH
    }
    }
    Var 9002 name D_IAS0 Link IOCARD_DISPLAY Device 2 Digit 3 Numbers 1
    Var 9003 name D_IAS1 Link IOCARD_DISPLAY Device 2 Digit 4 Numbers 1
    Var 9004 name D_IAS2 Link IOCARD_DISPLAY Device 2 Digit 5 Numbers 1
    Var 9005 name O_MACHDP Link IOCARD_OUT Device 2 Output 20
    //
    ///////////////////////////////////////////////////////////////////////////


    I have not yet edited the output numbers for the LED's as I have been trying to test my displays at the moment.

    I assume it is some small, inconsequential error that is causing this problem, but I can't for the life of me find what it is.

    Thanks in advance!

    Steve
    Last edited by kiek; 09-18-2012 at 03:17 AM.

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

    Re: Lekseecon Variable Name not Found

    Hi Steve,

    You miss the file cockpit767\1_Digit.txt
    That file contains the supporting subroutines for digits, such as DECBCD3.

    This is the config_file.ini that you need if you would build a complete MCP (look in the lekseecon\mcp767\ folder)

    Code:
    2
    D:\lekseecon\cockpit767\1_Digit.txt
    D:\lekseecon\mcp767\3.3_MCP_Generic.txt
    D:\lekseecon\mcp767\3.7_MCP_Bankangle.txt
    D:\lekseecon\mcp767\3.3_MCP_Buttons.txt
    D:\lekseecon\mcp767\3.3_MCP_OutIAS.txt
    3.7_MCP_Bankangle.txt is not needed if you do not have that switch, but the others are.


    regards,
    Nico
    P.S. I have removed my email address from your post. Please do not post it in forums...
    Last edited by kiek; 09-18-2012 at 03:18 AM.

  3. #3
    25+ Posting Member
    Join Date
    Jul 2010
    Location
    Frequently over Denver
    Posts
    62
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Lekseecon Variable Name not Found

    Nico,

    That makes sense- I knew it would be something simple.
    I didn't see the 1_Digit file in the 767 Mcp folder, but I'm sure I'll be able to find it.

    Thanks for your help!

    Steve
    P.S. Sorry about the email address.

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

    Re: Lekseecon Variable Name not Found

    Quote Originally Posted by GPreddy View Post
    I didn't see the 1_Digit file in the 767 Mcp folder
    Note that I wrote cockpit767 folder... (cockpit767/1_Digit.txt)
    Last edited by kiek; 09-19-2012 at 03:48 AM.

  5. #5
    25+ Posting Member
    Join Date
    Jul 2010
    Location
    Frequently over Denver
    Posts
    62
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Lekseecon Variable Name not Found

    I found the file, and was able to compile and run the software with no problems. However, the values are not showing up on my displays, nor are the LED's lighting up. Any thoughts?

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

    Re: Lekseecon Variable Name not Found

    No, not if you do not give more information... Can be anything. Must be something wrong in your setup...
    Please post your sioc.ini and lekseecon log files

    EDIT: one common mistake is the Device 2 use in this script: have you defined MASTER 2 in your sioc.ini?
    Last edited by kiek; 09-19-2012 at 04:49 PM.

  7. #7
    25+ Posting Member
    Join Date
    Jul 2010
    Location
    Frequently over Denver
    Posts
    62
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Lekseecon Variable Name not Found

    You were right! (of course)

    I just needed to define the mastercard in the sioc.ini. Everything works perfectly now. Thanks for all your help!

    Steve

  8. Likes kiek liked this post
  9. #8
    25+ Posting Member
    Join Date
    Jul 2010
    Location
    Frequently over Denver
    Posts
    62
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Lekseecon Variable Name not Found

    I'm sorry to trouble you more, but it looks like I spoke too soon. I am able to see some of the digits light up, but it only shows 0's in the heading and altitude windows. Both V/S and IAS/MACH are always off. Additionally, none of the values displayed change to reflect those shown on the screen in FSX. I used all the files you recommended, with the exception of Bank_Limit, as well as the Cold and Dark, and Lights Test files. The only things I changed were the output numbers for the digits, as that is all I'm testing at the moment.

    I've tried everything I can think of, but nothing seems to work. Do you have any suggestions?

    Steve

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

    Re: Lekseecon Variable Name not Found

    Hi Steve,

    Did you run lekseecon? If so, what did you learn from the lekseecon.log file? Please post it, together with your sioc.ini.

    Here
    I read that you are using a ARDUINO card for the inputs... So you cannot use my SIOC scripts without modifications. You have to remove all the lines related to inputs.

    If I were you, I'd sell that Arduino card and buy Opencockpits cards. Then you can use my SIOC scripts (and lekseecon) without any changes (except for adjusting the in- and output numbers to your hardware). It will make your life a lot easier

    Regards,
    Nico

  11. #10
    25+ Posting Member
    Join Date
    Jul 2010
    Location
    Frequently over Denver
    Posts
    62
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Lekseecon Variable Name not Found

    Nico,

    Here's the Lekseecon.log:

    lekseecon version 9.1
    Searching for sioc.ini at drives C: Q:
    C:\Program Files (x86)\IOCards\SIOC\sioc.ini found
    PORT=8092
    CONFIG_FILE=C:\Program Files (x86)\IOCards\SIOC\sioc.ssi
    Parameters from sioc.ini were taken
    Number of lekseecon variable(-s) detected: 14
    5 6 7 279 281 283 284 288 298 579 580 581 782 999

    Error 22: Level-D SDK not detected
    user has closed the main window
    lekseecon stopped.
    Elapsed time 00:00 (hh:mm)

    And my SIOC.ini:


    [SIOC]
    IOCP_port=8092
    IOCP_timeout=4000
    Minimized=Yes
    toggle_delay=20
    CONFIG_FILE=sioc.ssi
    [IOCARDS MODULE]
    IOCard_disable=No
    IOCard_LPT=No
    [MASTERS]
    MASTER=2,4,1,141
    [Note: change the number 28 into the Device number of your USB expansion card, see SIOC main window, devices]
    [FSUIPC MODULE]
    FSUipcdisable=yes
    FSUipcRefresh=100
    [IOCP CLIENTS MODULES]
    IOCPini_delay= 3000
    IOCPclient0_disable=Yes
    IOCPclient0_host=localhost
    IOCPclient0_port=8091
    IOCPclient1_disable=Yes
    IOCPclient1_host=localhost
    IOCPclient1_port=8092
    [SOUND MODULE]
    Sound_disable=Yes
    Volume=100


    And, just for redundancy, here's my config_sioc.ini

    2
    C:\Program Files (x86)\IOCards\SIOC\6.2_TestLights.txt
    C:\Program Files (x86)\IOCards\SIOC\6.1_ColdAndDark.txt
    C:\Program Files (x86)\IOCards\SIOC\1_Digit.txt
    C:\Program Files (x86)\IOCards\SIOC\3.3_MCP_Generic.txt
    C:\Program Files (x86)\IOCards\SIOC\3.3_MCP_Buttons.txt
    C:\Program Files (x86)\IOCards\SIOC\3.3_MCP_OutIAS.txt


    At the moment, it looks like I will ditch the arduino and switch to only using the oc cards. My original plan was to hook the encoders up to the mastercard, but the controlador program showed that they were not working correctly, so I hooked them up to the arduino. I'll probably end up buying some grey-type rotary encoders and hooking them up to the mastercard instead.

    At the moment, however, here's my setup that I'm trying to test:
    15 7 segment displays connected to display II card, on pins 1-15 respectively. I have five displays in ALT window, four in VS window (no minus sign at the moment), and three displays each in the HDG and IAS/MACH windows. This is all I am trying to test right now. Will this setup work with the provided programs listed in my config_sioc.ini, or should I just try writing my own?

    Thanks for all your help!

    Steve

Page 1 of 3 123 LastLast