English Rebel Posted April 22, 2013 Report Posted April 22, 2013 I still need some help in getting my encoders to work. I have the two encoder inputs wired to a Pokeys card and have key assignments of alt+shift+6 and alt+shift+7. My JET45 software gives me an offset of 73FD and the instructions say to add 1 or subtract 1 for a range of 0-255. From what I was told in an earlier post I have to use the Ubyte Increment and Ubyte Decrement offsets. So for alt+shift+6 in Key Presses in the Program keyboard controls here section I used the Ubyte Increment and for alt+shift+7 I used Ubyte Decrement. However I cannot get the encoder to work as I'm not sure what values to put in the Parameters boxes. Could someone please help. Thanks Alan
Pete Dowson Posted April 22, 2013 Report Posted April 22, 2013 I still need some help in getting my encoders to work. I have the two encoder inputs wired to a Pokeys card and have key assignments of alt+shift+6 and alt+shift+7 Key presses assigned to encoders are generally a bad idea. Keypresses build up in the keyboard buffer, and you tend to get overrruns. They also aren't as fast as direct control. However I cannot get the encoder to work as I'm not sure what values to put in the Parameters boxes. The offset entry would be x73FD and the parameter entry 1 (for an increment or decrement of 1). Not really hard? Pete
English Rebel Posted April 22, 2013 Author Report Posted April 22, 2013 The offset entry would be x73FD and the parameter entry 1 (for an increment or decrement of 1). Not really hard? Pete Ah, that simple huh. I guess I was trying to make it more complicated than it is. Will try it tomorrow. The Kohlsman encoder is working okay (albeit a little slow) using key presses and the Kohlsman Inc and Kohlsman Dec from the drop down list, but is there a way that FSUIPC accepts direct inputs for encoders. The Pokeys card is set up for a digital output but I don't see a way for FSUIPC to read it. Thanks Alan
Pete Dowson Posted April 22, 2013 Report Posted April 22, 2013 The Kohlsman encoder is working okay (albeit a little slow) using key presses and the Kohlsman Inc and Kohlsman Dec from the drop down list Sorry, that doesn't sound right. you either assign to keypresses OR to controls. Not both, so what do you mean? Keypresses recognised by FS are converted into those same controls by FS referring to its own assignments list. but is there a way that FSUIPC accepts direct inputs for encoders. Encoders are of two types. One type sends a pusle on one line for one direction (off or on on each click) and another line for the other direction, so look like two buttons repeatedly pressed and released, one for "up" the other for "down". The other type is changing both lines at the same time, out of phase. The phase determines the direction. Those types need more intelligent decoding -- I suspect that's being done on your interface card, otherwise you wouldn't have got to where you are now with what you've done. By "direct input" I've really no idea what you mean -- the direct input is the detection of each pulse. It can't actually measure the voltage on the line, it's just going to look on or off., the interpretation being done in the interface card and encoded in USB messages to Windows drivers. You can make FSUIPC scan buttons faster by adjusting the poll interval -- there's a parameter in the INI file controls that. Reduce the interval to scan faster. The Pokeys card is set up for a digital output but I don't see a way for FSUIPC to read it. The on or off-ness of a switch or button IS "digital". It certainly isn't seeing an analogue input. What more can you expect from a switch? If you want to use a potentiometer or optical encoder which gives positional information, then that is converted to a value by an ADC (analogue to digital converter) in the interface and sent to Wndows drivers in USB packets as an AXIS. You'd assign that sort of readout in the Axis assignments, like all joysticks readouts. Regards Pete
English Rebel Posted April 23, 2013 Author Report Posted April 23, 2013 Sorry, that doesn't sound right. you either assign to keypresses OR to controls. Not both, so what do you mean? Keypresses recognised by FS are converted into those same controls by FS referring to its own assignments list. Regards Pete Pete What I meant was, I assigned key presses in the Pokeys console of ctl+shift+1 and ctl+shift+2 for the encoder. In FSUIPC Key Presses I input ctl+shift+1 and selected Kohlsman Inc from the drop down list and selected Kohlsman Dec for ctl+shift+2. Thanks Alan
Pete Dowson Posted April 23, 2013 Report Posted April 23, 2013 What I meant was, I assigned key presses in the Pokeys console of ctl+shift+1 and ctl+shift+2 for the encoder. In FSUIPC Key Presses I input ctl+shift+1 and selected Kohlsman Inc from the drop down list and selected Kohlsman Dec for ctl+shift+2. Ouch. So Pokeys doesn't emulate a device with buttons, for direct assignment? Can it only send keypresses? If so then you are limited by the Windows keyboard system and its buffering I'm afraid. I was assuming a proper hardware interface card provided normal HID jystick type inputs, like, for example, the Leo Bodnar boards. Regards Pete
English Rebel Posted April 23, 2013 Author Report Posted April 23, 2013 Ouch. So Pokeys doesn't emulate a device with buttons, for direct assignment? Can it only send keypresses? If so then you are limited by the Windows keyboard system and its buffering I'm afraid. I was assuming a proper hardware interface card provided normal HID jystick type inputs, like, for example, the Leo Bodnar boards. Regards Pete Pete Yes the Pokey card can emulate joystick buttons and I can assign a button to each encoder input (which I just tried) -- here is a screen shot and I assigned buttons 19 and 29 via the Direct Mapping function. However I'm not sure how to program this in FSUIPC as there is obviously no response to the encoder in the Buttons & Switches section. BTW I tried setting the parameters for offset 73FD to a "1" but this does not work. When I click on Confirm it enters "I/O" in the parameter box. Thanks for your continuing help on this. Alan
Pete Dowson Posted April 23, 2013 Report Posted April 23, 2013 However I'm not sure how to program this in FSUIPC as there is obviously no response to the encoder in the Buttons & Switches section. Sorry, I don't understand. If the Pokeys card is emulating a joystick input, with buttons, then those buttons will be seen in FSUIPC, providing only it is one of the first 16 joystick devices registered by Windows. It will have a joystick number, and buttons 1-32 (0-31 in FSUIPC's terms) will be seen. BTW I tried setting the parameters for offset 73FD to a "1" but this does not work. When I click on Confirm it enters "I/O" in the parameter box. Oh, sorry forgot to mention -- you need a limit too. Please do refer to the FSUIPC User Guide. It shows what to do there, with examples. In this case look at the boxed section, about page 32, entitled Offset Increment/Decrement Controls. I published the documentation to save having to explain separately every time! ;-) Pete
English Rebel Posted April 23, 2013 Author Report Posted April 23, 2013 Sorry, I don't understand. If the Pokeys card is emulating a joystick input, with buttons, then those buttons will be seen in FSUIPC, providing only it is one of the first 16 joystick devices registered by Windows. It will have a joystick number, and buttons 1-32 (0-31 in FSUIPC's terms) will be seen. Oh, sorry forgot to mention -- you need a limit too. Please do refer to the FSUIPC User Guide. It shows what to do there, with examples. In this case look at the boxed section, about page 32, entitled Offset Increment/Decrement Controls. I published the documentation to save having to explain separately every time! ;-) Pete Pete I'm sorry but now I'm confused. We were talking about encoders and I said that I used keystrokes in the Pokeys console and then in FSUIPC inserted those keystrokes to program my BARO encoder using Kohlsman Inc and Dec from your drop down list. I was using the same method to program my other encoders using Offset Ubyte Decrements and Increments. You then said that using keystrokes was not a good idea and asked this: Ouch. So Pokeys doesn't emulate a device with buttons, for direct assignment? Can it only send keypresses? If so then you are limited by the Windows keyboard system and its buffering I'm afraid. I was assuming a proper hardware interface card provided normal HID jystick type inputs, like, for example, the Leo Bodnar boards. Regards Pete I assume you were asking if the Pokeys card could emulate device buttons so I could program the encoder. FSUIPC (and correct me if I'm wrong) does not recognize buttons from an encoder. Thanks Alan
Pete Dowson Posted April 23, 2013 Report Posted April 23, 2013 I assume you were asking if the Pokeys card could emulate device buttons so I could program the encoder. FSUIPC (and correct me if I'm wrong) does not recognize buttons from an encoder. Of course it does! Why do you think that? They are indistinguishable from other buttons. I have many encoders programmed in the buttons & switches section of FSUIPC! Pete
English Rebel Posted April 23, 2013 Author Report Posted April 23, 2013 Of course it does! Why do you think that? They are indistinguishable from other buttons. I have many encoders programmed in the buttons & switches section of FSUIPC! Pete Pete Bingo. :idea: For some reason (probably operator error) the first time I turned the encoder there was no response in the buttons and switches section. :???: This time it worked a treat. Thanks for your help as I am nearly bald. :mrgreen: Alan
Pete Dowson Posted April 23, 2013 Report Posted April 23, 2013 Thanks for your help as I am nearly bald. :mrgreen: I'm bald already ... not enough help? ;-) Pete
English Rebel Posted April 23, 2013 Author Report Posted April 23, 2013 Pete One more thing, can you please give me the correct syntax in the INI file for the poll interval as I can't locate it using the search function. Thanks Alan
Pete Dowson Posted April 23, 2013 Report Posted April 23, 2013 One more thing, can you please give me the correct syntax in the INI file for the poll interval as I can't locate it using the search function. Pretty much all the user parameters in the INI file are documented in the Advanced User's guide. Where did you look? I certainly don't remember everything in any case. FSUIPC has been going now for about 14 years, and i'm getting old. I have to search often. Searching on Poll or PollInterval or interval finds it pretty quickly! Pete
English Rebel Posted April 25, 2013 Author Report Posted April 25, 2013 Pete I was searching in the INI file DUH. Found it in the Advanced User Guide and added it to my INI file. Thanks Alan
English Rebel Posted April 28, 2013 Author Report Posted April 28, 2013 Pete I got the BARO encoder programmed using the Buttons + Switches function. However if I leave the PC running say overnight and then go back and try to change the barometer setting with the encoder, it doesn't work. If I open FSUIPC and close it again, the encoder now works fine. Any thoughts? Thanks Alan
Pete Dowson Posted April 28, 2013 Report Posted April 28, 2013 I got the BARO encoder programmed using the Buttons + Switches function. However if I leave the PC running say overnight and then go back and try to change the barometer setting with the encoder, it doesn't work. If I open FSUIPC and close it again, the encoder now works fine. Your device is going to sleep. Turn off Windows power management. Pete
English Rebel Posted April 28, 2013 Author Report Posted April 28, 2013 Ah, never though of that. Thanks Alan
English Rebel Posted April 30, 2013 Author Report Posted April 30, 2013 Pete I continue to have issues with encoders not working. It's not power management as that is turned off. I just had to shut down my sim and when I reopened it the encoders didn't work until opened and then closed FSUIPC. I'm running version 4.86. Thanks Alan
Pete Dowson Posted April 30, 2013 Report Posted April 30, 2013 I continue to have issues with encoders not working. It's not power management as that is turned off. I just had to shut down my sim and when I reopened it the encoders didn't work until opened and then closed FSUIPC. I'm running version 4.86. Sorry, there's really nothing FSUIPC can do. It is using standard DirectInput methods. Your entering and exiting FSUIPC option (which is what i assume you mean) merely causes it to repeat the scan it does in any case when it is starting. It simply calls the same procedure, absolutely no difference. Perhaps you should update to the currently supported FSUIPC version, 4.88. A while back, after the 4.86 release, an update was made which did the rescan whenever a USB device appeared to reconnect. Maybe that will fix it, but if so it does strongly suggest something wrong on your system. You may need to check with the folks who make them. Pete
English Rebel Posted April 30, 2013 Author Report Posted April 30, 2013 Okay I'll download version 4.88. Will advise if that fixes it. Thanks Alan
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now