Jon is suggesting one way to get a callback on every sim frame - use RequestDataOnSimObject with a callback frequency of SIMCONNECT_PERIOD_SIM_FRAME.
Alternatively, you could call SubscribeToSystemEvent to request notification on each sim frame.
In actual fact, for external communications, such as you are considering, I think you might find that updating on each frame is a bit too much. I would start with the 6Hz or even 1sec notifications.
Also, it looks like you are hard coding the LVar ID's into your code. You can't do that, as you cannot rely on a given LVar having the same ID number in each session. You will need to check the ID number of each LVar before you access it. The ID numbers will be consistent over the life of the loaded aircraft, so you don't have to call check_named_variable in front of each call to get_named_variable_value.
Unfortunately, there is no way of knowing whether a particular LVar has changed values other than by reading it and comparing its current value to its previous value. This does mean that you will have to go through the entire list of LVars you are interested in each time you want to provide updated values - hence my suggestion to start with 6Hz rather than on each sim frame.