Jump to content
The simFlight Network Forums

Recommended Posts

Posted

8/8/05

Hi flight Simmers

I am building up a panel and have purchased encoders for the radios.

I am using FSUIPC to program the encoders.. In Pete Dowsons Advanced Users Instuctions (ver3.47) in paragraph heading"Compound Button Conditions" he gives instructions for programming an encoder. I cannot get this to work. Iam programming buttons 23 & 24 on joystick 0.

Please help

George Galik

Posted

Hi George,

I'm not entirely sure this is the best place to post this... It might be more suited to Pete Dowson's support forum, further down the list. :)

Hopefully an admin will appear shortly and move it down there or something. ;)

Cheers,

Ian P.

Posted

I am building up a panel and have purchased encoders for the radios.

I am using FSUIPC to program the encoders.. In Pete Dowsons Advanced Users Instuctions (ver3.47) in paragraph heading"Compound Button Conditions" he gives instructions for programming an encoder. I cannot get this to work. Iam programming buttons 23 & 24 on joystick 0.

What's the problem? I can't help in a vacuum. What don't you understand? What have you tried? Why do you want to use compound conditions? Surely if you are building a full panel you have rotary encoders for each radio, so normal direct programming should be fine.

Pete

Posted

I am building up a panel and have purchased encoders for the radios.

I am using FSUIPC to program the encoders.. In Pete Dowsons Advanced Users Instuctions (ver3.47) in paragraph heading"Compound Button Conditions" he gives instructions for programming an encoder. I cannot get this to work. Iam programming buttons 23 & 24 on joystick 0.

What's the problem? I can't help in a vacuum. What don't you understand? What have you tried? Why do you want to use compound conditions? Surely if you are building a full panel you have rotary encoders for each radio, so normal direct programming should be fine.

Pete

Dear Pete,

Thanks for your quick response.

First I tried to program the encoder directly. It responded, however the numbers would not go up in sequence. They would jump up or down several digits. Then I went into theINI file and wrote"31=CP(+0,22)22,23,C65436; line 32=CU(+0,22)22,23,C65437 and that did not work. As a matter of fact there was no response at all.Obviously, I am missing something and since I am not computer literate I need help.

Posted

First I tried to program the encoder directly. It responded, however the numbers would not go up in sequence. They would jump up or down several digits.

Sending increment/decrement controls? The encoder must be clicking on and off fast enough to send batches of controls, then. Each such control with do one inc and one dec, but if the arrive closer than about 400 mSecs apart FS's acceleration kicks in. Try it with a mouse -- hold the mouse on the + or - spots on the radio. Try the same with the +/- keys on the keyboard.

Do the encoders click? Does one click equate to an on-off or and off-on, or does it do on-off-on or off-on-off? You may want to only program the "press" not both "press" and "release". Trurning it one click should give you one inc or one dec.

For really smooth results, if you have local displays in your hardware, you really need to ignore the FS display entirely, turn to set the local hardware, then write the FS value directly when the local one hasn't changed for, say, half a second. Of course this pre-supposes you are programming your own hardware and linking to FSUIPC. Most of the professionally sold radio stacks would work this way.

Otherwise, with no program to control this you have to turn the knobs fast to get close to where you want to be, then slow, single clicks, to set exactly.

The same applies to all of the MCP values too of course.

Then I went into theINI file and wrote"31=CP(+0,22)22,23,C65436; line 32=CU(+0,22)22,23,C65437 and that did not work.

And what does that mean? What are you trying to do there? If I understood what you were doing maybe I could spot something?

You appear to be making the operation of button 23 on joystick 22 conditional on button 22 on joystick 0. How do you get to joystick number 22?

You also appear to want a different control sent when the button is released compared to when it is pressed. If this is true then your rotaries must behave completely differently to those that I've used. The ones I know about give "on-off-on-off-on-off ..." on one line turned clockwise, with a click for each change, and the same on another line (different button number) when turned anti-clockwise.

I think you'll need to explain exactly how your rotaries work before we can go much further.

As a matter of fact there was no response at all.

Probably because there's no joystick number 22?

Obviously, I am missing something and since I am not computer literate I need help.

I'm not sure where computer literacy comes into it. It's only all about joystick numbers, button numbers and control numbers, all of which are either known or easily found in tables.

Regards,

Pete

Posted

First I tried to program the encoder directly. It responded, however the numbers would not go up in sequence. They would jump up or down several digits.

Sending increment/decrement controls? The encoder must be clicking on and off fast enough to send batches of controls, then. Each such control with do one inc and one dec, but if the arrive closer than about 400 mSecs apart FS's acceleration kicks in. Try it with a mouse -- hold the mouse on the + or - spots on the radio. Try the same with the +/- keys on the keyboard.

Do the encoders click? Does one click equate to an on-off or and off-on, or does it do on-off-on or off-on-off? You may want to only program the "press" not both "press" and "release". Trurning it one click should give you one inc or one dec.

For really smooth results, if you have local displays in your hardware, you really need to ignore the FS display entirely, turn to set the local hardware, then write the FS value directly when the local one hasn't changed for, say, half a second. Of course this pre-supposes you are programming your own hardware and linking to FSUIPC. Most of the professionally sold radio stacks would work this way.

Otherwise, with no program to control this you have to turn the knobs fast to get close to where you want to be, then slow, single clicks, to set exactly.

The same applies to all of the MCP values too of course.

Then I went into theINI file and wrote"31=CP(+0,22)22,23,C65436; line 32=CU(+0,22)22,23,C65437 and that did not work.

And what does that mean? What are you trying to do there? If I understood what you were doing maybe I could spot something?

You appear to be making the operation of button 23 on joystick 22 conditional on button 22 on joystick 0. How do you get to joystick number 22?

You also appear to want a different control sent when the button is released compared to when it is pressed. If this is true then your rotaries must behave completely differently to those that I've used. The ones I know about give "on-off-on-off-on-off ..." on one line turned clockwise, with a click for each change, and the same on another line (different button number) when turned anti-clockwise.

I think you'll need to explain exactly how your rotaries work before we can go much further.

As a matter of fact there was no response at all.

Probably because there's no joystick number 22?

Obviously, I am missing something and since I am not computer literate I need help.

I'm not sure where computer literacy comes into it. It's only all about joystick numbers, button numbers and control numbers, all of which are either known or easily found in tables.

Regards,

Pete[/quote

Dear Pete

Thanks for your response. I'm beginning to understand what you wrote.

1. In your instruction manual the paragraph "Compound Button Conditions" states "you can now program those two-phase type rotary switches etc." I understand this to mean that this refers to encoders.

2. The line "1=CP(+1.1)1,2 I interpreted as"line # CP(+joystick#,button #)button#1,Button#2..." apparently this is the wrong interpretation. I am using joystick 0, buttons #22 & #23. Since you used #'s 1&2 I did not know what was a joystick or button number. In your previous definitions you wrote the format out in words ,on these you did not. This is what I was referring to when I said I don't understand computereze. You folks take it for granted that everyone understands what is relative simple and straight forward to you. I understand "C" to be the third letter of the alphabet; for you it is a programming language.

3.All I want to do is turn an encoder knob and have it change the numbers on the computer screen. I hooked up two momentary push buttons and programmed them up and down and they work fine. I want to replace the switches with a rotating knob... that's all. Your program works great, but please keep in mind the simpletons like me that do not understand some of this stuff.

Regards

Posted

In your instruction manual the paragraph "Compound Button Conditions" states "you can now program those two-phase type rotary switches etc." I understand this to mean that this refers to encoders.

I think it refers to a specific type of encoder (aparently called a "two-phase" type) which, instead of having two separate button outputs, one for each direction, has two outputs which pulse in different phases depending on the direction the knob is turned.

I assume these are some sort of cheaper alternatives to all those I have seen.

I have never actually had one such in my hands nor is that section authored by myself, but by a contributor who has experience with such devices and worked out how to program them.

Please check whether you have "two-phase rotary encoders" or the more common (as far as I can tell) simple twin output digital ones. If the former then you'll need advice from someone else, not only for programming them but also probably for wiring them up.

The line "1=CP(+1.1)1,2 I interpreted as"line # CP(+joystick#,button #)button#1,Button#2..." apparently this is the wrong interpretation.

Er. Yes. How did you arrive at that? What would those two button numbers mean on their own, with no joystick number? Why two buttons, what happens to them?

The line

1=CP(+1,1)1,2, ...

is the same as

1=P1,2, ...

but with the condition (+1,1) applying to it and the "C" warning me that the condition is coming. The active button declaration is the same -- how do you read my documentation in another sense, please? I will have to revise that somehow but I need to know how you arrived at such and what you thought it might mena.

You folks take it for granted that everyone understands what is relative simple and straight forward to you.

No, not at all. I expect you to understand complex things if you want to do complex things. Flying an airliner properly is a complex thing too, and folks have to understand a lot. If your rotaries are complex and need complex programming you will need to understand more about how they operate first and then delve into the complexities of programming them.

Or else go purchase the simpler ones which have three wires and can be programmed as two buttons, one clockwise and the other anti-clockwise. Having done that, discard the Advanced User's guide for FSUIPC and just program them in the Dialogue on screen.

My philosophy in all these things has been simple ways to do simple things, but allow more complication to do complex things. If I don't work that way I'd not get very far -- I'd still be trying to write the user interfaces for obscure stuff from long back.

Regards,

Pete

Posted

Dear Pete,

Thanks for your quick response.

1.I did purchase a simple twin output digital encoder and now that I understand how it works, I will program it directly out of FSIUPC.

2.How did I reach my interpretation of your instructions on Compound Button Conditions? On the previous pages of your instruction manual (Format of Button Definitions) you wrote this in English. You described the format in words (Entry Number, Action, etc.) Then you went on to give some excellent examples of key presses and described the action in english words. Very clear, understandable stuff. On the very next page you switched to geek. I read and reread that section several times and could never determine whether 1,1 was a joystick and button number: joystick number entered twice: or a button entered twice. In your last response to me you say"How did you arrive at that? What would those two button numbers mean on their own, with no joystick number?" This is the geek part. I don't have a clue what the relationship is between the numbers. If you had opened this section with an english format and examples as you did in the previous section, I could follow the format and examples without understanding their relationship to one another. All of these"symbols", CP(+1,1) etc. do not convey any logical meaning to me; even though they are written in English characters they convey geek logic.

I hope this clears up some our misunderstanding. Thanks for listening to me.

Regards G Galik

Posted
... Then you went on to give some excellent examples of key presses and described the action in english words. Very clear, understandable stuff. On the very next page you switched to geek. I read and reread that section several times and could never determine whether 1,1 was a joystick and button number: joystick number entered twice: or a button entered twice. In your last response to me you say"How did you arrive at that? What would those two button numbers mean on their own, with no joystick number?" This is the geek part. I don't have a clue what the relationship is between the numbers. If you had opened this section with an english format and examples as you did in the previous section, I could follow the format and examples without understanding their relationship to one another.

Sorry, can you be more specific on the location? I am looking through it all and I cannot see where your "clear" bit ends and the "geek" bit starts. you say "on the very next page" but I cannot see any clear page demarcation for anything. Can you identify the actual heading, words, or something to help?

The "easy" section (i.e. no conditions) defines the format with:

  • = ,,C,

and similar. Is this not "Geek"? The start of the section on conditions is a little more abbreviated:

  • n=CP(+j2,b2)j,b, ....
    n=CU(+j2,b2)j,b, ...
    n=CP(–j2,b2)j,b, ...
    n=CU(–j2,b2)j,b, ...

but surely the "j" and "b" references here strongly (unambiguously?) suggest the same as the and or your "easy" bit?

There is even an explanation just a little later:

  • (+j2,b2) means that button b2 on joystick j2 must be pressed ("on") for the current button action (for j,b) to be obeyed.
    (–j2,b2) means that button b2 on joystick j2 must be released ("off") for the current button action (for j,b) to be obeyed.
    The j,b,part is the usual button parameter, for the action of the “current” button which is button b on joystick j.

In other words, the meaning of each symbol used is defined, just as it was in the earlier part.

Please tell me why one is "clear English" and the other is "Geek". Agreed, the business of using conditionals is going to be more complex than simple definitions of "button X means do Y", but surely you must expect that?

This stuff has been like this for years and I've really not had such adverse comments as your in all that time. Folks who don't understand conditionals apparently don't need to use them (as in fact it turns out you don't).

I am left bewildered and confused here. Please help.

Regards,

Pete

Posted
... Then you went on to give some excellent examples of key presses and described the action in english words. Very clear, understandable stuff. On the very next page you switched to geek. I read and reread that section several times and could never determine whether 1,1 was a joystick and button number: joystick number entered twice: or a button entered twice. In your last response to me you say"How did you arrive at that? What would those two button numbers mean on their own, with no joystick number?" This is the geek part. I don't have a clue what the relationship is between the numbers. If you had opened this section with an english format and examples as you did in the previous section, I could follow the format and examples without understanding their relationship to one another.

Sorry, can you be more specific on the location? I am looking through it all and I cannot see where your "clear" bit ends and the "geek" bit starts. you say "on the very next page" but I cannot see any clear page demarcation for anything. Can you identify the actual heading, words, or something to help?

The "easy" section (i.e. no conditions) defines the format with:

  • = ,,C,

and similar. Is this not "Geek"? The start of the section on conditions is a little more abbreviated:

  • n=CP(+j2,b2)j,b, ....
    n=CU(+j2,b2)j,b, ...
    n=CP(–j2,b2)j,b, ...
    n=CU(–j2,b2)j,b, ...

but surely the "j" and "b" references here strongly (unambiguously?) suggest the same as the and or your "easy" bit?

There is even an explanation just a little later:

  • (+j2,b2) means that button b2 on joystick j2 must be pressed ("on") for the current button action (for j,b) to be obeyed.
    (–j2,b2) means that button b2 on joystick j2 must be released ("off") for the current button action (for j,b) to be obeyed.
    The j,b,part is the usual button parameter, for the action of the “current” button which is button b on joystick j.

In other words, the meaning of each symbol used is defined, just as it was in the earlier part.

Please tell me why one is "clear English" and the other is "Geek". Agreed, the business of using conditionals is going to be more complex than simple definitions of "button X means do Y", but surely you must expect that?

This stuff has been like this for years and I've really not had such adverse comments as your in all that time. Folks who don't understand conditionals apparently don't need to use them (as in fact it turns out you don't).

I am left bewildered and confused here. Please help.

Regards,

Pete

Dear Pete,

Again thanks for your response.

The section I am referring to is Sequences, Combinations and Mixtures. At the end of this section it goes into Compound Button Conditions where the conditionals start. What we are talking about is "thought flow". When one is introduce to a topic in a written document, there is usually a description of the variables that will be used in the book. You familiarize yourself with the nomenclature and proceed to extract the knowledge that the author is trying to convey. Following the logic of a thought process with witch you are not familiar is very trying and requires a lot of attention. When formats or descriptions change you lose focus and more importantly you break the chain of logic that the author is trying to convey. Now you have to go back and establish a new line of thought to include the variables. This is like hitting a bump in the road with your automobile. To those skilled in the art this might sound trite, but to people not as skilled it becomes a major disturbance and you lose you line of thought. It's like reading a book full of acronyms; it drives me crazy. I am a pilot and have had a subscription to the Jeppesen Airways manuals for 35 years. They are full of acronyms and to this day I have to constantly refer to the glossary for some of them. Enough said about that.

After our several communications, especially about the encoders, things cleared up. I have both encoders working on com #1 &2.

Here's what worked:CP(+0,22)0,23,C1030,0 CU(+0,22)0,23,C1031,0.

The only problem remaining is the double speed action CP(-0,22)0,23,C1030,0 CU(-0,22)0,23,C1031,0

When I add these two lines the frequency just goes up 1 unit on the first click and then down one unit on the second click. Any Ideas?

Good chatting with you,

Regards G Galik

Posted

When one is introduce to a topic in a written document, there is usually a description of the variables that will be used in the book.

The variables (just Joystick Number, j or joy#, and Button number, b or btn#) are the same throughout. A button is ALWAYS identified by these two numbers, separated by a comma, and this is actually explained in words too. Why is this i any way a "bump".

You interpreted "j,b" to mean "button number, button number", somehow introducing another button for some reason and ignoring the consistent system introduced and used throughout.

This is where I don't understand how you managed it and which you have not been able to explain. :-(

You familiarize yourself with the nomenclature

Ah, then I think you must have missed that step?

After our several communications, especially about the encoders, things cleared up. I have both encoders working on com #1 &2.

Here's what worked:CP(+0,22)0,23,C1030,0 CU(+0,22)0,23,C1031,0.

I have no idea why you still need conditionals. Why does one button (0,22) have to be "pressed" (i.e. on) to make the other (0,23) work? It is looking as if you have the (cheaper?) two phase encoders after all?

The only problem remaining is the double speed action CP(-0,22)0,23,C1030,0 CU(-0,22)0,23,C1031,0

When I add these two lines the frequency just goes up 1 unit on the first click and then down one unit on the second click. Any Ideas?

None at all, sorry. I really don't know how your encoders are operating. I'e never met any which need any form of conditionals to operate -- all the ones I have are simple and can be programmed in the dialogues with no problems at all.

If you can get the phase timing diagrams for your encoders and show me, then perhaps we can work it out. They should be available from the manufacturer.

Regards

Pete

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.