Help with bargraphs
jgillich
Posts: 7
I'm trying to update a theatre we have here.
I have only limited programming experience and am trying to get back into it.
I have a prodigy light system controlled through rs232.
I can get the lights to go to presets and ramp up or down.
I'm having a problem getting the bargraph on the TP.
The presets display the correct ranges, but the up down is only displays around 30%.
I tried * 4 and it throws it out of whack.
here is my program.
DEFINE_DEVICE
dvPRODIGY = 5001:7:2
dvTP_1 = 10010:1:2
DEFINE_VARIABLE
HOUSE
DEFINE_EVENT
BUTTON_EVENT[dvTP_1,150] (*House lights On*)
{
PUSH:
{
SEND_STRING dvPRODIGY, "'AL100T5',13"
HOUSE = 100
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
BUTTON_EVENT[dvTP_1,151] (*House lights 75%*)
{
PUSH:
{
SEND_STRING dvPRODIGY, "'AL75T5',13"
HOUSE = 75
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
BUTTON_EVENT[dvTP_1,152] (*House lights On 50%*)
{
PUSH:
{
SEND_STRING dvPRODIGY, "'AL50T5',13"
HOUSE = 50
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
BUTTON_EVENT[dvTP_1,153] (*House lights Off*)
{
PUSH:
{
SEND_STRING dvPRODIGY, "'AL0T5',13"
HOUSE = 0
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
BUTTON_EVENT[dvTP_1,2] (*House lights Up*)
{
PUSH:
{
SEND_STRING dvPRODIGY, "'AU'"
IF(HOUSE < 100)
{
HOUSE++
SEND_LEVEL dvTP_1,6,(HOUSE)
}
ELSE
{
HOUSE = 100
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
HOLD [2,REPEAT] :
{
IF(HOUSE < 100)
{
HOUSE++
SEND_LEVEL dvTP_1,6,(HOUSE)
}
ELSE
{
HOUSE = 100
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
RELEASE:
{
SEND_STRING dvPRODIGY, "13"
}
}
BUTTON_EVENT[dvTP_1,5] (*House lights Dn*)
{
PUSH:
{
SEND_STRING dvPRODIGY, "'AD'"
IF(HOUSE > 0)
{
HOUSE--
SEND_LEVEL dvTP_1,6,(HOUSE)
}
ELSE
{
HOUSE = 0
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
HOLD [2,REPEAT] :
{
IF(HOUSE > 0)
{
HOUSE--
SEND_LEVEL dvTP_1,6,(HOUSE)
}
ELSE
{
HOUSE = 0
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
RELEASE:
{
SEND_STRING dvPRODIGY, "13"
}
}
Any tips would be greatly appreciated.
I have only limited programming experience and am trying to get back into it.
I have a prodigy light system controlled through rs232.
I can get the lights to go to presets and ramp up or down.
I'm having a problem getting the bargraph on the TP.
The presets display the correct ranges, but the up down is only displays around 30%.
I tried * 4 and it throws it out of whack.
here is my program.
DEFINE_DEVICE
dvPRODIGY = 5001:7:2
dvTP_1 = 10010:1:2
DEFINE_VARIABLE
HOUSE
DEFINE_EVENT
BUTTON_EVENT[dvTP_1,150] (*House lights On*)
{
PUSH:
{
SEND_STRING dvPRODIGY, "'AL100T5',13"
HOUSE = 100
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
BUTTON_EVENT[dvTP_1,151] (*House lights 75%*)
{
PUSH:
{
SEND_STRING dvPRODIGY, "'AL75T5',13"
HOUSE = 75
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
BUTTON_EVENT[dvTP_1,152] (*House lights On 50%*)
{
PUSH:
{
SEND_STRING dvPRODIGY, "'AL50T5',13"
HOUSE = 50
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
BUTTON_EVENT[dvTP_1,153] (*House lights Off*)
{
PUSH:
{
SEND_STRING dvPRODIGY, "'AL0T5',13"
HOUSE = 0
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
BUTTON_EVENT[dvTP_1,2] (*House lights Up*)
{
PUSH:
{
SEND_STRING dvPRODIGY, "'AU'"
IF(HOUSE < 100)
{
HOUSE++
SEND_LEVEL dvTP_1,6,(HOUSE)
}
ELSE
{
HOUSE = 100
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
HOLD [2,REPEAT] :
{
IF(HOUSE < 100)
{
HOUSE++
SEND_LEVEL dvTP_1,6,(HOUSE)
}
ELSE
{
HOUSE = 100
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
RELEASE:
{
SEND_STRING dvPRODIGY, "13"
}
}
BUTTON_EVENT[dvTP_1,5] (*House lights Dn*)
{
PUSH:
{
SEND_STRING dvPRODIGY, "'AD'"
IF(HOUSE > 0)
{
HOUSE--
SEND_LEVEL dvTP_1,6,(HOUSE)
}
ELSE
{
HOUSE = 0
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
HOLD [2,REPEAT] :
{
IF(HOUSE > 0)
{
HOUSE--
SEND_LEVEL dvTP_1,6,(HOUSE)
}
ELSE
{
HOUSE = 0
SEND_LEVEL dvTP_1,6,(HOUSE)
}
}
RELEASE:
{
SEND_STRING dvPRODIGY, "13"
}
}
Any tips would be greatly appreciated.
0
Comments
By default they are 0 and 255.
Try changing the high range from 255 to 100 and see if that gets you the results you are looking for.
The presets work in 0 - 100, but the ramp up/down acts like it is 0 - 255.
When I try to times the ramps, it makes it go off the bargraph.
thx, though.
As far as the bargraphs being accurate for presets but not ramps, if the range high is set to 100 as you state, there shouldn't be a difference since your code limits the HOUSE var to 100.
thanks for the help.