Sony RS232 volume slider in JS with Checksum

324 views
Skip to first unread message

nouveau depart

unread,
Feb 11, 2012, 8:12:03 AM2/11/12
to CommandFusion
Hi,

There used to be a discussion about this but i just can't find it
anymore.
here is the problem, the commands for sony use a checksum, so there
has to be a mathematical code in the command

I started this with some help but it's not finished, but this a base
for it...

If anyone is using sony RS232 maybe they could help...

I have the full SONY protocol if someone needs it.

//command set volume : \x02\x06\xa0\x52\x00\x01\xVOLHIGH\xVOLLOW
\xCHEKSUM\x03 CHEKSUM -> 6+160+82+0+1=411

function d2h(d) {//Fonction to transform digit in hex
return d.toString(16);
}
function h2d(h) {//Fonction to transforme hex in digit
return parseInt(h,16);
}
function getStep(volume, position) {
if (volume < 0) {
volume = 65536+volume;
}
volHex = d2h(volume);
while (volHex.length < 4) {
volHex = '0'+volHex;
}
if (position == 'stepLow') {
return volHex.substring(2);
} else if (position == 'stepHigh') {
return volHex.substring(0,2);
}
}
function onSliderReleased(join, value, tokens) {//
command = '\\x02\\x06\\xa0\\x52\\x00\\x01\\x#stepHigh#\\x#stepLow#\
\x#cheksum#\\x03';
stepHigh = getStep(value, 'stepHigh');
stepLow = getStep(value, 'stepLow');
cheksum = d2h(1000 - (411 + h2d(stepHigh) + h2d(stepLow)));//
calculation of the cecksum added to the value of the volume
while (cheksum.length < 4) {
cheksum = '0'+cheksum;
}
cheksum = cheksum.substring(2,4);
command = command.replace(/#stepHigh#/g, stepHigh);
command = command.replace(/#stepLow#/g, stepLow);
command = command.replace(/#cheksum#/g, cheksum);


}
/*
CF.userMain = function() {
CF.watch(CF.ObjectReleasedEvent, "a1", onSliderReleased);

};
*/

Waldy,,,, Liverpool Uk

unread,
Feb 11, 2012, 9:00:57 AM2/11/12
to CommandFusion
Hi,

There was a discussion on this but as the function included
calculating checksums when using a slider I and a few others decided
it was far easier to have a vol up and a vol down. I used the settings
below below. Suppose it is not as nice as a slider but is far easier
to implement. Ok you do not get feedback but sony are known for poor
RS232 control

Zone 1 Set Value Command (Step) This is what I have used to increase/
decrease volume in my gui

\x01\x06\xA0\x52 Set Command
\x01\x06\xA0\x52 \x00 Zone 1
\x01\x06\xA0\x52 \x00\x02 Step Value Setting
\x01\x06\xA0\x52 \x00\x02\x00\x01\cs Increase each step by 1db
(cs=checksum)
\x01\x06\xA0\x52 \x00\x02\xFF\xFE\cs Decrease each step by 1db
(cs=checksum)

\x01\x06\xA0\x52 \x00\x02\x00\x01\x05 Example to increase by 1db
\x01\x06\xA0\x52 \x00\x02\x00\x03\x03 Example to increase by 3db
\x01\x06\xA0\x52 \x00\x02\xFF\xFE\x09 Example to decrease by 1db
\x01\x06\xA0\x52 \x00\x02\xFF\xFC\x0B Example to decrease by 3db

Good Luck


Waldy,,,, Liverpool Uk

unread,
Feb 11, 2012, 9:22:00 AM2/11/12
to CommandFusion

As a follow on,

I don't know if this is possible. If the slider has a value of between
1 and 100 the step could be used for -256db to +256db with +/- 5db
steps. It would then be a simpler calcualtion on the step value and
checksum ie for every 1% of the slider the step could be reduced/
increased by a value of 5hex and the checksum could be increased by
the same value. Sounds logical.

Waldy,,,, Liverpool Uk

unread,
Feb 11, 2012, 9:32:50 AM2/11/12
to CommandFusion
And another follow on....God you can tell I'm keen to get this working

You would also have to use a command on startup to get the current
volume setting. This would then be used to set the slider startup
position.

let me know how you get on

Cheers

Waldy,,,, Liverpool Uk

unread,
Feb 11, 2012, 9:56:11 AM2/11/12
to CommandFusion
And then you would also be able to display the current volume setting
calculated on the position of the slider

this is sounding better all the time

Barry Gordon

unread,
Feb 11, 2012, 10:05:28 AM2/11/12
to comman...@googlegroups.com
Waldy,

On my web site there is a document called "Serial(RS232) communications 101"
It is in the downloads section under commandfusion. It has been found to be
very useful for those getting into RS232 communications. It discusses both
the physical aspects of the connections, and a lot of javascript information
regarding how to deal with strings, etc. There is an example of a checksum
computation, and a whole section on what checksums are and why they are
used.

I do have the checksum computation for the Sony line written in Javascript,
but I would need to look for it as I no longer use Sony gear. Let me know if
you need it. I will be gone for the weekend but back on Monday

Cheers

--
You received this message because you are subscribed to the Google Groups
"CommandFusion" group.
To post to this group, send email to comman...@googlegroups.com.
To unsubscribe from this group, send email to
commandfusio...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/commandfusion?hl=en.

nouveau depart

unread,
Feb 11, 2012, 10:51:16 AM2/11/12
to comman...@googlegroups.com
Barry,

I definitly could use this, i would like to make this work.
I will not be easy, but i'm sure pther people could use it too, so lets make this a common project? ;-)

I will look at your site this weekend and give you feedback on monday


2012/2/11 Barry Gordon <ba...@the-gordons.net>

Waldy,,,, Liverpool Uk

unread,
Feb 11, 2012, 11:18:09 AM2/11/12
to CommandFusion
Hi Barry

I will definitely have a look

Cheers

nouveau depart

unread,
Feb 13, 2012, 5:10:29 AM2/13/12
to CommandFusion
ok i have been looking in to it, the first thing i have lloked for is
to have the feedback of the volume:

request:
\x02\x04\xa0\x92\x00\x01\xc9\x03 (for main room current volume)

now i'm having difficulties to build the regex:
the response of the vol request should be (for a volume of -10db)

\x02\x06\xa8\x92\x00\x01\xf6\x00\xca\x03

the only variable are:
xf6
x00 (i don't need this)
xca (i don't need this)

the volume is calculated as follow:

f6 is hex, transformed is dec it is 246
if you substract 256 to 246 you -10 and that is the current volume.

so i need to extract the xf6 for the reponse of the amp, convert to
dec, substract 10 put this in an analog join and i have a gauge with
the volume.

could some help me to :

1 build the regex expression? i tried but it does not work
2 tell me how to transform the captured value in dec and substract 256
from it
3 put the obtained vaule in the analog join.

thank you

On Feb 11, 5:18 pm, "Waldy,,,, Liverpool Uk"

Waldy,,,, Liverpool Uk

unread,
Feb 13, 2012, 5:25:21 AM2/13/12
to CommandFusion
Hi ND,

I may be wrong but I have the command as

\x02\x04\xa0\x92\x00\x01\xc9 to poll current volume status on main
zone.

There shouldn't be a \x03 at the end. I haven't got all the lisings to
hand so maybe it would be best to check that first

Regards

nouveau depart

unread,
Feb 13, 2012, 5:29:51 AM2/13/12
to comman...@googlegroups.com
I might be wrong also but i think there has to ba a carriage return?
One thing i know for all my commands I had to add the CR \x03 at the end of each command.


2012/2/13 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>

Waldy,,,, Liverpool Uk

unread,
Feb 13, 2012, 5:41:41 AM2/13/12
to CommandFusion
I remember when I was using I/R to control that I had to put a
carriage return at the end which was \x0D but when using RS232 nothing
is needed. This is on a DA-5300

Regards

Waldy,,,, Liverpool Uk

unread,
Feb 13, 2012, 7:00:37 AM2/13/12
to CommandFusion

Hi ND,

I found a previous post from Barry which had the following for Sony
checksum calcs

function SonyCheckSum(a) {
var i; var sum=0;
for(i=1; i<a.length; i++) { sum=sum-0+a.charCodeAt(i); }
sum=(256-(sum%256))%256;
return sum;
}


Regards

Also a place from Florent regarding regex generator. I can't work it
out but you seem more adept with js THAN ME

http://txt2re.com/index.php3?s=13:Feb:2012%20%22This%20is%20an%20Example!%22&79&56&58&71&-59&77&70&64&62

nouveau depart

unread,
Feb 13, 2012, 8:25:46 AM2/13/12
to comman...@googlegroups.com
i don't thnik i need the checksum to have just the volume feedback

2012/2/13 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>

Barry Gordon

unread,
Feb 13, 2012, 2:04:55 PM2/13/12
to comman...@googlegroups.com

For all those struggling with this, I am almost through with a demo program for Sony devices.  It has all of the JS code as two modules, one for the Sony BR mega-changer (will work for many other Sony devices with a slight mod) and a general main program.  I have to do a simple GUI to tie it all together.  If i get the time I will do that this afternoon. The GUI will be just a page with buttons for functions that are demonstrated.  I am not going to include the PnP discovery code but I do have it. Unfortunately it is in VB6 and not JS so it needs to be re-written. That will not be happening this week.

 

My intent is to post it later today on my web site. It will be totally untested until I get the time to drag the changer out of storage and try it out.  probably by the end of the week. But I am sure there are many out there that will test it.  I will fix/correct any thing that I screwed up.  I had it all in JS but cannot find it.  Probably trashed when I got mad at Sony!

 

 

 

 

From: comman...@googlegroups.com [mailto:comman...@googlegroups.com] On Behalf Of nouveau depart
Sent: Monday, February 13, 2012 8:26 AM
To: comman...@googlegroups.com
Subject: Re: Sony RS232 volume slider in JS with Checksum

 

i don't thnik i need the checksum to have just the volume feedback

Barry Gordon

unread,
Feb 13, 2012, 2:31:55 PM2/13/12
to comman...@googlegroups.com

With regard to my last note, This will not be a complete implementation, but rather a demo fully commented in the JS code so it can be understood by most providing you have read the documents concerning serial and IP (coming soon) documents on my site. It will be easy to add to

nouveau depart

unread,
Feb 13, 2012, 4:20:41 PM2/13/12
to comman...@googlegroups.com
Barry, can't wait to test this, it very kind of you to help us!

2012/2/13 Barry Gordon <ba...@the-gordons.net>

Barry Gordon

unread,
Feb 14, 2012, 7:22:45 PM2/14/12
to comman...@googlegroups.com
Waldy,

Could you tell me the model number of the Sony Device you have. The Sony
protocols differ slightly by device type. E.g Power on for a BR changer is
different than Power on for an amp as the amp has multiple zones so it needs
an extra byte.

Are doing this with IP or RS232. I have developed an IP based system (GUI
plus two modules) that is designed as a table driven solution to handle
multiple Sony devices. I have not got it working yet but am pretty close.
The only Sony device I have to test with is a 7000ES BR Mega changer which
has IP protocol. I Think I have some older DVD changers that may have RS232
protocol, but I would need an IP to RS232 converter (e.g. Global Cache) as
all mine are in use.

Sony devices that allow for IP control close the port (socket) after each
transmission so it gets a bit tricky.


-----Original Message-----
From: comman...@googlegroups.com [mailto:comman...@googlegroups.com]

On Behalf Of Waldy,,,, Liverpool Uk

Sent: Saturday, February 11, 2012 9:01 AM
To: CommandFusion
Subject: Re: Sony RS232 volume slider in JS with Checksum

Hi,

Good Luck


nouveau depart

unread,
Feb 15, 2012, 4:18:06 AM2/15/12
to comman...@googlegroups.com
Barry,

I use a STRDA 6400 ES (AV amplifier) with RS 232 (on a global cache GC100-12)
I also use a BDP S5000ES ans SCD XA5400 ES but i use these with IR (on the same GC 100-12)

Like i said the main goal here is to have the feedack (and eventualy a slider control) for the volume in iviewer.
I have all the standard commands working with RS232 on the STRDA 6400 and IR on both other devices on the GC.

regards

2012/2/15 Barry Gordon <ba...@the-gordons.net>

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 4:22:25 AM2/15/12
to CommandFusion
Hi Barry,

I am using a STR-DA5300ES via rs232. I have a Moxa device handling all
serial commands. I do have all the protocols for the device if you
want me to send them over.

Regards

Ian

nouveau depart

unread,
Feb 15, 2012, 4:41:02 AM2/15/12
to comman...@googlegroups.com
Waldy any progress on your side for the volume slider/feedback?

2012/2/15 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 5:54:49 AM2/15/12
to CommandFusion
Re just a thought on the slider.

If you know the command to get the current volume status from the amp.
You just have to isolate the upper and lower volume data to give you
the current setting. Once you know the current setting, set the slider
value to match it on startup. You can also have the current volume
display above the slider if you want. If you use the whole range of
-256 to +256 then you would need rather a long bar to give total
control. I would use 1 to 100 and step +- 5db each time

So

Response is 0x02 0x06 0xa8 0x92 0x01 0xa6 0x00 0x18
volume upper is the 0xa6
volume lower is the 0x00

This gives a current value of -90db so the slider position would be
"82"

From this each move of the slider will change the volume up or down
from that position

Simplified I know but the logic seems right

Ian

nouveau depart

unread,
Feb 15, 2012, 6:22:35 AM2/15/12
to comman...@googlegroups.com
in fact i was thinking to go from 1 to 90
I was as far as you it seems

The only problem i found is making the right regex to extract the upper and lower volume value.
I even think you don't need the lower as this stays 0x00 ( if you limit your volume range from 1 to 90)
so it shloud shloud work by extracting the upper volume value (in hex) converting it to decimal and substract 256 from it, so you have the current value of the volume.
But i just can't seems find the regex and to convert the value...

2012/2/15 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>
Re just a thought on the slider.

Ian

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 6:59:36 AM2/15/12
to CommandFusion
Hi ND,

looking at the info below it should be possible to create a regex that
will take the 2 bytes from the feedback you need. (hex and not
decimal) Then you need to calculate what this value should be
converted to for your slider value on startup.

once you have this in place you will need to create a function that
calculates the correct data to send including the checksum for each
step of the volume you use.

Hope this helps

Capture Groups

CommandFusion Viewers use regex capture groups to manipulate feedback
data into useable GUI object data. Within a particular regex, capture
groups are defined by the parts in round brackets.
The easiest way to show how capture groups work is to give an example:

Lets say a Plasma TV sends the following string out when is it powered
on:
a 01 OK01x
The same TV also sends the following string out when is it powered
off:
a 01 OK00x
The only part of these messages we are interested in are the last two
digits just before the final x, so an example of a regex used to
capture this data (and use to assign to a digital join for example)
would be:
a \d{1,2} OK(\d{1,2})x
Note the use of brackets around the data we want to capture. \d{1,2}
simply means "1 or 2 decimal characters, 0-9". This was used incase
the TV sometimes sent a single 0 or 1 (without the leading 0).
Another way of writing the regex to get the same result would be:
a\s\d\d\sOK(\d\d)x
\s simply means "space character".
If you wanted to ensure that the matched feedback was part of a single
message sent from the system, you can use the ^ (caret) and the $
(dollar sign) characters to specify that the regex must match the
start and end of the feedback string.
^a \d{1,2} OK(\d{1,2})x$
Doing this ensures the feedback string is not part of a larger message
sent from the system.

You can also use multiple capture groups in a single regex. Each
capture group can then be assigned to a join type and number.

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 7:10:26 AM2/15/12
to CommandFusion
Don't know if this helps. It seems the slider value can be set in hex
so there may not be any need to convert to decimal. I would bow to
Jarrod's knowledge on this as I am getting lost


To send the slider value in a command, simply use [sliderval], eg:
MV[sliderval]\x0A\x0D

The [sliderval] will then automatically be replaced by the actual
slider value, accounting for the slider min/max settings, and the
option of sending hex byte, hex string or decimal value (selectable in
slider properties).

See our wiki for more info and examples:
http://www.commandfusion.com/wiki/index.php?title=GuiDesigner:System_...

Jarrod

On Dec 31 2009, 6:05 am, Fiasco <dgvoll...@gmail.com> wrote:

nouveau depart

unread,
Feb 15, 2012, 7:52:48 AM2/15/12
to comman...@googlegroups.com
ok, let's try

the response of the vol request should be (for a volume of -10db)

0x02 0x06 0xa8 0x92 0x00 0x01 0xf6 0x00 0xca 0x03

the only variable are:
xf6
x00 (i don't need this)
xca (i don't need this)

i need to capture the f6

so the regex should be:

\x02\x06\xa8\x92\x00\x01\x(\d)\x(\d)\x(\d)\x03

right?

but d stands for decimal and i need a hex so how to solve this?

and i only need the first capture group right (for the f6)?

I tried this in the regex tester but it does not seem to work...


2012/2/15 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>
Don't know if this helps.  It seems the slider value can be set in hex

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 8:19:41 AM2/15/12
to CommandFusion
The only part of these messages we are interested in are the last two
digits just before the final x, so an example of a regex used to
capture this data (and use to assign to a digital join for example)
would be:
a \d{1,2} OK(\d{1,2})x
Note the use of brackets around the data we want to capture. \d{1,2}

I assume this would mean that you have to make a regex something like

0x02 0x06 0xa8 0x92 0x00 0x01 (\h{1,2}) 0xf6 0x00 0xca 0x03

this I think pulls out in hex from the beginning of the necessary part
of the feedback for 2 digits

Just plucking at straws as I don't know for sure

nouveau depart

unread,
Feb 15, 2012, 8:25:40 AM2/15/12
to comman...@googlegroups.com
I think you mean this: 0x02 0x06 0xa8 0x92 0x00 0x01 (\h{1,2}) 0x00 0xca 0x03?

wouldn't it be beter to do this as those value can change also even if we don't need them:

0x02 0x06 0xa8 0x92 0x00 0x01 (\h{1,2}) (\h{1,2}) (\h{1,2}) 0x03

?

2012/2/15 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>
The only part of these messages we are interested in are the last two

Jarrod Bell

unread,
Feb 15, 2012, 8:36:52 AM2/15/12
to comman...@googlegroups.com
To capture hex bytes, you include the \x within the brackets as that is what designates it as a hex byte.
But because you are wanting to capture any value (not necessarily a digit), use a hex byte range.
You cannot use a "dot" because dots do not capture newline characters (not without enabling regex options that are less efficient I believe).

\x02\x06\xa8\x92\x00\x01([\x00-\xff])..\x03

Jarrod

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 8:36:57 AM2/15/12
to CommandFusion
You are probably right but wouldn't it be:-

0x02 0x06 0xa8 0x92 0x00 0x01 (\h{1,2}) \h{1,2} \h{1,2} 0x03

I don't think you would use () around the ones you don't need as that
would infer that it needs to be captured?

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 8:45:44 AM2/15/12
to CommandFusion
And Jarrod comes back with the answer. Bet he was sick of the amount
of posts LOL

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 9:52:09 AM2/15/12
to CommandFusion
Hi Jarrod,

In my system I have created a startup command for vol_slider

The command for this is "\x02 \x04 \xa0 \x92 \x00 \x01 \xc8" which is
the request for startup volume the response is "0x02 0x06 0xa8 0x92
0x00 0x01 0xa6 0x00 0x18" for a volume setting of -90db.

The only part I need to capture is the "x6"

I have added feedback called startup vol and given it the regex
\x02\x06\xa8\x92\x00\x01([\x00-\xff])..
capture index 1
data Type


nouveau depart

unread,
Feb 15, 2012, 9:53:02 AM2/15/12
to comman...@googlegroups.com
ok i tried with this:


0x02 0x06 0xa8 0x92 0x00 0x01 (\h{1,2}) \h{1,2} \h{1,2} 0x03

and see also the prinscreen of my feedback

I then created a slider with analog join 888 min valule 1 max value 90, simulate feedback ticked.

But it does not work!

questions:

for the min and max values in the feedback, do theu have to be in hex? as i chose hexbyte in hexdata?
is the transform : value-256 right if the value is hex?

same question for my slider, are the min and max value ok or do they have to be hex also?



2012/2/15 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>
And Jarrod comes back with the answer. Bet he was sick of the amount
of posts   LOL

sony volume feedback.jpg

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 9:59:18 AM2/15/12
to CommandFusion
Hi Jarrod,

In my system I have created a startup command for vol_slider (slider
to be used later)

The command for this is "\x02 \x04 \xa0 \x92 \x00 \x01 \xc8" which is
the request for startup volume
The response is "0x02 0x06 0xa8 0x92 0x00 0x01 0xa6 0x00  0x18" for a
volume setting of -90db.

The only part I need to capture is the "a6"

I have added feedback called "startup vol" and given it the regex
\x02\x06\xa8\x92\x00\x01([\x00-\xff])..
capture index  1
data Type Analogue
target Type Digital
Join 1
Token Type value
Transform Min Value,Max Value All blank
Hex Data HexByte

This is where I have stopped as I have worked this out from todays
posts.

The idea is to capture the current volume status on startup and the
"DISPLAY" this value in decimal in a window somehow.

Any help for the next part would be appreciated. I expect ND is way
ahead of me but I am lost

Regards

Ian

Jarrod Bell

unread,
Feb 15, 2012, 10:01:14 AM2/15/12
to comman...@googlegroups.com
See my post about the regex.

\h does not mean a hex byte, \x does:
http://regexkit.sourceforge.net/RegexKitLite/#ICUSyntax

The min and max must be in decimal values.

Jarrod

Jarrod Bell

unread,
Feb 15, 2012, 10:02:42 AM2/15/12
to comman...@googlegroups.com
Target type must be the join type you want to target.
So to show it in a text object, its serial. To show it as a slider
level, its analog, button state, its digital, etc.

So change that, and assign the join number to match a text object in
your GUI.

Note that you probably don't want spaces between each hex byte in your
command, unless the protocol specifically asks for spaces.

Jarrod

nouveau depart

unread,
Feb 15, 2012, 11:12:28 AM2/15/12
to comman...@googlegroups.com
ok, so what should it be?


\x02\x06\xa8\x92\x00\x01([\x00-\xff])

or

\x02\x06\xa8\x92\x00\x01(\xhh)

?

Jarrod what about the transform?

I used: Value -256 but is this correct?

2012/2/15 Jarrod Bell <jar...@guilink.com>
--
You received this message because you are subscribed to the Google Groups "CommandFusion" group.
To post to this group, send email to comman...@googlegroups.com.
To unsubscribe from this group, send email to commandfusion+unsubscribe@googlegroups.com.

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 11:15:10 AM2/15/12
to CommandFusion
\x02\x06\xa8\x92\x00\x01([\x00-\xff])..\x03

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 11:25:17 AM2/15/12
to CommandFusion

Hi ND,

just a thought, if you only capture the one part of the feeback, not
both upper and lower data you will only get a range from 0 to 255 (0
to ff) you will not get -255 to 0. I think you need to capture both
and do some type of calculation

Ian

nouveau depart

unread,
Feb 15, 2012, 11:26:33 AM2/15/12
to comman...@googlegroups.com
Ii think we should sumarize what we do:

Volume status request command:

\x02\x04\xa0\x92\x00\x01\xc9\x03   (used as a button or a timer, or a starup)

feedback regex:


\x02\x06\xa8\x92\x00\x01([\x00-\xff])..\x03

1st group for the display of the value

 capture index  1
 data Type        Analog
 target Type      serial
 Join                 889

 Token Type       value
 Transform         Min Value,Max Value  All blank
 Hex Data         HexByte

2nd group for the display of a slider


 capture index  1
 data Type        Analog
 target Type      Analog
 Join                 888
 Token Type       value
 Transform         value-256
Min Value,        1
Max Value        90
 Hex Data         HexByte

A text with

serial join 889

A slider with

analog join 888
simulate feedback ticked
min value 2
max value 90

And for the moment it does NOTwork

Regards

2012/2/15 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>
\x02\x06\xa8\x92\x00\x01([\x00-\xff])..\x03

--
You received this message because you are subscribed to the Google Groups "CommandFusion" group.
To post to this group, send email to comman...@googlegroups.com.
To unsubscribe from this group, send email to commandfusio...@googlegroups.com.

nouveau depart

unread,
Feb 15, 2012, 11:33:40 AM2/15/12
to comman...@googlegroups.com
no i did some test 
and for direct volume set 0 code is: \x02\x06\xa0\x52\x00\x01\x00\x00\x07\x03
...
for direct volume set 40 code is: \x02\x06\xa0\x52\x00\x01\xd8\x00\x2f\x03
...
for direct volume set 90 code is: \x02\x06\xa0\x52\x00\x01\xa6\x00\x18\x03

so we can have the feedback of the volume from 0 to 90 just with the upper volume data.

So we don't care about the lower data and the checksum if we just want the sataus of the volume.

I don't go above 0 and 90 is not to hear anymore.

But i could be wrong!

2012/2/15 nouveau depart <nouveaud...@gmail.com>

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 11:38:16 AM2/15/12
to CommandFusion
Hi ND,

I am just playing with all this as I am in work with little or nothing
to do. When I get home later I will give it a try..

P.S. For all the info I have on Sony Protocols there in no CR sent
(\03)

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 11:40:54 AM2/15/12
to CommandFusion
I also have the volume status request for main room volume as
\x02\x04\xa0\x92\x00\x01\xc8

Barry Gordon

unread,
Feb 15, 2012, 12:07:42 PM2/15/12
to comman...@googlegroups.com
Well I figured out what I was doing wrong with the Blu Ray changer using
RS232, but that is another issue. I have the basics of a JS based system
for handling multiple Sony devices but have a few issues. I need to find my
iTach, I am pretty sure I have one someplace. I can then test with a couple
of RS232 based changers.

My approach (as always) is minimal use of the CF internal functions and
doing almost all of the work in Javascript. I use the CF system as a front
end where all actions result in Javascript function calls.

I haven't tested it but the regex I am planning to use is (^[\x02, \xFD,
\xFE]) which states 'accept any input that starts with either an 02, FE or
FD' which are how a data response starts or an ACK or NAK. I watch for the
feedback in a JS function and then parse the received message.

I will get back into this after I find my spare iTach. I don't like to
develop without testing.

-----Original Message-----
From: comman...@googlegroups.com [mailto:comman...@googlegroups.com]
On Behalf Of Waldy,,,, Liverpool Uk
Sent: Wednesday, February 15, 2012 11:41 AM
To: CommandFusion
Subject: Re: Sony RS232 volume slider in JS with Checksum

--

nouveau depart

unread,
Feb 15, 2012, 12:05:05 PM2/15/12
to comman...@googlegroups.com
Waldy,

I just checked it is c9 not c8

check your file.
you must be confused with the second room:

\x02\x04\xa0\x92\x01\x01\xc8\x03

as for the CR, all my command (that are working) do have the \x03 at the end.

2012/2/15 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>
I also have the volume status request for main room volume as

\x02\x04\xa0\x92\x00\x01\xc8

nouveau depart

unread,
Feb 15, 2012, 12:16:28 PM2/15/12
to comman...@googlegroups.com
I'm curious Barry.. ;-)

i just checked the upper volime data:

vol dB    Upper data    Upper Hex   Lower Hex
-92        165               a4              0
...
-40        216               d8              0
...
-1          255               ff                0

so upper data goes from a4 to ff
lower data stays 0

if you convert the upper data in decimal and substract 256 you get the actual volume.




2012/2/15 Barry Gordon <ba...@the-gordons.net>

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 12:41:42 PM2/15/12
to CommandFusion
Hi ND,

I've just checked and you are right it is "c9". I've run all similar
to you with just different join numbers and I am getting feedback
according to the display on my moxa. However when I press the button
to get volume nothing shows in the text box

nouveau depart

unread,
Feb 15, 2012, 12:59:56 PM2/15/12
to comman...@googlegroups.com
so you have a display on the moxa?
I have no led nor display on the global cache.
so no check.

There must be something wrong somewhere.

Can anyone have a look at the sumary please? and give possible changes to make it work?
2012/2/15 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>
Hi ND,

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 1:49:57 PM2/15/12
to CommandFusion

Barry Gordon

unread,
Feb 15, 2012, 3:52:20 PM2/15/12
to comman...@googlegroups.com

I believe that is correct.  The volume appears to be biased at 256 so 256  as the high order value is a volume of 0 db.  but the largest value that can be in a 1 byte field is 255.  Ergo subtracting 256 from the value in the high order byte yields -1  db as the volume setting  this implies that the volume ranges from -256 db for a low value and -1 for a high.  You can have it show the volume any way you want understanding that the range is 256 increments. I also think that the low order byte handles a fractional increment but I just don't remember.  I did my work on a BR mega changer using IP and the BR changer did not have a volume setting.

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 5:42:14 PM2/15/12
to CommandFusion
Ok so I've been watching the feedback using Hercules. When I manually
change the volume Hercules notes the changes in the feedback

When I request current volume status from a command assigned to a
button the response shows on Hercules

A response would show as {02} {06} {a8} {92} {00} {01} {a6} {00} {19}
for -90db volume

I want to capture the "a6"

Regex is \x02\x06\xa8\x92\x00\x01([\x00-\xff])..

Group is
Capture index. 1
Data type. Analogue
Target type. Serial
Join. 25
Token type. Value
Transform. Blank
Min value. Blank
Max value. Blank
Hex data. Hexbyte

I have a text box on serial join 25

When I press the button to start the command, although feedback is
being received (as proved with Hercules). Nothing shows in the text
box

Any clues

Nahshon Williams

unread,
Feb 15, 2012, 5:52:54 PM2/15/12
to comman...@googlegroups.com
I would try:

.*\x02\x06\xa8\x92\x00\x01(\x..)\x00\x19.*
OR
.*\x02\x06\xa8\x92\x00\x01(\x.*)\x00\x19.*

Assuming other values stay the same. . . 

N







Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 6:09:12 PM2/15/12
to CommandFusion
Hi Nahshon,

Can't do that. After the brackets in your example the first set of
bytes are lower volume and the second is the checksum and they could/
would change

Cheers

Nahshon Williams

unread,
Feb 15, 2012, 6:14:56 PM2/15/12
to comman...@googlegroups.com
Just tested your regex . . . only the \  shows . . . have you used the tester?
remember double slashes in the regex when testing

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 6:33:05 PM2/15/12
to CommandFusion
I tried the reflex tester and I get no match found. Jarrod gave me
the formula for the regex so I am assuming it is right

Used single and double slashes to test?

Nahshon Williams

unread,
Feb 15, 2012, 6:35:37 PM2/15/12
to comman...@googlegroups.com
Well in the regex tester you need to escape the slashes (only in the regex)

Paste the hercules capture. . . for more that one volume event so we see
a pattern . . .

Waldy,,,, Liverpool Uk

unread,
Feb 15, 2012, 6:46:05 PM2/15/12
to CommandFusion
here is a paste from herucules showing volumme steps -19db to -11db


{02}{06}{A8}{92}{00}{01}{ED}{80}{52}
{02}{06}{A8}{92}{00}{01}{EE}{00}{D1}
{02}{06}{A8}{92}{00}{01}{EE}{80}{51}
{02}{06}{A8}{92}{00}{01}{F1}{00}{CE
{02}{06}{A8}{92}{00}{01}{F3}{00}{CC}
{02}{06}{A8}{92}{00}{01}{F5}{00}{CA}


capture these bytes ^

Nahshon Williams

unread,
Feb 15, 2012, 7:26:08 PM2/15/12
to comman...@googlegroups.com
Try:

\x..\x..\x..\x..\x..\x..(\x..)\x..\x..
or
.*\x..\x..\x..\x..\x..\x..(\x..)\x..\x...*


Tested you data with
\\x..\\x..\\x..\\x..\\x..\\x..(\\x..)\\x..\\x..
\x02\x06\xA8\x92\x00\x01\xED\x80\x52

Nahshon Williams

unread,
Feb 15, 2012, 7:28:25 PM2/15/12
to comman...@googlegroups.com
I trust you have no EOM defined for the system. . .

Nahshon Williams

unread,
Feb 15, 2012, 7:32:22 PM2/15/12
to comman...@googlegroups.com
Just realised that will work for eveything!

\x02\x06\xA8\x92\x00\x01(\x..)\x..\x..
Should do the trick

Jarrod Bell

unread,
Feb 15, 2012, 9:20:23 PM2/15/12
to comman...@googlegroups.com
\x.. is not matching a hex byte, but attempting to match a string which
is literally "\x.." where the dot is any character.

\x must be followed by two valid base16 characters, 0-9a-f.

The regex I posted should work.

Try adding an onmatch item to the feedback processing order, and use
that to set some serial join to a test value, like "test".
This way you can be sure the feedback is actually matching.

\x02\x06\xA8\x92\x00\x01([\x00-\xff])

That should be all you need for the regex. You do not need to state .*
at the start or end, as you are not specifying in the regex the start
and end at all (which uses ^ for start and $ for end).

Testing the capture of hex bytes in the regex tester is not very useful,
as you cannot paste the hex bytes into the actual test data area.

Jarrod

nouveau depart

unread,
Feb 16, 2012, 4:10:50 AM2/16/12
to comman...@googlegroups.com
wel you guys have been thinking this night, but i tried again, no difference.

sumary:


Volume status request command:

\x02\x04\xa0\x92\x00\x01\xc9\x03   (used as a button or a timer, or a starup)

AND

\x02\x04\xa0\x92\x00\x01\xc9

feedback regex:

\x02\x06\xa8\x92\x00\x01([\x00-\xff])

1st group for the display of the value

 capture index  1
 data Type        Analog
 target Type      serial
 Join                 889

 Token Type       value
 Transform         Min Value,Max Value  All blank
 Hex Data         HexByte

2nd group for the display of a slider


 capture index  1
 data Type        Analog
 target Type      Analog
 Join                 888
 Token Type       value
 Transform         value-256
Min Value,        1
Max Value        90
 Hex Data         HexByte

On match:

target Type      Serial
Join                 887
Assign Token   false
Value,              True
send command  blank
send marco   blank


A text with

serial join 889

A text with

serial join 887


A slider with

analog join 888
simulate feedback ticked
min value 2
max value 90

And for the moment it does NOTwork

Waldy how dod you get feedback in hercules, I don't, i can send commands (that work) but i don't ght any sony feedback only something like:   'u 'U
No sony type response.


2012/2/16 Jarrod Bell <jar...@guilink.com>
--
You received this message because you are subscribed to the Google Groups "CommandFusion" group.
To post to this group, send email to comman...@googlegroups.com.
To unsubscribe from this group, send email to commandfusion+unsubscribe@googlegroups.com.

Jarrod Bell

unread,
Feb 16, 2012, 4:19:14 AM2/16/12
to comman...@googlegroups.com
Value: True for the onmatch?

Do you see the text object changing to "True"?

First step you need to do is make sure the feedback is actually matching by just using onmatch to set some text value in the GUI at runtime.

Jarrod
2012/2/16 Jarrod Bell <jar...@guilink.com>
To unsubscribe from this group, send email to commandfusio...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/commandfusion?hl=en.

--
You received this message because you are subscribed to the Google Groups "CommandFusion" group.
To post to this group, send email to comman...@googlegroups.com.
To unsubscribe from this group, send email to commandfusio...@googlegroups.com.

nouveau depart

unread,
Feb 16, 2012, 4:27:59 AM2/16/12
to comman...@googlegroups.com
no I don't see true comming in my text with join 887.

with the onmatch method, you mean like i did? or something else?

now i gonna try in the regex to put real response like this:

\x02\x06\xa0\x52\x00\x01\xd8\x00\x2f\x03  (vol -40)

And if i set my volume to -40 I should have a True in the text of the onmatch or am i wrong?


2012/2/16 Jarrod Bell <jar...@guilink.com>

nouveau depart

unread,
Feb 16, 2012, 4:32:59 AM2/16/12
to comman...@googlegroups.com
Now i'm getting worried by this Hercules Thing,

why don't I see an actual response of the amp?

the response i get is:   `û `û

any idea why?

i'm connected thru TCP client, and the commands do work i can power on and of the amp in hercules.

2012/2/16 nouveau depart <nouveaud...@gmail.com>

Jarrod Bell

unread,
Feb 16, 2012, 4:34:58 AM2/16/12
to comman...@googlegroups.com
You need to put a capture somewhere in the regex for it to cause the feedback processing order to occur:

\x02\x06\xa0\x52\x00\x01(\xd8)\x00\x2f\x03

Jarrod

Jarrod Bell

unread,
Feb 16, 2012, 4:35:31 AM2/16/12
to comman...@googlegroups.com
Enable Hex mode or something in hercules. That response is the actual ascii representation, rather than showing you the hex values.

Jarrod

Waldy,,,, Liverpool Uk

unread,
Feb 16, 2012, 4:37:44 AM2/16/12
to CommandFusion
Right click on the display window and enable hex

nouveau depart

unread,
Feb 16, 2012, 5:00:46 AM2/16/12
to comman...@googlegroups.com
ok now i see the send data, and i see it 2 times, it's like the recieved data is the same as the send data? am i doning something wrong again?
or could it be my RS232 cable not right?

2012/2/16 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>
Right click on the display window and enable hex

Waldy,,,, Liverpool Uk

unread,
Feb 16, 2012, 6:16:44 AM2/16/12
to CommandFusion
I find the best way to see feedback with hercules is

Select TCP Client

Put the ip address and port of the amp in the top right boxes
press connect
right click in the big window
select hex enable
right click again and clear the window

Now MANUALLY adjust the volume knob on your amp and you should start
to see the fedback

nouveau depart

unread,
Feb 16, 2012, 7:19:14 AM2/16/12
to comman...@googlegroups.com
that is what i do,
but the response is the same as the sended code!

i will check my rs232 cable for RX and Tx connection!

2012/2/16 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>
I find the best way to see feedback with hercules is

Nahshon Williams

unread,
Feb 16, 2012, 7:26:41 AM2/16/12
to comman...@googlegroups.com
What colour is the text?
The sent code should be pink and the response should be BLACK text.

Waldy,,,, Liverpool Uk

unread,
Feb 16, 2012, 7:31:33 AM2/16/12
to CommandFusion
??? you are not sending code all you should see is the received code
from the amp in hercules when you manually turn the volume knob?

nouveau depart

unread,
Feb 16, 2012, 8:15:17 AM2/16/12
to comman...@googlegroups.com
i have black and pink code exactly the same, this might be one of the problems.
i'll check the rs232 cable.

2012/2/16 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>
??? you are not sending code  all you should see is the received code

from the amp in hercules when you manually turn the volume knob?

nouveau depart

unread,
Feb 16, 2012, 8:39:38 AM2/16/12
to comman...@googlegroups.com
very good news, i checked the cable and Rx pin was disconected!

it seems to work now,

even in iviewer, i mean i get a true value on my on match...
i have to go now so i will continue tomorow to fine tune it.
this are my parameters:


Volume status request command:

\x02\x04\xa0\x92\x00\x01\xc9\
x03   (used as a button or a timer, or a starup)

like i said a the moment i have my text with join 887 showing True
AND my text with join join 889 show the decimal value of the upper volume.

I think i just have to add somewhere a transform with -256 to display the right value.

BUT the slider feedback does not work

2012/2/16 nouveau depart <nouveaud...@gmail.com>

nouveau depart

unread,
Feb 16, 2012, 10:19:43 AM2/16/12
to comman...@googlegroups.com
ok back for some test,
I changed this:

1st group for the display of the value

 capture index  1
 data Type        Analog
 target Type      serial
 Join                 889
 Token Type       value
 Transform         value-256

 Min Value,Max Value  All blank
 Hex Data         HexByte

2nd group for the display of a slider


 capture index  1
 data Type        Analog
 target Type      Analog
 Join                 888
 Token Type       value
 Transform         value-256
Min Value,        blank
Max Value        blank
 Hex Data         HexByte

I have now the correct dB value displayed in my text field with join 889

BUT the slider remains off, no movement. any idea why?


2012/2/16 nouveau depart <nouveaud...@gmail.com>

Waldy,,,, Liverpool Uk

unread,
Feb 16, 2012, 10:25:04 AM2/16/12
to CommandFusion
In the second group for your slider don't you have to have a min and
max value ie 1 and 100 so the slider knows its position?

Jarrod Bell

unread,
Feb 16, 2012, 10:25:33 AM2/16/12
to comman...@googlegroups.com
You need to set the min and max of the slider group. This scales the value to the 0-65535 range that analog joins use for displaying gauge/slider levels.
So set your min and max to the appropriate levels for the min and max incoming data values you expect to receive, and the values will be scaled to suit.

This scaling takes place AFTER the transform calculation. So your min and max has to take into account the transform final value.

Jarrod

Waldy,,,, Liverpool Uk

unread,
Feb 16, 2012, 11:11:06 AM2/16/12
to CommandFusion
Ok I follow all that has been discussed here and just want to confirm
one part.

I have the capture set the same as ND and a serial join of 25. I drew
a box with the text tool and gave it a serial join of 25. Now should
the captured value show in this box.? Note i am not bothering with a
slider just yet.

Cheers

Jarrod Bell

unread,
Feb 16, 2012, 11:18:44 AM2/16/12
to comman...@googlegroups.com
Yes, if the onmatch is working (testing using the methods discussed
previously) and you have the target type set to serial.

Jarrod

nouveau depart

unread,
Feb 16, 2012, 12:01:19 PM2/16/12
to comman...@googlegroups.com
I have a test with join 887 and it says true
i have another text with join 889 and it shows the actual volume in dB.

I already tried with min 1 and max 90 for the slider but i wil try again...


2012/2/16 Jarrod Bell <jar...@guilink.com>
--
You received this message because you are subscribed to the Google Groups "CommandFusion" group.
To post to this group, send email to comman...@googlegroups.com.
To unsubscribe from this group, send email to commandfusion+unsubscribe@googlegroups.com.

nouveau depart

unread,
Feb 16, 2012, 12:12:02 PM2/16/12
to comman...@googlegroups.com
ok just tried with this:

sumary:


Volume status request command:

\x02\x04\xa0\x92\x00\x01\xc9\x03  

feedback regex:

\x02\x06\xa8\x92\x00\x01([\x00-\xff])

1st group for the display of the value

 capture index  1
 data Type        Analog
 target Type      serial
 Join                 889

 Token Type       value

 Transform         value-256
Min Value,Max Value  All blank
 Hex Data         HexByte

2nd group for the display of a slider


 capture index  1
 data Type        Analog
 target Type      Analog
 Join                 888
 Token Type       value
 Transform         value-256
Min Value,        1
Max Value        92
 Hex Data         HexByte

On match:

target Type      Serial
Join                 887
Assign Token   false
Value,              True
send command  blank
send marco   blank


A text with

serial join 889

A text with

serial join 887


A slider with

analog join 888
simulate feedback ticked
min value 2
max value 92

RESULT:
as i said text with join 887 displays True
text with join 889 displays thact actual volume value in dB
the slider does not do anything even after adding min value 1 and max value 92

QUESTION:
any idea what the problem could be? Jarrod?
the data has to be HexByte for the slider group right?
And the transform "formula" is right?


2012/2/16 nouveau depart <nouveaud...@gmail.com>

Jarrod Bell

unread,
Feb 16, 2012, 12:37:42 PM2/16/12
to comman...@googlegroups.com
What is the dB level that shows in the text field? It must be in the range 1-92, otherwise your transform for the analog join is wrong.
Maybe remove the transform from the analog join capture group.

Jarrod
2012/2/16 nouveau depart <nouveaud...@gmail.com>



2012/2/16 Jarrod Bell <jar...@guilink.com>
To unsubscribe from this group, send email to commandfusio...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/commandfusion?hl=en.

--
You received this message because you are subscribed to the Google Groups "CommandFusion" group.
To post to this group, send email to comman...@googlegroups.com.
To unsubscribe from this group, send email to commandfusio...@googlegroups.com.

nouveau depart

unread,
Feb 16, 2012, 1:04:29 PM2/16/12
to comman...@googlegroups.com
yes it show a value between -1 and -92
below -1 it jups to -256because the lower volume value has to be taken into acount but it does not matter because never go above -1
I think i have to try min value -92 and max value -1


2012/2/16 Jarrod Bell <jar...@guilink.com>

nouveau depart

unread,
Feb 16, 2012, 1:09:04 PM2/16/12
to comman...@googlegroups.com
and we have a winner!!!!!!!
it wroks

Summary:


Volume status request command:

\x02\x04\xa0\x92\x00\x01\xc9\x03  

feedback regex:

\x02\x06\xa8\x92\x00\x01([\x00-\xff])

1st group for the display of the value

 capture index  1
 data Type        Analog
 target Type      serial
 Join                 889

 Token Type       value

 Transform         value-256
Min Value,Max Value  All blank
 Hex Data         HexByte

2nd group for the display of a slider


 capture index  1
 data Type        Analog
 target Type      Analog
 Join                 888
 Token Type       value
 Transform         value-256
Min Value,        -92
Max Value        -1
 Hex Data         HexByte

On match:

target Type      Serial
Join                 887
Assign Token   false
Value,              True
send command  blank
send marco   blank


A text with

serial join 889

A text with

serial join 887


A slider with

analog join 888
simulate feedback ticked
min value -92
max value -1



2012/2/16 nouveau depart <nouveaud...@gmail.com>

Waldy,,,, Liverpool Uk

unread,
Feb 16, 2012, 1:28:37 PM2/16/12
to CommandFusion
Well I'm getting nowhere.

On my moxa, each time I manually turn the volume dial' the RX light
flashes. When I check in Hercules the feedback is there so I know
this side of it is working.

I have set my regex as \x02\x06\xa8\x92\x00\x01(\xec)\xoo\xd3

This should capture the \xec. Right?

This is the volume of -20db

Now the feedback group
Capture. 1
Data. Analogue
Target. Serial
Join. 25
Token. Value


Hex data. Hex byte


On match

Target. Serial
Join. 25
Assign token true
Value. Test

I have a text join on 25. But when I manually turn the volume knob to
-20db. Nothing displays. I can't work out whether it it not being
captured or what

Waldy,,,, Liverpool Uk

unread,
Feb 16, 2012, 3:26:14 PM2/16/12
to CommandFusion
ok so I've been playing with this for hours now

I am not using the slider so we can forget that part of it

It seems that I am not capturing the information. I don't know why. If
I follow the working example from ND and set the transform to
value-256 I get -256 in the text box. If I use an onmatch in a
seperate text box I get nothing when it should match. I know that the
info is being sent as i have seen it in hercules when requesting the
volume data. What could I be missing. Nahshon pointed out that I
should not have an eom in the system and I haven't. I cannot think of
anything else

nouveau depart

unread,
Feb 17, 2012, 2:48:19 AM2/17/12
to comman...@googlegroups.com
Waldy,

I have no idea why it doesn't work for you.
is your system in guidesigner setup correctly? p, port, ...
maybe there is anotherport for recieved commands?

@Jarrod,

I tried to set min and max value in my Serial Target like this

1st group for the display of the value

 capture index  1
 data Type        Analog
 target Type      serial
 Join                 889

 Token Type       value
 Transform         value-256
Min Value         -92

Max Value        -1
 Hex Data         HexByte

So i don't have this jump when the volume is higher than -1 (otherwise i need the lover volume data part.)
but it gives me wierd values :
-1 becomes 65535
-20 becomes 51851
-92 becomes 0

you told me yesterday the min and max were calculated after the tranfsorm?


2012/2/16 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>
ok so I've been playing with this for hours now

Jarrod Bell

unread,
Feb 17, 2012, 2:54:05 AM2/17/12
to comman...@googlegroups.com
Yes, so your transform result must be in the range -92 to -1. Anything outside that range will be changed to 0 or 65535.
All values within -92 to -1 will be scaled in the 0-65535 range. Looks like it acting correctly for me given your test results.

0-65535 is the analog join range for sliders, gauges, etc. Doesnt matter what the target is set to, this calculation is done before assigning the value to the target join.

Jarrod

nouveau depart

unread,
Feb 17, 2012, 3:27:02 AM2/17/12
to comman...@googlegroups.com
ok i understand now.
but is is it possible hten to limit the displayed value between -1 and -92?


2012/2/17 Jarrod Bell <jar...@guilink.com>

Jarrod Bell

unread,
Feb 17, 2012, 3:46:58 AM2/17/12
to comman...@googlegroups.com
use min and max math functions in your transform.

min(-1, max(-92, value))

Jarrod

nouveau depart

unread,
Feb 17, 2012, 4:03:29 AM2/17/12
to comman...@googlegroups.com
i just tried this: min(-1, max(-92, (value-256)))

but if i got above -1dB it jumps to -92dB ans stays at -92 dB no matter if i'm on +1 or +10 dB
under the -92 it's ok it's stays a -92dB

so this is what the display says:
range -92 to -1 then fixed on -92

2012/2/17 Jarrod Bell <jar...@guilink.com>

Waldy,,,, Liverpool Uk

unread,
Feb 17, 2012, 4:41:55 AM2/17/12
to CommandFusion
here are my system properties. Are they correct?

TCP
192.168.1.100
port 4001 port origin 4001
maintain constant connection ticked
heartbeat reply mode

Nothing else is set..Should there be?

nouveau depart

unread,
Feb 17, 2012, 5:04:06 AM2/17/12
to comman...@googlegroups.com
it depends what hour moxa need,
on my Gc i have no heartbeat
are your sur about your port?
it is the same that you use in hercules where y ou get feedback?

2012/2/17 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>

Waldy,,,, Liverpool Uk

unread,
Feb 17, 2012, 5:09:39 AM2/17/12
to CommandFusion
yes I am using that port on hercules to show the feedback.

Silly question the feedback properties are in this system? or should
they be in the loopback

nouveau depart

unread,
Feb 17, 2012, 5:20:20 AM2/17/12
to comman...@googlegroups.com
i must say i asked myself the same question, but i put them in the same system and it works.
Jarrod any comment about this?

and this?:

i just tried this: min(-1, max(-92, (value-256)))

but if i got above -1dB it jumps to -92dB ans stays at -92 dB no matter if i'm on +1 or +10 dB
under the -92 it's ok it's stays a -92dB

so this is what the display says:
range -92 to -1 then fixed on -92

thanks

2012/2/17 Waldy,,,, Liverpool Uk <i...@phoneworkshop.co.uk>
yes I am using that port on hercules to show the feedback.


Silly question the feedback properties are in this system? or should
they be in the loopback
Reply all
Reply to author
Forward
0 new messages