Jump to content
The simFlight Network Forums

michel78320

Members
  • Posts

    50
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by michel78320

  1. Hi, I am writing a lua script for my Saitek Proflight modules. Win10 + MSFS + FSUIPC 7.3.7 (registred). Everything works perfectly for the Switch Panel, for the Multi Panel and for the Radio Panel, except this message : 391500 **** DevCom read/write threads still running - will exit anyway but could cause issues... 391813 **** DevCom Read thread terminated 392313 **** DevCom read/write threads still running - will exit anyway but could cause issues... Same message for all Panel, but this does not disturb the operation. I can read the buttons, and display the values in the screens (alt, speed ...). Is this error message important? I have a big problem with the BIP : The "com.writefeature" always return "0" and nothing happens on the BIP. Here is a test script : Vendor = 0x06A3 Product1 = 0x0B4E -- BIP Product2 = 0x0D67 -- Switch Panel Device = 0 Report = 0 ipc.log ("=========================== BIP =========") dev1, rd1, wrf1, wr1, init1 = com.openhid (Vendor, Product1, Device, Report) ipc.log ( "================================ dev1 = " .. dev1) ipc.log ( "================================ rd1 = " .. rd1) ipc.log ( "================================ wrf1 = " .. wrf1) ipc.log ( "================================ wr1 = " .. wr1) s = string.char (6 , 2 , 2 , 2, 0 , 0 , 0 ) n = com.writefeature (dev1, s, wrf1) ipc.log ("=========================== BIP writefeature ==== n = " .. n) ipc.log ("=========================== Switch module =========") dev2, rd2, wrf2, wr2, init21 = com.openhid (Vendor, Product2, Device, Report) ipc.log ( "================================ dev2 = " .. dev2) ipc.log ( "================================ rd2 = " .. rd2) ipc.log ( "================================ wrf2 = " .. wrf2) ipc.log ( "================================ wr2 = " .. wr2) s = string.char (0 , 7) n = com.writefeature (dev2, s, wrf2) ipc.log ("=========================== Switch module writefeature ==== n = " .. n) com.close (dev1) com.close (dev2) Here is the log ********* LUA: "Poll_Saitek" Log [from FSUIPC version 7.3.7] ********* 357282 System time = 23/08/2022 13:19:52, Simulator time = 13:07:10 (11:07Z) 357282 LUA: beginning "C:\FSUIPC7\Poll_Saitek.lua" 357282 LUA: C:\FSUIPC7\Poll_Saitek.lua:1 357297 LUA: Global: ipcPARAM = 0 357313 LUA: C:\FSUIPC7\Poll_Saitek.lua:2 357328 LUA: Global: Vendor = 1699 357344 LUA: C:\FSUIPC7\Poll_Saitek.lua:3 357360 LUA: Global: Product1 = 2894 357375 LUA: C:\FSUIPC7\Poll_Saitek.lua:4 357391 LUA: Global: Product2 = 3431 357407 LUA: C:\FSUIPC7\Poll_Saitek.lua:5 357422 LUA: Global: Device = 0 357438 LUA: C:\FSUIPC7\Poll_Saitek.lua:7 357453 LUA: Global: Report = 0 357469 LUA: =========================== BIP ========= 357485 LUA: C:\FSUIPC7\Poll_Saitek.lua:8 357594 LUA: C:\FSUIPC7\Poll_Saitek.lua:10 357610 LUA: Global: dev1 = 1 357625 LUA: Global: rd1 = 0 357641 LUA: Global: wrf1 = 7 357657 LUA: Global: wr1 = 0 357672 LUA: ================================ dev1 = 1 357688 LUA: C:\FSUIPC7\Poll_Saitek.lua:11 357703 LUA: ================================ rd1 = 0 357719 LUA: C:\FSUIPC7\Poll_Saitek.lua:12 357735 LUA: ================================ wrf1 = 7 357750 LUA: C:\FSUIPC7\Poll_Saitek.lua:13 357766 LUA: ================================ wr1 = 0 357782 LUA: C:\FSUIPC7\Poll_Saitek.lua:15 357797 LUA: C:\FSUIPC7\Poll_Saitek.lua:16 357813 LUA: Global: s = 357828 LUA: C:\FSUIPC7\Poll_Saitek.lua:17 357844 LUA: Global: n = 0 357860 LUA: =========================== BIP writefeature ==== n = 0 357875 LUA: C:\FSUIPC7\Poll_Saitek.lua:19 357891 LUA: =========================== Switch module ========= 357907 LUA: C:\FSUIPC7\Poll_Saitek.lua:20 357953 LUA: C:\FSUIPC7\Poll_Saitek.lua:22 357969 LUA: Global: rd2 = 4 357985 LUA: Global: dev2 = 2 358000 LUA: Global: wrf2 = 2 358016 LUA: Global: wr2 = 0 358032 LUA: ================================ dev2 = 2 358047 LUA: C:\FSUIPC7\Poll_Saitek.lua:23 358063 LUA: ================================ rd2 = 4 358078 LUA: C:\FSUIPC7\Poll_Saitek.lua:24 358094 LUA: ================================ wrf2 = 2 358110 LUA: C:\FSUIPC7\Poll_Saitek.lua:25 358125 LUA: ================================ wr2 = 0 358141 LUA: C:\FSUIPC7\Poll_Saitek.lua:27 358157 LUA: C:\FSUIPC7\Poll_Saitek.lua:28 358172 LUA: Global: s = 358188 LUA: C:\FSUIPC7\Poll_Saitek.lua:29 358203 LUA: Global: n = 2 358219 LUA: =========================== Switch module writefeature ==== n = 2 358235 LUA: C:\FSUIPC7\Poll_Saitek.lua:31 359032 LUA: C:\FSUIPC7\Poll_Saitek.lua:32 359860 >>> Thread forced exit (ipc.exit or os.exit) <<< 359860 System time = 23/08/2022 13:19:55, Simulator time = 13:07:13 (11:07Z) ********* LUA execution terminated: Log Closed ********* Do you have an idea of what is wrong ? Thanks in advance.
  2. Les manettes de l'A320 de Fenix doivent être calibrées avec le MCDU du Fenix. C'est à dire que l'on apprend au simulateur la position des crans du Throttle, et de la manette des volets au simulateur. C'est indiqué dans la dernière page de la notice PDF installée avec l'avion (FAQ #1).
  3. Thank you so much. It is OK ! With "ipc.execCalcCode" I managed to operate all the lights on my V320-OVHD (Overhead from VRInsight) for A320 FBW.
  4. Very interesting. I will read it all with interest. Just a clarification : do I need an "xxx.evt " file to use all the possible events (from gauges) with presets ?
  5. Thank you very much. I did not understand what Calccode did ... I had read the documentation 10 times, and it was still not clear for me. With your example, it seems very simple ... How do you use the Presets? I don't use Mobi.
  6. Hi all. Would someone be able to explain to me how to code Mobi's orders in Lua scripts ? Fox example : 1 (>L:LIGHTING_LANDING_1) 0 1 r (>K:2:LANDING_LIGHTS_SET) 1 1 r (>K:2:TAXI_LIGHTS_SET) First line is : ipc.writeLvar (LIGHTING_LANDING_1 , 1) It is OK for me. But I dont understand : "0 1 r" in RPN ... This puts "0" in the stack, then "1",then inverse (why not write "1 0" ?), then call Event. The script would be this ? ipc.cpntrol (32768 + 10, 1) where my first event file has "10 = TAXI_LIGHTS_SET". I do not understand why two arguments, and how to pass them in Lua sript.
  7. Thank you for this very clear answer. Indeed, I misinterpreted the documentation. Sorry ! Your example is very clear. Thank you. FSUIPC is a wonderful program, which makes it possible to do what MSFS does not know how to do ... I use Hvars and Lvars to interface all my hardware modules (Open Cockpit, VRinsight and CP-Flight) under MSFS. That's wonderful, and your support is at the top.
  8. Hi, I am a registered user of FSUIPC7, with which I have been able to make lots of things for years. I thank the authors a lot for this excellent software. Today, I have got a small difficulty : I want to use the "ENG1" button of my Airbus Throttle TCA (from Thrustmaster). I wrote a Lua script with event.button ("H" , 2 , "my function") . When I push the button, the event accesses correctly to "My Function" . But when I release the button, there is no managed event. Nothing happens (checked in the log of the console) I also tried "event.button ("H" , 2 , downup, "my function") : again no reaction on release. Now, I tried to use Assignments + Buttons (in the menu) , with assigning one lua for Button-press and a second lua for Button-release. It works perfectly well. Do you have an idea of why it works with KeyPress and not with event.button ? Thank you in advance.
  9. OK. I understand all that. My lua script is just an example. But I need to read this value in other routines, not called by event.offset. Luckily, it seems that FSUIPC7.2a is reporting a good value with ipc.readSD (0x0818) while FSUIPC7.1 did not. Of course, the value I get is in meters, and I convert it to feet before I send it to my FCU. Now, I have everything I need to continue my programming. Thank you very much for your explanations and your help.
  10. Hi, here I am again. Here is what I did: - Erase log files+ uninstall FSUIPC - Download FSUIPC7.2a - Install FSUIPC 7.2a - Run MSFS (updated 1.15.10.0) - Load Cessna 172 - Fly 2 mn - Run FSUIPC (see log file) - Run aaaa.lua using Ctrl+4 - Inc altitude with my Saitek panel (three times). - Close FSUIPC It seems that the "value" parameter is not read in the correct format (FLT). No more with a "ipc.read" instruction. But with the offset log, it's good. Please find attached all the files. Thank you in advance. aaaa.lua FSUIPC7.ini FSUIPC7.log
  11. OK. I will try (again) 7.2 (after a new download) and report back (tomorrow). Many thanks for your answers.
  12. Thank you for the quick reply. I redid a test with the minimum: a single lua reduced to the minimum. First, I noticed that I have to do CTRL-2 several times. As the log shows, the script starts well but does not proceed till ipc.log !!! Attached my last tests. "You should monitor as a FLT32, not U32." ==> I always get zero !!! 18047 Monitor IPC:0818 (FLT32) = 0.00000000 62422 Monitor IPC:0818 (U32) = 733096192 66500 Monitor IPC:0818 (U32) = 735093696 66500 SimRead: 0818="AUTOPILOT ALTITUDE LOCK VAR:3" FLT32: 11216.6396484 68343 Monitor IPC:0818 (U32) = 733096192 68343 SimRead: 0818="AUTOPILOT ALTITUDE LOCK VAR:3" FLT32: 11186.1601562 69343 Monitor IPC:0818 (U32) = 731098624 69343 SimRead: 0818="AUTOPILOT ALTITUDE LOCK VAR:3" FLT32: 11155.6796875 83906 Monitor IPC:0818 (FLT32) = 0.00000000 I tried version 7.2 yesterday : but when I ask for the list of LVARs or HVARs, I get 0 values ! So I came back to version 7.1. aaaa.lua FSUIPC7.ini FSUIPC7.log
  13. Hi, First of all, a big thank you for this version 7.1 of FSUIPC. It's great to find again the LVARs and other FSUIPC facilities I just finished the Opencockpit CDU interface with Lvars and Hvars. Everything is functional : CDU ==> USB ==> Sioc ==> FSUIPC (Lua)==> MSFS. Now I am working on the CP-Flight FCU interface : FCU ==> USB (serial) ==> FSUIPC (Lua)==> MSFS. I have some problems reading the variable "ALT" : Offset 0x0818 = 32bits ? Offset monitor : Monitor IPC:818 (U32) = 673170048 SimRead 0818="AUTOPILOT ALTITUDE LOCK VAR:3" FLT32: 10271.7597656 The value is correct for alt = 10 271 m (33 700 feet) BUT when I read it, with" ipc.readFLT ( 0x0818)", I get strange values : 8.8684485102797e-15 How to get the right value with ipc.read ? I tried ipc.readUB, ipc.readUW, ipc.readUD. Nothing works.
  14. Database from '06 ? If I delete Waypoint BAMGO, the plane leaves the track at the previous waypoint (KELAM) and moves back in the MFD ... 🤔
  15. Hi, The one delivered with the software. Excuse me, I forgot some details : P3D V4.3 - Windows 7 FeelThere Product : "EMBRAER E-JETS V.2 EMBRAER 175 AND 195 P3D4" Setup File : ejetsv2-p3dv4-3.exe Purchased : 11/2018
  16. Hi, Thank you for this plane which is very nice. However, I can not make a complete flight in France. The aircraft follows the track normally during the flight. After a waypoint (BAMGO), suddenly, it starts at 90 ° to the East. All modes remain purple in the FMA. If I take control (HDG SEL mode), I bring the plane back on the track. At this moment, the aircraft is represented backward on the MFD. It follows the track, but backing up !!! My flight plan is : ERJ175 - 70 passengers - 20% cargo. From LFMU - Runway 27 - SID KELAM6 To LFMP -Runway 33 6 Approach ILS-z STAR KELAM2 LFMU - KELAM - LFMP CRZ ALT = FL100 Speed = 200 kts (climb - cruise - descent) Takeoff speed 122 - 131 - 137 - 184 Landing speed = 126 - 131 - 150 - 184 TRANS ALT = 5000 (Europe) Three of my (networked) friends tried the same flight and encountered the same problem in the same place. At the moment the plane decides to leave the track :
  17. Great, you've found the solution ! 😀 As suggested, I deleted the sound section. After launch of P3D, I have a new sound section : [Sounds] Path=M:\P3D-V4-0\Sound\ Device1=Périphérique audio principal Device2=Haut-parleurs (Realtek High Definition Audio) Device3=LG ULTRAWIDE-4 (NVIDIA High Definition Audio) Device4=TripleHead2Go-0 (NVIDIA High Definition Audio) Device5=Haut-parleurs (3- Sennheiser USB headset) Here is the corresponding log : 281 ------------------------------------------------------------------- 297 LogOptions=00000000 00000211 297 Sound: Path=M:\P3D-V4-0\Sound\ 297 Sound: EnumDevice=Périphérique audio principal 297 Sound: EnumDevice=Haut-parleurs (Realtek High Definition Audio) 297 Sound: EnumDevice=LG ULTRAWIDE-4 (NVIDIA High Definition Audio) 297 Sound: EnumDevice=TripleHead2Go-0 (NVIDIA High Definition Audio) 297 Sound: EnumDevice=Haut-parleurs (3- Sennheiser USB headset) 297 ------------------------------------------------------------------- Now I can send the sounds to the headset. 🙂 Many thanks, Pete.
  18. By the way, I have windows 7 (64 bits) and P3DV4.3. Logfile = ********* FSUIPC5, Version 5.14 (3rd August 2018) by Pete Dowson ********* Running inside Prepar3D v4 Module base=7FED1E00000 Windows 7 Professional 64 Bit with SP 1.0 reported as Build 7601 (OS 6.1) Prepar3D.exe version = 4.3.29.25520 Reading options from "M:\P3D-V4-0\Modules\FSUIPC5.ini" Checking the Registrations now ... User Name="Michel SORDOILLET" User Addr="michou78@hotmail.com" FSUIPC5 Key is provided WideFS7 Key is provided 0 System time = 30/10/2018 18:48:14 0 FLT UNC path = "\\GARGAMEL\Users\Michel\Documents\Prepar3D v4 Files\" 0 Using DialogMode 0 FS UNC path = "\\GARGAMEL\P3D-V4-0\" 218 ---------------------- Joystick Device Scan ----------------------- 234 Product= Saitek Pro Flight Rudder Pedals 234 Manufacturer= Saitek 249 Vendor=06A3, Product=0763 (Version 1.0) 249 GUIDs returned for product: VID_06A3&PID_0763: 249 GUID= {921FBE70-A7B4-11DF-8001-444553540000} 249 Details: Btns=0, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R511,U0,V0,X127,Y127,Z0 249 Product= Saitek Pro Flight X-55 Rhino Stick 249 Manufacturer= Madcatz 265 Serial Number= G0000041 265 Vendor=0738, Product=2215 (Version 0.87) 265 GUIDs returned for product: VID_0738&PID_2215: 265 GUID= {A9CCC370-8869-11E4-8001-444553540000} 265 Details: Btns=17, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R4095,U0,V0,X65535,Y65535,Z0 265 Product= Saitek Pro Flight X-55 Rhino Throttle 265 Manufacturer= Madcatz 265 Serial Number= G0015253 265 Vendor=0738, Product=A215 (Version 0.119) 265 GUIDs returned for product: VID_0738&PID_A215: 265 GUID= {A9CCC370-8869-11E4-8003-444553540000} 265 Details: Btns=35, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R255,U255,V255,X1023,Y1023,Z255 265 ------------------------------------------------------------------- 265 Device acquired for use: 265 Joystick ID = 2 (Registry okay) 265 2=Saitek Pro Flight Rudder Pedals 265 2.GUID={921FBE70-A7B4-11DF-8001-444553540000} 281 Device acquired for use: 281 Joystick ID = 1 (Registry okay) 281 1=Saitek Pro Flight X-55 Rhino Stick 281 1.GUID={A9CCC370-8869-11E4-8001-444553540000} 281 Device acquired for use: 281 Joystick ID = 0 (Registry okay) 281 0=Saitek Pro Flight X-55 Rhino Throttle 281 0.GUID={A9CCC370-8869-11E4-8003-444553540000} 281 ------------------------------------------------------------------- 296 LogOptions=00000000 00000211 296 Sound: Path=M:\P3D-V4-0\Sound\ 296 ------------------------------------------------------------------- 296 SimConnect_Open succeeded: waiting to check version okay 296 Opened separate AI Traffic client okay 129605 Ready Flags: Ready-To-Fly=N, In Menu=N, In Dlg=N 132897 Running in "Lockheed Martin® Prepar3D® v4", Version: 4.3.29.25520 (SimConnect: 4.3.0.0) 132897 Initialising SimConnect data requests now 132897 FSUIPC Menu entry added 132897 ... Using Prepar3D with Academic License 132913 Ready Flags: Ready-To-Fly=N, In Menu=Y, In Dlg=Y 132913 \\GARGAMEL\Users\Michel\Documents\Prepar3D v4 Files\lfmr.fxml 132913 M:\P3D-V4-Michel\SimObjects\Helicos\nd_ec135\ec135.air 133069 Deactivated for PID=6376, "explorer.exe" 164503 Weather Mode now = Global 165735 \\GARGAMEL\Users\Michel\Documents\Prepar3D v4 Files\LFOL.fxml 170914 Deactivated for PID=6376, "explorer.exe" 170914 Lost focus to PID=6376, "explorer.exe" 286527 Loading Complete ... 287276 Ready Flags: Ready-To-Fly=N, In Menu=N, In Dlg=N 287276 Aircraft loaded: running normally now ... 287322 User Aircraft ID 2 supplied, now being used 287541 System time = 30/10/2018 18:53:01, Simulator time = 17:03:02 (15:03Z) 287541 Aircraft="EC135 F-GMIC2" 287556 ***** Nearest Airports ***** 287556 Airport1=LFOL, Lat=48.759722, Lon=0.659167, Alt=786.998103, Dist=0.022964 287556 Airport2=2856, Lat=48.614030, Lon=0.840835, Alt=801.699556, Dist=11.334442 287556 Airport3=LFAX, Lat=48.540278, Lon=0.533889, Alt=885.997410, Dist=14.061033 287556 Airport4=LFPD, Lat=49.102778, Lon=0.566667, Alt=553.999390, Dist=20.903002 287556 Airport5=LFFD, Lat=48.897435, Lon=1.250722, Alt=491.000714, Dist=24.806232 287556 Airport6=LFAJ, Lat=48.710556, Lon=0.003889, Alt=580.997436, Dist=26.075323 288274 ***DISP*** Text/menu type 1 broadcast 292283 ***DISP*** Text/menu type 1 clear broadcast 294202 -------------------- Starting everything now ---------------------- 294202 Starting WideServer now ... 294218 Using "M:\P3D-V4-0\Modules\GFDEV64.DLL", version 2.2.8.0 294218 GoFlight GFP8 detected: 1 device 294218 GoFlight GF166 detected: 1 device 294218 GoFlight GFMCP detected: 1 device 294218 GoFlight GFRP48 detected: 1 device 294218 GoFlight GFLGT2 detected: 1 device 294264 Ready Flags: Ready-To-Fly=Y, In Menu=N, In Dlg=N 294264 LUA.0: beginning "M:\P3D-V4-0\Modules\ipcReady.lua" 294327 ***DISP*** Text/menu type 4 broadcast 294374 Advanced Weather Interface Enabled 299428 Ready Flags: Ready-To-Fly=Y, In Menu=Y, In Dlg=Y 300707 === Closing session: waiting for DLLStop to be called ... 304654 Deactivated for PID=6376, "explorer.exe" 304654 Lost focus to PID=6376, "explorer.exe" 305029 === DLLStop called ... 305029 === Closing external processes we started ... 306027 === About to kill any Lua plug-ins still running ... 306183 === Closing global Lua thread 306183 ***DISP*** Text/menu type 4 clear broadcast 306183 ***DISP*** Text/menu general clear broadcast 307197 === About to kill my timers ... 307400 === Restoring window procs ... 307400 === Unloading libraries ... 307400 === stopping other threads ... 307400 === ... Button scanning ... 307493 === ... Axis scanning ... 307587 === Releasing joystick devices ... 307587 === Freeing macro memory 307587 === Removing any offset overrides 307587 === Closing all WideFS threads 308944 === Clearing any displays left 308944 === NOTE: not calling SimConnect_Close ... 308944 === AI slots deleted! 308944 === Freeing button memory ... 308944 === Deleting wxstationlist.bin file ... 308944 === Closing my Windows ... 308944 === Freeing FS libraries ... 309943 === Closing devices ... 309943 === Closing the Log ... Bye Bye! ... 309943 System time = 30/10/2018 18:53:24, Simulator time = 17:03:14 (15:03Z) 309943 *** FSUIPC log file being closed Minimum frame rate was 19.5 fps, Maximum was 52.1 fps Average frame rate for running time of 12 secs = 38.1 fps Maximum AI traffic for session was 0 aircraft Memory managed: 12 Allocs, 11 Freed ********* FSUIPC Log file closed *********** Thanks for your help.Good night, see you tomorrow. 🙂
  19. Hi again. Here are the statuses of Windows : And I put the log in five minutes.
  20. The concern may be that I have output sound on the motherboard, and another output on the USB port for the headphones. It seems that FSUIPC is satisfied with the motherboard, and does not search on the USB ports. Do you want the log?
  21. Hello, Thank you, Pete, for that answer. Excuse me for the bad place in the forum. 😕 Here are the devices seen by FSUIPC : [Sounds] Path=M:\P3D-V4-0\Sound\ Device1=Périphérique audio principal Device2=Haut-parleurs (Realtek High Definition Audio) Device3=Realtek Digital Output (Realtek High Definition Audio) Device4=Realtek HDMI Output (Realtek High Definition Audio) Device5=Realtek HD Audio 2nd output (Realtek High Definition Audio) Device6=TripleHead2Go-8 (2- NVIDIA High Definition Audio) Device7=LG ULTRAWIDE-4 (2- NVIDIA High Definition Audio) Here are the devices seen by P3DV4.3 :
  22. Hello, I'm trying to play sounds (some waves) with the library "sounds" to simulate ATC. My lua script works perfectly on the speakers . How can I play the sounds on the headset (palyback device communications)? Indeed it does not appear in the list of devices (file FSUIPC5.ini). My headset is a Senheiser-USB model and works very well with standard ATC. Thank you in advance.
  23. Thank you for this quick response. I apologize, I would of course have to start by verifying that a new version was not released. I just installed the new version. Actually com.write works. All is OK ! I can now write a Lua script to drive my MCP. Your product is just great. Thank you very much.
  24. Hello, I am a registered user of FSUIPC and WIDEFS for 11 years, and I thank Pete very much for this extremely complete software. The operation of WideFS is still operational with P3D-V4. Bravo. I bought an FSUIPC5 key as soon as it was available, and everything works perfectly with P3D-V4. Now, here is my problem : I own an MCF + EFIS from CPFlight. It worked perfectly with the supplied driver, as well as the (Expensive) software from FS-Labs. Unfortunately , the FS-Labs software is a 32 bits version, and there is no planned version for compatibility with P3D-V4. So I looked for another solution, and by reading the important documentation provided with FSUIPC, I discovered that there was everything necessary to direct control for my hardware. So I started using LUA plug-ins, helped by the many examples provided. Great job, Pete ... Very well explained and very complete. Unfortunately, I am not able to make a simple com.write () ... I run P3D-V4 with the following LUA script, associated with a keyboard key ("A") : MCP-747.lua : ----------------------------------------------- -- Commande du MCP-747 de CP-Flight avec LUA ----------------------------------------------- speed = 38400 -- Vitesse du port USB handshake = 0 -- No handshake MCP = com.open("com6", speed, handshake) if MCP == 0 then ipc.log("Pas trouvé de MCP-747 de CP-Flight") ipc.exit() end ipc.log("Port USB ouvert") n = com.write (MCP, "Q001") ipc.log(n) When I execute the script ("A" key from the keyboard), the LLUA log (MCP747.log) gives this: ********* LUA: "MCP-747" Log [from FSUIPC version 5.101] ********* 256825 System time = 21/06/2017 11:42:37, Simulator time = 14:44:36 (12:44Z) 256825 LUA: beginning "M:\P3D-V4-0\Modules\MCP-747.lua" 256825 LUA: M:\P3D-V4-0\Modules\MCP-747.lua:5 256825 LUA: Global: ipcPARAM = 0 256825 LUA: M:\P3D-V4-0\Modules\MCP-747.lua:6 256825 LUA: Global: speed = 38400 256825 LUA: M:\P3D-V4-0\Modules\MCP-747.lua:8 256825 LUA: Global: handshake = 0 256903 LUA: M:\P3D-V4-0\Modules\MCP-747.lua:10 256903 LUA: Global: MCP = 5029216692 256903 LUA: M:\P3D-V4-0\Modules\MCP-747.lua:15 256903 LUA: Port USB ouvert 256903 LUA: M:\P3D-V4-0\Modules\MCP-747.lua:17 256903 LUA: M:\P3D-V4-0\Modules\MCP-747.lua:19 256919 LUA: Global: n = 0 256919 LUA: 0 256919 >>> Thread forced exit (ipc.exit or os.exit) <<< 256919 System time = 21/06/2017 11:42:37, Simulator time = 14:44:36 (12:44Z) ********* LUA execution terminated: Log Closed ********* The trace of the serial port (COM6) by the "Advanced Serial Port Monitor" software gives this : <20170621114237.550 SYS> COM est ouvert <20170621114237.550 SYS> Taille de queue entrée/sortie 1024/1024 <20170621114237.550 SYS> Unable to add string #8 <20170621114237.553 SYS> Débit en bauds 38400 <20170621114237.556 SYS> RTS activé <20170621114237.559 SYS> DTR activé <20170621114237.562 SYS> Bits de données=8, Bits d'arrêt=1, Parité=None <20170621114237.562 SYS> Configurer charactères : Eof=0x00, Error=0x00, Break=0x00, Event=0x00, Xon=0x11, Xoff=0x13 <20170621114237.565 SYS> Handflow : ControlHandShake=(DTR_CONTROL), FlowReplace=(TRANSMIT_TOGGLE, RTS_CONTROL), XonLimit=896, XoffLimit=512 <20170621114237.565 SYS> Purger le port série : RXABORT, RXCLEAR <20170621114237.983 SYS> Purger le port série : RXABORT, RXCLEAR <20170621114238.101 SYS> COM est fermé There is nothing writen on the Com6 ! Using the MCP test software, with the same "Advanced Serial Port Monitor" : <20170621114831.512 SYS> COM est ouvert <20170621114831.515 SYS> Taille de queue entrée/sortie 1024/512 <20170621114831.515 SYS> Purger le port série : RXABORT, RXCLEAR, TXABORT, TXCLEAR <20170621114831.515 SYS> Unable to add string #8 <20170621114831.518 SYS> Débit en bauds 38400 <20170621114831.524 SYS> RTS désactivé <20170621114831.530 SYS> DTR activé <20170621114831.533 SYS> Bits de données=8, Bits d'arrêt=1, Parité=None <20170621114831.533 SYS> Configurer charactères : Eof=0x1A, Error=0x00, Break=0x00, Event=0x00, Xon=0x11, Xoff=0x13 <20170621114831.539 SYS> Handflow : ControlHandShake=(DTR_CONTROL), FlowReplace=(), XonLimit=256, XoffLimit=256 <20170621114831.540 TX> Q001<NUL>Q001<NUL> <20170621114831.612 RX> KCPF<NUL>CPMCP747_100<NUL>CHIAVE0310013<NUL>MOD485EFI1<NUL>K037<NUL>K041<NUL>K017<NUL>K019<NUL>V06 359<NUL>S003<NUL>M001<NUL>K072<NUL>K075<NUL>V0900<NUL> <20170621114844.218 RX> K025<NUL> <20170621114844.218 TX> L0125 <20170621114845.089 RX> K024<NUL> <20170621114845.089 TX> L0124 <20170621114846.026 RX> K026<NUL> <20170621114846.027 TX> L0126 I do not understand where I was wrong ! Can anyone help me ? PS : I am from Paris (France) so, please, excuse my bad English ...
×
×
  • 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.