Welcome to Cockpitbuilders.com. Please login or sign up.

October 15, 2025, 07:22:20 AM

Login with username, password and session length

PROUDLY ENDORSING


Fly Elise-ng
524 Guests, 0 Users
Members
Stats
  • Total Posts: 59,756
  • Total Topics: 7,887
  • Online today: 580
  • Online ever: 1,343
  • (October 08, 2025, 07:40:38 AM)
Users Online
Users: 0
Guests: 524
Total: 524

COUNTDOWN TO WF2024


WORLDFLIGHT TEAM USA

Will Depart in...

Recent

Welcome

More newbie SIOC questions

Started by davjones, April 23, 2014, 06:44:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

davjones

Just a few questions from a newbie still trying to work his way through SIOC:

1)  After making a change to and recompilig the script you're working with, is there a way to start the revised script other than shutting down SIOC and restarting it?

2)  Thanks so much to Nico Kann for his terrific paper How to Use SIOC Cards -- it has helped me enormously, but it falls short of being a complete reference manual on SIOC, which I'm sure he never intended it to be anyway.  Other helps have been the manuals for each of the cards at the OC site, and some of Jack Whaley-Baldwin work that's posted at Mutley's Hangar.  And the Powerpoint -- or at least the second half of it -- at the OC site is also useful.  As for the first half, may God help me if I ever need to get my head around IOCP.  Are there other good sources of information on SIOC that I've missed?

3)  One area that's especially troublesome for me is the flow of control through various parts of the script.  Working in the past with more traditional programming languages where you have a go to or other branching commands is probably contributing to my confusion.  Aside from CALLing a Subru(o)tine, which doesn't seem to work in the way one would normally expect, are there any other ways of being able to move around in your code?  Or is everything strictly top to bottom?  If so, when reaching the end, I presume it goes back to the top looking again for variables that have changed and continues so looping?  Or going back to the previous question, anyplace I can find information that explains it?

4)  For development and experimenting purposes, is there some way to display or otherwise interrogate the values of the variables you're working with?  What a great tool troubleshooting tool it would be if you could know the values of the variables!

Even without knowing these things, it's surprising how far I've come with my experiments so far...

Many thanks for any help.  I'll get comfortable with this yet!

...Dave

Dave Jones
Fort McCoy, Florida

fordgt40

Hi Dave

1) Yes, there is a simple inbuilt way. just keep your script editor alive, change the script, save it and then click on the reload button in the SIOC window.

2) There is more info on the OC site, however, go into the SIOC window and click on the Edit Script - this will bring up the script and there is a help button top right which defines the command syntax

3) There is no "logic flow" according to the layout of the script. SIOC builds a list of all your defined variables and their values, then polls the hardware to check if the values have changed. If so, then it runs the script attached to that variable only. If that script subsequently changes the value of another variable, then the code attached to that changed variable is then run etc etc. This is the "golden rule" outlined on Nico`s site

4) SIOC already has powerful interrogation facilities already built in. Go into the IOCPConsole from the main SIOC window. There you will find a list of all variables in your current script, their values and the facility to change them. There is also a "log" function there which records all actions taken by SIOC when a h/w switch etc is changed or a variable altered. When you add the interrogation provided by the SIOC monitor, you have all that is needed.

David

davjones

Thanks so much for those great answers, David  -- that info will help me a lot.

The logic flow thing is still a little sticky -- I'm an old COBOL boy from way back, and then moved into other languages, but the code always followed some clearly spelled out path.  This is a whole new concept to me.  With your explanation and intense study of other people's scripts I'll get it...

Thanks again.

...Dave

fordgt40

#3
Dave

I too found it difficult to change from BASIC and C to SIOC. The best advice I can offer is when coding to include all actions you want to achieve from a variable change within the script attached to that variable. Else, it is very easy to code something that never runs because the variable you have used is never changed!! A simple example is

Var 1 Name gear_down link IOCARD_SW Input 10

Var 2 Name Gear_light Link IOCARD_OUT Output 14
{
If &gear_down = 1
{
&Gear_light = 1
}
}

The Gear_down led will never be lit because the variable Gear_light never changes, hence the script is never run. The answer is to attach the code to light the led to the item that changes value ie the gear switch, as below

Var 1 Name gear_down link IOCARD_SW Input 10
{
If &gear_down = 1
{
&Gear_light = 1
}
}
Var 2 Name Gear_light Link IOCARD_OUT Output 14

Hope this helps

David

jackpilot



you never stop amazing me David!! :D


Jack

fordgt40

Hi Jack

It sometimes feels like a foreign langauge  :)

Regards

David

davjones

I understand your example and thank you for it, David.  I'm starting to realize that coming initially to grips with SIOC is one thing, but getting really comfortable with it will only come with a lot of experience, but you've helped a lot!

Maybe this thread should be counted among the good sources of information on SIOC...  :)

...Dave

Like the Website ?
Support Cockpitbuilders.com and Click Below to Donate