Page 1 of 2

Channels To Digital Outputs

Posted: Thu Oct 02, 2008 3:51 pm
by BrianEvans
This code allows digital outputs to be driven by standard channels.
In the attached show file the macro is on the "IO_Link"
variable page, which has a macro that constantly triggers it.

Code: Select all

--* * * Channels To Digital Outputs Conversion  V1.0* * *
--* * *  Written By: Brian F. Evans - HCI * * *

IO_Channel=101          --Starting Fixture
 IO_Output=1            --Starting Digital Output Variable
   IO_Page="Digital_IO" --Name Of Variable Page Containg Digital Outputs
  IO_Total=24           --Total Number Of Digital Outputs

--* * * DO NOT MODIFY BELOW THIS LINE * * *
IO_Level={}

--* * * Load Channel Levels Into a Table * * *
for x=IO_Channel,IO_Channel+IO_Total-1 do
    --Must Convert String To Number
    IO_Level[x]=math.ceil(HC.AttributeGetValue(x,'Intensity'))
end

--* * * Change Status Of Digital Outputs* * *
if IO_Channel>IO_Output then
    IO_Difference=IO_Channel-IO_Output
    for x=IO_Channel,IO_Channel+IO_Total-1 do
        IO_Current=x-IO_Difference
        if IO_Level[x]>49 then
            HC.VariableSet(IO_Page,IO_Current,1)
        else
            HC.VariableSet(IO_Page,IO_Current,0)
        end
    end
end

if IO_Channel<IO_Output then
    IO_Difference=IO_Output-IO_Channel
    for x=IO_Channel,IO_Channel+IO_Total-1 do
        IO_Current=IO_Difference+x
        if IO_Level[x]>49 then
            HC.VariableSet(IO_Page,IO_Current,1)
        else
            HC.VariableSet(IO_Page,IO_Current,0)
        end
    end
end

if IO_Channel==IO_Output then
    for x=IO_Channel,IO_Channel+IO_Total-1 do
        IO_Current=x
        if IO_Level[x]>49 then
            HC.VariableSet(IO_Page,IO_Current,1)
        else
            HC.VariableSet(IO_Page,IO_Current,0)
        end
    end
end

Re: Channels To Digital Outputs

Posted: Thu Oct 02, 2008 4:00 pm
by gooze
What is a digital output? DMX? Shownet? Double width 10K fixtures? DL2's?

Re: Channels To Digital Outputs

Posted: Thu Oct 02, 2008 4:03 pm
by BrianEvans
In this example, a Digital Output is controlling an optical relay such as the Opto22 system.

Re: Channels To Digital Outputs

Posted: Fri Oct 03, 2008 11:20 am
by RobertBell
The Variable Pages can be 'patched' to external devices like MIDI, Contact Closures using Vision Net interfaces or Opto 22 professional I/O.

http://www.opto22.com/

http://www.strandlighting.com/index.php ... y=Controls

See also:
http://www.horizoncontrol.com/mqhelp/mq ... iables.htm

Re: Channels To Digital Outputs

Posted: Fri Oct 03, 2008 3:01 pm
by TaineGilliam
Robert,

Can we get a summary of Variable Patch options? The list of what I think I know is:

B - VN or ILS (room number or station ID depending on station mode)
M - MIDI
P - pathport netslot
S - shownet netslot
A - artnet netslot
Look Page Name
Cue Page Name

I'm sure I'm missing something. And the ILS/VN thing is confusing.

Taine

Re: Channels To Digital Outputs

Posted: Fri Oct 03, 2008 3:46 pm
by RobertBell
add to that O22-192.168.0.199 where O is a capital O (not zero) and the IP address is that of the Opto22 Ethernet Brain. This s/w is still in beta, but being used on a gig right now.

B1 is VN button station 1. No space, captical B.

You can have mutiple things patched (like three button stations) like B1,B2,B3 (no space)

or

B1,M2,O22-192.168.0.199,'Main'

Buttons station 1, Midi Channel 2, Opto 22 device and Cue List Main

Nifty.

Re: Channels To Digital Outputs

Posted: Fri Oct 03, 2008 4:22 pm
by MattKlasmeier
What Opto 22 devises are going being supported?

Re: Channels To Digital Outputs

Posted: Fri Oct 03, 2008 4:27 pm
by GaryDouglas
Due to DMX input restructuring the P, S and A items are not available in 10.4.

You can now patch DMX in to a look and get the look's level for processing.

The rest is correct.

Re: Channels To Digital Outputs

Posted: Fri Oct 03, 2008 4:28 pm
by GaryDouglas
The Any opto 22 device that supports the OptoMMP protocol.

We only support the Digital I/O spec right now -- the analog stuff could be added if it's required for a job.

Re: Channels To Digital Outputs

Posted: Fri Oct 03, 2008 5:53 pm
by TaineGilliam
I understand the B12 for ILS station id 12. There is also a bit in the manual concerning VN console buttons and sliders which seem to use similar syntax for a different result - B3 would be console buttons in Room 3?

Sorry to here about the departure of P, A, S. But I suspect the end result is more powerful yet simpler. Am I to understand that for the current (10.4.0+) versions the specified XDMX slot "master" the look or channel. Or in the case of input to output just a reroute.

Taine