Sony Camera Presets
David_w
Posts: 23
I am trying to write code that will allow me to store presets for a Sony Camera. I would like to touch Preset then touch Preset 1,2, or 3 and it would then store the Preset to that number. Below is the code I am trying to use but I have errors. Thanks for any help.
Define Vars
ncampreset1 // button 109
ncampreset2 // button 110
ncampreset3 // buton 111
ncamsetpre // button 112
Program:
BUTTON_EVENT[dvTP,112]
{
PUSH:
{
If ncamsetpre = ncampreset1 // FIRST ERROR
send_string dvCam,"$81,$01,$04,$3f,$01,$00,$ff"
}
{
Else if ncamsetpre = ncampreset2
send_string dvCam,"$81,$01,$04,$3f,$01,$01,$ff"
}
{
else ncamsetpre = ncampreset3
send_string dvCam,"$81,$01,$04,$3f,$01,$02,$ff"
}
}
[dvTP,109] = ncampreset1
[dvTP,110] = ncampreset2
[dvTP,111] = ncampreset3
[dvTP,112] = ncamsetpre
Define Vars
ncampreset1 // button 109
ncampreset2 // button 110
ncampreset3 // buton 111
ncamsetpre // button 112
Program:
BUTTON_EVENT[dvTP,112]
{
PUSH:
{
If ncamsetpre = ncampreset1 // FIRST ERROR
send_string dvCam,"$81,$01,$04,$3f,$01,$00,$ff"
}
{
Else if ncamsetpre = ncampreset2
send_string dvCam,"$81,$01,$04,$3f,$01,$01,$ff"
}
{
else ncamsetpre = ncampreset3
send_string dvCam,"$81,$01,$04,$3f,$01,$02,$ff"
}
}
[dvTP,109] = ncampreset1
[dvTP,110] = ncampreset2
[dvTP,111] = ncampreset3
[dvTP,112] = ncamsetpre
0
Comments
In NL Studio, Help -> Netlinx Keywords is an INVALUABLE source of information that may have helped you out in the the space of time it took for you to post that.
You're also not showing us where values get assigned to variables, but your feedback statements probably aren't going to do what you want. If you want button 109 to light up when ncamsetpre equeals ncampreset1, you want this:
The way you have it in your example, button 109 would light up any time the variable ncampreset1 was equal to anything but zero.
Also - you do know that there are existing modules for a lot of equipment - including Sony cameras, right? I'm not going to knock you for doing it the way you've started, 'cos you'll learn a lot, but if you just want to get a camera up & running for a job, you might want to look into getting the module...
- Chip
Thanks Chip, I do know there are module. I am just trying to teach myself how to code in AMX. Trying to get myself to think in same logic format. Since I doing this for fun right now, I can take my time and try new stuff while getting help from others. Thank you so much for your help.
- Chip