Results 11 to 20 of 37
Thread: SIOC and Offset 023A
-
04-18-2012, 03:08 PM #11
Re: SIOC and Offset 023A
Jack
The "Endless timer" example from Nico works great at my end.
&control will never change but the timer works great anyway.
Extend the code this way:
Code:Var 0 Value 0 { &control = 0 &control = TIMER 1 0 5 } Var 10 name Counter Value 0 Var 1 name control Link SUBRUTINE { &Counter = &Counter + 1 // regular control work in here (is called every 50 msec) }
BTW - $049C seems to be another "wrong" FSUIPC offset.
-
04-18-2012, 04:06 PM #12
Re: SIOC and Offset 023A
Hi Guys,
It is indeed 'by design' that the control variable stays 0 in my endless timer example. Simply because the increment is 0... so control stays endless 0 and never reaches 1.... but the Timer works flawlessly and calls the control subroutine every 50 ms.
Nico
-
04-18-2012, 11:00 PM #13
Re: SIOC and Offset 023A
Thank you everyone.
I was under the impression that, after starting a timer, &control would change values as it counts up. As long as it calls the Subroutine; I don't care !!!
PS: Does anyone know how to define the Potentiometers from the USBDCMotors card in SIOC? They are defined in my SIOC.ini as "USBAnalogic, Device 0,38". I do, however, have Potentiometers connected to my USBEXpansion card; so how do I differentiate between the two devices?
PS2: I haven't done any SIOC scripting in about 6 months; sorry if I'm a little rusty!
-
04-19-2012, 04:17 AM #14
- Join Date
- Jul 2013
- Posts
- 917
Re: SIOC and Offset 023A
Jack
Surely not so rusty that the "help file" has also seized up to
It is all in the Help section of Config
USB_Analogic etc etc and IOCARD_Analogic etc etc
Regards
David
-
04-19-2012, 08:46 AM #15
Re: SIOC and Offset 023A
Hi David,
That's the problem. I have the Pots defined in the .ini as USBAnalogic=0,38 - Just as the manual says.
I then reference it in the SIOC file like so:
Code:Var 0003, name Pot_GS, Link USB_ANALOGIC, Device 0, Input 2, PosL 97, PosC 133, PosR 170 // Potentiometer for GS
-
04-19-2012, 09:17 AM #16
- Join Date
- Jul 2013
- Posts
- 917
Re: SIOC and Offset 023A
Jack
You asked how to reference the pots when they are connected to the USBExpansion card.
The answer is to use the definition Link IOCard_analogic, Device?, Input ? etc etc.
Do you now have a different problem?
David
-
04-19-2012, 01:26 PM #17
Re: SIOC and Offset 023A
Hi David,
I'm talking about reference the Pots if they're connected to the DC Motors Card, not the USBExpansion Card.
Cheers,
Jack
-
04-19-2012, 02:39 PM #18
- Join Date
- Jul 2013
- Posts
- 917
Re: SIOC and Offset 023A
Jack
"I do, however, have Potentiometers connected to my USBEXpansion card; so how do I differentiate between the two devices?"
That was the question I was answering.
With regard to USB devices, I believe it is as you have typed.
I will do some checking later and revert if anything comes to mind. I need to spray the Stab Trim guards on my throttle
David
-
04-19-2012, 09:32 PM #19
Re: SIOC and Offset 023A
The USBExpansion Card is listed as "Device 0" in the SIOC.ini, and it has Pots connected to it.
Likewise, the USBDCMotors Card is also "device 0" (since it's my only motors card), but it too has Pots connected to it.
I'm wondering how to define Potentiometers on the USBDCMotors Card.
Cheers,
Jack
-
04-20-2012, 04:44 AM #20
- Join Date
- Jul 2013
- Posts
- 917
Re: SIOC and Offset 023A
Jack
Your post # 15 above appears to correctly answer your question. So what is the problem?
David
Free connections, find your partner with no obligations Real-life Girls Exemplary Сasual Dating
Super Сasual Dating - Verified...