Problems with RS232 control (mod/fix in 10.3.0)

General topics regarding SCS
Post Reply
djvomght
Posts: 101
Joined: Fri Aug 15, 2008 11:22 pm
Location: Zittau, Germany
Contact:

Problems with RS232 control (mod/fix in 10.3.0)

Post by djvomght » Thu Oct 30, 2008 12:18 am

Hi ,

I have the following SCS file:
---------------------------------------------------------------------------------------------------------------
<?xml version="1.0"?>
<Production>
<Head>
<Title>test rs232</Title>
<Version>10.2.0</Version>
<ProdId>7325AFC</ProdId>
<OtherComps>1</OtherComps>
<PRLogicalDev0>FOH</PRLogicalDev0>
<PreviewDevice>FOH</PreviewDevice>
<DfltLogicalDev0>FOH</DfltLogicalDev0>
<DfltDBTrim0>0dB</DfltDBTrim0>
<DfltDBLevel0>-3</DfltDBLevel0>
<DfltPan0>500</DfltPan0>
<PRCtrlSendDevDesc0>Com 1</PRCtrlSendDevDesc0>
</Head>
<Cue>
<CueId>Q1</CueId>
<Description>test</Description>
<Sub>
<SubType>M</SubType>
<SubDescription>test</SubDescription>
<DefSubDes>True</DefSubDes>
<ControlMessage>
<MSMsgType>RS232</MSMsgType>
<RS232Dev>RS232</RS232Dev>
<RS232EntryMode>Hex</RS232EntryMode>
<RS232AddCR>False</RS232AddCR>
<RS232Data>02 56 43 50 3A 41 33 03</RS232Data>
</ControlMessage>
</Sub>
</Cue>
<Cue>
<CueId>Q2</CueId>
<Description>test</Description>
<ActivationMethod>auto</ActivationMethod>
<AutoActivateCue>Q1</AutoActivateCue>
<AutoActivatePosn>end</AutoActivatePosn>
<AutoActivateTime>20</AutoActivateTime>
<Sub>
<SubType>M</SubType>
<SubDescription>test</SubDescription>
<DefSubDes>True</DefSubDes>
<ControlMessage>
<MSMsgType>RS232</MSMsgType>
<RS232Dev>RS232</RS232Dev>
<RS232EntryMode>Hex</RS232EntryMode>
<RS232AddCR>False</RS232AddCR>
<RS232Data>02 56 43 50 3A 42 34 03</RS232Data>
</ControlMessage>
</Sub>
</Cue>
<Files>
</Files>
</Production>
----------------------------------------------------------------------------------------------------------------
These messages are to cause an WJ-MX50 video mixer to switch it's input 3 to bus A resp. input 4 to bus B, btw.
Since I can't enter the ASCII codes 02H (STX, start of transmission) and 03H (ETX, end of transmission) in ASCII mode, I have to enter the complete message in HEX. Note, that the entry mode is saved correctly in the file.
When hitting the "Test Control Send (selected message only)" button everything works fine. Leaving the editor and sending the control messages from cue list fails. Opening the editor again I found, that entry mode has switched back to ASCII and this causes a wrong message displayed below (and obviously this wrong stuff is sent :-(
Is there a possible workaround?
BTW, would You like to add WJ-MX50 control? I could send You the the PDF with all commands :-)

Regards Jörg
Image

Mike Daniell
Site Admin
Posts: 3630
Joined: Sun Jul 24, 2005 8:58 am
Location: Brisbane, Queensland, Australia. TZ:GMT+10
Contact:

Re: Problems with RS232 control

Post by Mike Daniell » Thu Oct 30, 2008 1:14 pm

djvomght wrote:Since I can't enter the ASCII codes 02H (STX, start of transmission) and 03H (ETX, end of transmission) in ASCII mode, I have to enter the complete message in HEX. Note, that the entry mode is saved correctly in the file.
When hitting the "Test Control Send (selected message only)" button everything works fine. Leaving the editor and sending the control messages from cue list fails. Opening the editor again I found, that entry mode has switched back to ASCII and this causes a wrong message displayed below (and obviously this wrong stuff is sent :-(
Is there a possible workaround?
BTW, would You like to add WJ-MX50 control? I could send You the the PDF with all commands :-)
Jörg,

I've emailed you details of a fix for this error of resetting the Entry Mode back to ASCII. And, yes, please email me the PDF for the WJ-MX50. What I am considering is adding a third Entry Mode: ASCII + <Controls>. This would allow you to enter the message in ASCII, but special sequences like <STX> would be translated to corresponding Hex control characters, eg <STX> would be translated to 02H.
Mike Daniell
Show Cue Systems Pty Ltd
mike@showcuesystems.com
Image

djvomght
Posts: 101
Joined: Fri Aug 15, 2008 11:22 pm
Location: Zittau, Germany
Contact:

Re: Problems with RS232 control

Post by djvomght » Thu Oct 30, 2008 6:02 pm

Hi Mike,

got it and will test in a few minutes.

Regards Jörg
Image

djvomght
Posts: 101
Joined: Fri Aug 15, 2008 11:22 pm
Location: Zittau, Germany
Contact:

Re: Problems with RS232 control

Post by djvomght » Thu Oct 30, 2008 11:59 pm

Hi Mike and all,

back from our local theatre with the good news: Your fix works very nice :-)
There is only one strange thing: Putting a bunch of messages into the list within a single cue, only the last one is executed. Spreading the messages to separate subcues, everything is fine. I checked the output of SCS with an null modem cable and a second computer at the other end running Hyperterminal from WinXP, which shows, that all is correct, so I assume it's a timing problem of the MX50, not a problem in SCS. Perhaps You could add a delay between RS232 messages to meet the requierements of slower devices.

Implementing the additional entry mode "ASCII + <Controls>" would be a nice thing for controlling machines like the MX50.

An other idea is following: As I understand, all the special codes for MIDI are hard coded in scs.exe and are accessible via the drop down menues. What about putting special commands for special devices connected via serial cable into an external file, which can be edited by the user to add a new command set (but this belongs to "Feature Requests", I guess :D ).

Thanks for the good work with this matter.
Regards Jörg
Image

Mike Daniell
Site Admin
Posts: 3630
Joined: Sun Jul 24, 2005 8:58 am
Location: Brisbane, Queensland, Australia. TZ:GMT+10
Contact:

Re: Problems with RS232 control

Post by Mike Daniell » Fri Oct 31, 2008 6:03 pm

Thanks for the manual. The structure of the WJ-MX50 messages is unlike that for other equipment I've looked at. RS232 messages are generally humanly-readable, but several MX50 commands seem to require data values to be sent in Hex. The "ASCII+<Controls>" would, at least, help with the STX/ETX requirement.

I couldn't find anything in the document about minimum time between messages, but I will look into providing a configurable delay. It could also be relevant for MIDI sends.

The only MIDI codes that are hard-coded in SCS are those that are part of the standard MIDI protocol, such as for 'Note On', 'Control Change', etc. Because these message types have formats defined in the MIDI standard, it is feasible to provide drop-down lists, etc for parameters. AFAIK there's no equivalent protocol for RS232 messages. I expect the message structures used by the MX50 are unique to the manufacturer of that device.
Mike Daniell
Show Cue Systems Pty Ltd
mike@showcuesystems.com
Image

djvomght
Posts: 101
Joined: Fri Aug 15, 2008 11:22 pm
Location: Zittau, Germany
Contact:

Re: Problems with RS232 control

Post by djvomght » Fri Oct 31, 2008 7:54 pm

Hi Mike and all,
Mike Daniell wrote:Thanks for the manual. The structure of the WJ-MX50 messages is unlike that for other equipment I've looked at. RS232 messages are generally humanly-readable, but several MX50 commands seem to require data values to be sent in Hex. The "ASCII+<Controls>" would, at least, help with the STX/ETX requirement.
this is absolutely right. But I think, that the developers of the WJ-MX50 never thought of programming this machine by hand :) . Anyway, controlling the video mixer via SCS is a good workaround for the lack of fading capabilities of the mediaplayer routines, and the necessary commands for this can be entered in ASCII. I don't want to control complete video editing with SCS. Many thanks for getting this to work, it will be usefull for our next theatrical production.
I couldn't find anything in the document about minimum time between messages, but I will look into providing a configurable delay. It could also be relevant for MIDI sends.
As I understand from the a little cryptic manual, the MX-50 can't process more than one message between two vertical refreshs, which it indicates by sending an "#" character (ASCII 23H) via RS232.

Regards Jörg
Image

AndyT
Posts: 26
Joined: Wed May 10, 2006 8:04 am
Location: Manningtree, Essex, UK
Contact:

Re: Problems with RS232 control

Post by AndyT » Thu Nov 06, 2008 9:09 am

Hi Mike

I'm getting the same problems as DJ with the RS232 control always reverting back to ASCII.

I am using SCS to control a relay board http://www.phaedrusltd.com/Download/som1ins.pdf which works fine when I step through the cues in the editor and use the "test control send" button, but I get no response from manually stepping in main window!

Section of the SCS file I'm using is below:
<Cue>
<CueId>Q13</CueId>
<Description>ALL Relays OFF</Description>
<DefDes>True</DefDes>
<Sub>
<SubType>M</SubType>
<SubDescription>ALL Relays OFF</SubDescription>
<ControlMessage>
<MSMsgType>RS232</MSMsgType>
<RS232Dev>RS232 Relays</RS232Dev>
<RS232EntryMode>Hex</RS232EntryMode>
<RS232Data>0000</RS232Data>
</ControlMessage>
</Sub>
</Cue>
<Cue>
<CueId>Q14</CueId>
<Description>Relay 1 on</Description>
<DefDes>True</DefDes>
<Sub>
<SubType>M</SubType>
<SubDescription>Relay 1 on</SubDescription>
<ControlMessage>
<MSMsgType>RS232</MSMsgType>
<RS232Dev>RS232 Relays</RS232Dev>
<RS232EntryMode>Hex</RS232EntryMode>
<RS232Data>0080</RS232Data>
</ControlMessage>
</Sub>
</Cue>

PS I have even tried manually editing the SCS file to change the entry mode to Hex, open the file in SCS and immediately run the cue file without launching the editor, the relay board recognizes that a control message has been sent, but not in the same format as from the editor window.

Hope you can help
Andy Terry
Manifest Theatre - Manningtree - UK

Mike Daniell
Site Admin
Posts: 3630
Joined: Sun Jul 24, 2005 8:58 am
Location: Brisbane, Queensland, Australia. TZ:GMT+10
Contact:

Re: Problems with RS232 control

Post by Mike Daniell » Thu Nov 06, 2008 9:36 am

Andy,

I've just emailed you the details of the fix for the Entry Mode being reset to ASCII. I'll try to get this fix on general release soon.
Mike Daniell
Show Cue Systems Pty Ltd
mike@showcuesystems.com
Image

AndyT
Posts: 26
Joined: Wed May 10, 2006 8:04 am
Location: Manningtree, Essex, UK
Contact:

Re: Problems with RS232 control

Post by AndyT » Sat Nov 08, 2008 6:47 am

HI Mike

Many thanks for that, it cured my problem and the relay board I have is now working fine under SCS control.

Great response as usual
Andy Terry
Manifest Theatre - Manningtree - UK

Post Reply