Why SEND_STRING not work
ablesimov
Junior Member
i not understand
If i send
send_string dvZpre1,"'W 1 1 1',13"
it work
but if i send
send_string dvZpre1,"'$57,$20,$31,$20,$31,$20,$31',13"
it not work
This string write in Parasound ZPre manual
If i send
send_string dvZpre1,"'W 1 1 1',13"
it work
but if i send
send_string dvZpre1,"'$57,$20,$31,$20,$31,$20,$31',13"
it not work
This string write in Parasound ZPre manual
Comments
-
Ascii / Hex
send_string dvZpre1,"'W 1 1 1',13" :
'W 1 1 1' thats an ASCII String
,13 thats an CR in DEC
send_string dvZpre1,"'$57,$20,$31,$20,$31,$20,$31',13" :
'$57,$20,$31,$20,$31,$20,$31' thats a HEX Command as an ASCII String...
try without ' ' (Highcomma)
i think thats should be work !
send_string dvZpre1,"$57,$20,$31,$20,$31,$20,$31,13" -
Ok
it work -
I have some problem with
DEFINE_CALL 'SWT_KRAMER' (INPUT,OUTPUT)
{
IF ((INPUT >= 0) AND (INPUT <= 8) AND (OUTPUT >= 0) AND (OUTPUT <= 8))
{
SEND_STRING dvKramer,"$01,'$',ITOA(INPUT + 80),'$',ITOA(OUTPUT + 80),$81,$0D"
}
}
What i do wrong ? -
ablesimov wrote:I have some problem with
DEFINE_CALL 'SWT_KRAMER' (INPUT,OUTPUT)
{
IF ((INPUT >= 0) AND (INPUT <= 8) AND (OUTPUT >= 0) AND (OUTPUT <= 8))
{
SEND_STRING dvKramer,"$01,'$',ITOA(INPUT + 80),'$',ITOA(OUTPUT + 80),$81,$0D"
}
}
What i do wrong ?
You need $80 not 80 -
No - its not work
SEND_STRING dvKramer,"$01,ITOA(INPUT + $80),ITOA(OUTPUT + $80),$81,$0D"
Results Line
13 :: String To [5001:1:1]-[$01129129$81$0D] - 01:46:21 -
I want send
String To [5001:1:1]-[$01$81$81$81$0D] -
I'm confused. You do know that $ is not the actual ascii character '$' right? the $ is just a sigil that signifies the following two numbers refer to a hexadecimal number. For instance $FF = 255.
Oh and you're converting your additions to ASCII with ITOA(). You don't want ACSII characters. You want numbers. Try this: SEND_STRING dvKramer,"$01,(INPUT + $80),(OUTPUT + $80),$81,$0D" -
OOO
Thanks -
This one works for me,but it does create this compiler warning:
C10573: String used as a CHAR value in a math operation
send_string dvvidswitch,"$01,(80+itohex(input)),(80+itohex(output)),$81" -
itohex() produces a 2+ character string with ascii characters representing a value. For instance itohex(255) = 'FF', itohex(256) = '100', etc.
it's useful for protocols which demand ascii characters representing hex strings. But if you're just trying to send hex stay away from this function.
send_string dvvidswitch,"$01,($80+input),($80+output),$81" // I think this is what you're trying to do?
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums
