Jump to content
The simFlight Network Forums

chanakaf

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by chanakaf

  1. Thanks John. For some reason, I can't get any values for 0x07FA, I cant find this in the offset in the FS interrogate tool either. From looking at all the data streams, I think I can do what I need to do by calculating the difference between 0x088C and 0x3330 for Throttle 1 when AT is engaged (0x0810). I appreciate your help.
  2. Thanks John. I have tried the additional offsets you suggested and don't quite see anything different. In further reading and understanding offsets, I agree using 0x3330 and 0x3332 is better. I was not able to get any values from 0x089A and 0x0932 for some reason. When AT is not engaged I can see the throttle axis values and also the Engine N1 values. When AT is Engaged, I am trying to find a value for the commanded position of the throttle for each engine so I can calculate the error between the physical lever posion and the desired position based on commanded engine speed. Anyone has any ideas on suitable offsets to use for a motorized throttle control? Thanks.
  3. *** Moved from User Contributions sub-forum to main support forum *** Hello All, I am trying to figure out which offsets to use to motorize my 737 TQ. I want to use these offsets to write a simple LUA script and send data to a serial port and then control the TQ via Arduino. I am running P3D V4, PMDG 737 with FSUIPC V6 I could use 088C and 0924 to get the Throttle Lever position. Which offsets should I use to get the 'Commanded Throttle Position' within AP? should I use 07F8 (AP_RPM_N1_Value) or 0730(Target_speed_for_throttle_feedback) and then check the difference between them? Any help on how to formulate this equation would be much appreciated. I have been trying to do this for some time now and had some previous posts on this topic, but have not been able to fully resolve. Getting close though. Thank You! Anthony
  4. Thank you Pete! This is exactly what I needed. Thanks for your help. Anthony
  5. Hi Pete, I am Familiar with the Aircraft, just not sure how to deal with the codes and get this across to my TQ program. I was bale to identify one offsets from the PMDG document that I want to use 6561 (MCP_AT_SW_PUSHED) however this is a momentary switch, Is there a way I can get a permanent 0 or 1 depending on the state of AT (Engaged vs Disengaged)? I am sure this can be accomplished as I saw on some other threads about 'states' etc. But I just couldn't understand it in the context of a program. How do I use this in a LUA script. When I monitor the offset in FSUIPC I can see it moving from 0 to 1 momentarily, so I know I am looking at the correct offset. I want to know if AT is engaged or not and then pass that variable or state to in my LUA program. Thank you!
  6. I will keep looking and trying, Thank you!
  7. Hi Pete, Do you mean this setting? [SDK] EnableDataBroadcast=1 or were you referring to other settings I need to change?
  8. Thanks Pete, Yes you are correct, I am looking for the AP settings from PMDG. I have looked at the document(attched) you refer to above, but cant find AP related offsets there, Not sure what I am missing. Probably don't know what to look for? Other than this, why are those offsets on my original list not populating? is it because I am using a PMDG aircraft? Is there a way to change it? Offset Mapping for PMDG 777X.pdf
  9. Hello All, I am trying to read data form my sim to improve my home built TQ and ran into some problems reading data from FSUIPC. here is my setup. FSUIPC 5.153 ( I plan to upgrade to FSUIPC 6 soon) P3D 4.3.29.25520 with PMDG 777 Aircraft SimConnect 4.3.0.0 I am trying to identify the correct offsets specially in AP mode. See below output from FSInterrogate2std.exe program. I can see the value from the joystick input(3330, 3332) and I can also see the values from the throttle lever(088C, 0924). However I am not able to see any of the other values, with AP On or Off they don't update at all. What am I doing wrong? I have the PMDG aircraft .ini file set to broadcast=1 as well. My goal is to send this data to a Com port via a LUA script and before go down this path, I want to make sure I am pinging the correct offsets. I am not a expert programmer, so trying to do simple things to get this working. Thank You for any help you can offer. Anthony
  10. Hi Pete, Wanted to share an update with you. I have not been able to find the root cause and have moved to an alternative solution that you suggest. I have moved the LUA script to the FS PC and everything works well. So I will settle for this and move forward. Appreciate very much all your help. Anthony
  11. Sim-A is Sim Avionics. The TQ is a home built system. I have 2 Potentiometers connected to the Throttle axis. the first set of Potentiometers are connected to a BU836 game controller and this is connected via USB to the FS PC. The 2 axis, throttle1 and 2 are configured via FSUIPC. See attached diagram. I have not tried Axis Logging and will try that as well.
  12. Thanks Pete, I obviously I didn't fully understand, I think i didn't reverse the order of the binary. So to use Core 3 and 4 I will set AM to ThreadAffinityMask=x18 (011000) correct? or to use cores 3, 4 and 5 AM should be ThreadAffinityMask=x38 (111000). did I get this right? I did try with a very simple LUA program that had a button function on it, there was still significant lag, so it has to be the overall program. So I will have to now figure out how to set AM for the WideClient and Sim-A via Windows. Thanks for the links.
  13. Hi Pete, Did quite a bit of testing/investigation but still no improvement. to answer your question I looking to get a steady stream of data from the LUA script so that I can drive my motorized TQ smoothly. I am unable to do this when I have Sim-A running. The TQ works great when I run P3D + PMDG aircraft. this is what I did to further trouble shoot. 1. I changed to UDP, I added ProtocolPreferred=UDP in the FSUIPC.ini file, no improvement after this change. 2. I disabled HT on both systems 3. Then I changed the AM on the FS system in FSUIPC.ini ThreadAffinityMask=x6 and LuaAffinityMask=x1, still didn't see an improvement. P3D used 100% of core-0 and 50%+ of Core-1 and 2. 4. I ran the following tests and attached the WideClient log files for each scenario: - Only WideClient connect in ide state (Max Send Depth = 1) - WideClient connect with the LUA code running and Serial data flowing activating my TQ (Max Send Depth = 2) - WideClient connected, No LUA, thus no Serial Data, and Sim-A server running (Max Send Depth = 7) - WideServer connected. LUA code running with serial data flow and Sim-A server running (Max Send Depth = 22) There seem to be some sort of conflict between my LUA script and Sim-A I am not sure what else I can do to investigate this issue. WideClient - ide state.log WideClient - with LUA code running and serial data flow.log WideClient - Sim-A running NO LUA code running.log WideClient - with lua code + Sim-A server running.log WideServer.log
  14. Thanks Pete. I will give this a try this evening and report back.
  15. Thanks Pete. I will change wide client setting to UDP and try this evening, I don't have special requirements to run TCP as you suggested. I believe you are correct that this might be a windows subsystem issue and I am happy to make changes and try this. Could you please give me some guidance on setting Affinity? I know what it is but have no prior knowledge doing this. The FS system has an i7-5820K 6-core, HT enabled, OC'd to 4.5 (P3D and FSUIPC running on this system) The Sim-A system has an i7-4790K 4-core, HT enabled, no OC (Sim-A, Wide Client, LUA Script, running on this system) P3D, Sim-A all running default settings and I have not set Affinity on any platform. Thank You! Anthony
  16. Hi Pete, I have attached the full log files from a short test I just did. I ran the system for about 1 minute without the Sim-A serve running and then started the Sim-A server and ran the system for another minute or two. Same issue as before, as soon as I start the Sim-A server. This test was run without the 50ms delay in the LUA code. To answer your questions; I have all the axis assigned via FSUIPC in P3D. Yes you are correct as a test I removed all the other variables and just tested with 3330 and 3332 so that I can make sure that the problem was not caused by the data coming via Sim-A. My COM port monitoring tool is showing that the data coming into the buffer is erratic, whatever comes in goes out smoothly and no data is piling up. I will try to do more analysis on this with another more sophisticated tool as the one I have not has limitations to be able to get exact time-stamped data. the average framerate on the FS was around 30. The problem is that the data flow into the COM port is not smooth as soon as I start SIM-A. weather its is the full range of 16383 or just a simple switch toggle. It seems that as soon as SIm-A starts there is some sort of internal conflict that is fighting for priority. Thank you for looking into this further. Anthony Comtest.log FSUIPC5.log Server.log WideClient.log WideServer.log
  17. Thanks Pete. I have tried with the 50ms delay and also taking it out. The problem persists either way. The Event function only triggers if the value has changed, so I don't check for that within my code. I am fine with the time it takes for the wide client to connect, I brought this up since I saw it was trying and tried an alternate, just wanted to explore if there were any hints for the overall serial data delay. not an issue with the connection time at all. I am using a COM port monitoring tool and my observations are based on that. I will send you new log files for WideServer.log and the full Wideclient.log later today when I get back home.
  18. Hello All I am posting in this forum as well hoping to get some answers. My other post is at FDS: https://www.flightdecksolutions.com/forum/viewtopic.php?t=6409&highlight=&sid=65df70190fc6673419c15180ca1cd06f I have a pretty basic 2 PC setup. One running the FS and the other running Sim-A. Both PC's with high spec CPU and 32GB memory, 2X NVIDIA 1080 in each system. I have a LUA script running on the Sim-A PC that send 4 pieces of data to a serial port to run my TQ auto throttle. dev = com.open("COM4", 115200, 0) function TrefM(offset, value) command = ",T1:" .. string.format("%02d", value) .. "," com.write(dev, command) ipc.sleep(50) end function Tpos1(offset, value) command = ",T2:" .. string.format("%05d", value) .. "," com.write(dev, command) ipc.sleep(50) end function Tpos2(offset, value) command = ",T3:" .. string.format("%05d", value) .. "," com.write(dev, command) ipc.sleep(50) end function TposA(offset, value) command = ",T4:" .. string.format("%05d", value) .. "," com.write(dev, command) ipc.sleep(50) end function TposB(offset, value) command = ",T5:" .. string.format("%05d", value) .. "," com.write(dev, command) ipc.sleep(50) end event.offset(0x53E4, "UB", "TrefM") --THRUST_REF_MODE event.offset(0x53E0, "UW", "Tpos1") --COMMANDED_THROTTLE_L_POSITION event.offset(0x53E2, "UW", "Tpos2") --COMMANDED_THROTTLE_R_POSITION event.offset(0x3330, "UW", "TposA") --THROTTLE_LEVER_L_POSITION event.offset(0x3332, "UW", "TposB") --THROTTLE_LEVER_R_POSITION The script works well and I get data for offset 53E4, 53E0, 53E2, 3330 and 3332. Here is the issue; When I have P3D running on the FS PC and wide client running on the Sim-A PC the data being written to the com port is very stable and consistent, its a steady stream of data. I only get data for 3330 and 3332 as Sim-A has not started yet. Now as soon as I start Sim-A server, the data stream stutters, with significant lags, sometimes 3/4 second delays, and the data stream is not consistent. I have tried to limit the data output to 3330 and 3332 as well in this scenario and sill the same stuttered data flow. Below is the log file from Sim-A server 28/05/2018 17:26:24 : Server Version : 1.80 28/05/2018 17:26:24 : Network Detected 28/05/2018 17:26:25 : Initializing 28/05/2018 17:26:29 : Ready 28/05/2018 17:26:29 : Registered to: Anthony Fernando : D666-07345 28/05/2018 17:26:29 : ( Types: B777 ) - SSTD PLUS MODE - PRIVATE LICENCE 28/05/2018 17:26:29 : Magvar Original Date : 1993 28/05/2018 17:26:29 : Magvar Date : 2017 28/05/2018 17:26:29 : Webserver Started 28/05/2018 17:26:29 : FSUIPC Inputs : ENABLED 28/05/2018 17:26:29 : FSUIPC Outputs : ENABLED 28/05/2018 17:26:29 : Flight Sim Detected 28/05/2018 17:26:30 : FSUIPC Read/Write Check OK 28/05/2018 17:26:30 : [FSUIPC_INPUTS] Items Read = 429 28/05/2018 17:26:30 : [FSUIPC_INPUTS] Items Loaded = 6 28/05/2018 17:26:30 : [FSUIPC_OUTPUTS] Items Read = 771 28/05/2018 17:26:30 : [FSUIPC_OUTPUTS] Items Loaded = 3 28/05/2018 17:26:30 : FSX/P3D Mode 28/05/2018 17:26:31 : Flt Data Loop = 50 ms Data Send Rate = 0 A/P Rate = 1 28/05/2018 17:26:32 : Processing Started 28/05/2018 17:26:32 : FSUIPC I/O Inhibit 28/05/2018 17:26:35 : FSUIPC I/O Activated 28/05/2018 17:26:35 : Initializing 28/05/2018 17:26:39 : Ready 28/05/2018 17:26:39 : Flt Data Loop = 50 ms Data Send Rate = 2 A/P Rate = 1 28/05/2018 17:26:44 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 10 28/05/2018 17:26:49 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 11 28/05/2018 17:26:54 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 10 28/05/2018 17:26:59 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 11 28/05/2018 17:27:04 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 10 28/05/2018 17:27:09 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 10 28/05/2018 17:27:14 : Flt Data Loop = 50 ms Data Send Rate = 15 A/P Rate = 11 28/05/2018 17:27:19 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 10 28/05/2018 17:27:24 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 11 28/05/2018 17:27:29 : T/O CONFIG : Flaps 28/05/2018 17:27:29 : T/O CONFIG : ParkingBrake 28/05/2018 17:27:29 : T/O CONFIG : Doors 28/05/2018 17:27:29 : Flt Data Loop = 50 ms Data Send Rate = 8 A/P Rate = 5 28/05/2018 17:27:34 : Flt Data Loop = 50 ms Data Send Rate = 5 A/P Rate = 4 28/05/2018 17:27:39 : Flt Data Loop = 50 ms Data Send Rate = 15 A/P Rate = 10 28/05/2018 17:27:44 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 11 28/05/2018 17:27:52 : Flt Data Loop = 50 ms Data Send Rate = 3 A/P Rate = 3 28/05/2018 17:27:57 : Flt Data Loop = 50 ms Data Send Rate = 15 A/P Rate = 11 28/05/2018 17:28:00 : T/O CONFIG : Flaps 28/05/2018 17:28:00 : T/O CONFIG : ParkingBrake 28/05/2018 17:28:00 : T/O CONFIG : Doors 28/05/2018 17:28:04 : Flt Data Loop = 50 ms Data Send Rate = 4 A/P Rate = 3 28/05/2018 17:28:09 : Flt Data Loop = 50 ms Data Send Rate = 3 A/P Rate = 2 28/05/2018 17:28:09 : T/O CONFIG : Flaps 28/05/2018 17:28:09 : T/O CONFIG : ParkingBrake 28/05/2018 17:28:09 : T/O CONFIG : Doors 28/05/2018 17:28:14 : Flt Data Loop = 50 ms Data Send Rate = 15 A/P Rate = 10 28/05/2018 17:28:19 : Flt Data Loop = 50 ms Data Send Rate = 10 A/P Rate = 7 28/05/2018 17:28:24 : Flt Data Loop = 50 ms Data Send Rate = 10 A/P Rate = 7 28/05/2018 17:28:29 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 10 28/05/2018 17:28:35 : Flt Data Loop = 50 ms Data Send Rate = 11 A/P Rate = 8 28/05/2018 17:28:37 : T/O CONFIG : Flaps 28/05/2018 17:28:37 : T/O CONFIG : ParkingBrake 28/05/2018 17:28:37 : T/O CONFIG : Doors 28/05/2018 17:28:41 : Flt Data Loop = 50 ms Data Send Rate = 3 A/P Rate = 2 28/05/2018 17:28:46 : Flt Data Loop = 50 ms Data Send Rate = 9 A/P Rate = 6 28/05/2018 17:28:51 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 10 28/05/2018 17:28:59 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 10 28/05/2018 17:29:04 : Flt Data Loop = 50 ms Data Send Rate = 8 A/P Rate = 5 28/05/2018 17:29:09 : Flt Data Loop = 50 ms Data Send Rate = 15 A/P Rate = 11 28/05/2018 17:29:14 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 11 28/05/2018 17:29:19 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 11 28/05/2018 17:29:24 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 11 28/05/2018 17:29:29 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 11 28/05/2018 17:29:37 : T/O CONFIG : Flaps 28/05/2018 17:29:37 : T/O CONFIG : ParkingBrake 28/05/2018 17:29:37 : T/O CONFIG : Doors 28/05/2018 17:29:37 : Flt Data Loop = 50 ms Data Send Rate = 8 A/P Rate = 6 28/05/2018 17:29:42 : Flt Data Loop = 50 ms Data Send Rate = 15 A/P Rate = 10 28/05/2018 17:29:50 : Flt Data Loop = 50 ms Data Send Rate = 3 A/P Rate = 2 28/05/2018 17:29:56 : T/O CONFIG : Flaps 28/05/2018 17:29:56 : T/O CONFIG : ParkingBrake 28/05/2018 17:29:56 : T/O CONFIG : Doors 28/05/2018 17:29:56 : Flt Data Loop = 50 ms Data Send Rate = 10 A/P Rate = 8 28/05/2018 17:30:01 : Flt Data Loop = 50 ms Data Send Rate = 16 A/P Rate = 10 28/05/2018 17:30:05 : >>> State Backup To File <<< 28/05/2018 17:30:05 : Webserver Stopped Here is the WideFS log file; ********* WideClient Log [version 7.146] Class=FS98MAIN ********* Date (dmy): 28/05/18, Time 17:25:26.123: Client name is DESKTOP-G2JJHBR 94 LUA: "C:\Sim-Avionics\WideFS\Initial.LUA": not found 109 Attempting to connect now 109 Trying to locate server: Need details from Server Broadcast 109 Failed to connect: waiting to try again 1109 Attempting to connect now 2109 Server = TOPGUN 2109 Trying TCP/IP host "TOPGUN" port 8002 ... 2109 ... Okay, IP Address = 10.0.1.10 2125 Connection made okay! 2891 FS closing down (param=ABCD), disconnecting 2891 ********* Interim performance summary ********* 2891 Total time connected so far = 0 seconds 2891 Reception maximum so far: 0 frames/sec, 0 bytes/sec 2891 Reception average whilst connected so far: 22 frames/sec, 2581 bytes/sec 2891 Transmission maximum so far: 0 frames/sec, 0 bytes/sec 2891 Transmission average whilst connected so far: 3 frames/sec, 1306 bytes/sec 2891 Max receive buffer = 670, Max send depth = 1, Send frames lost = 0 2891 *********************************************** 2891 Received shutdown offset code = ABCD 12453 Connection closed by server! Not sure why the initial connection takes a few attempts to connect as I have provided the IP address in the WideFS.ini file. Is there something more I should be doing between UDP and TCP? Any ideas on what might be going on? Is there a timing issue? should I do some sort of CPU affinity to run the LUA script separate from Sim-A? Thank you! Anthony
×
×
  • 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.