Help a MLGD Newbie get started.

A plugin that allows for end user development of multiple RS232 device control systems.
T.Wells
Intermediate
Intermediate
Posts: 379
Joined: Sat Sep 30, 2006 8:19 pm
Location: Philadelphia Suburbs
Contact:

Help a MLGD Newbie get started.

Postby T.Wells » Thu Jan 08, 2009 12:56 pm

Hello,

I picked up two MLDG plug-ins to try with my projector and Onkyo AVR. Would someone mind helping out a new guy (to ASCII and RS-232) get started? It looks like someone may have a working MLGD file available for export so I hope that I get some help on the Onkyo there.

Therefore, my first baby step on my own is to get my projector (Panasonic AX100) to turn on and off via RS-232. I hope to use the MLGD basic plug-in for this control.

I've taken a look at the Wiki and also here on the forum and I wanted to ask for help for my first try. Here is a copy of the user manual states:

STX Command : Parameter ETX

Start byte (02h) Command (3 bytes) : (1 byte) Parameter (1-4 bytes) End
(03h)

The data streaming from the computer will start with STX, and proceed to Command, Parameter and end with ETX. You can add the required parameter.

Power On Command: PON
Power Off Command: POF

Power Inquiry command: QPW (000=off and 001=on)

Thank you,
T.Wells

T.Wells
Intermediate
Intermediate
Posts: 379
Joined: Sat Sep 30, 2006 8:19 pm
Location: Philadelphia Suburbs
Contact:

Postby T.Wells » Sat Jan 10, 2009 9:27 am

Wow, over 30 views and no-one can offer assistance with my first attempt? Did I not provide enough information? If so, what should I be looking at?

Thanks,
T.Wells

User avatar
Fonceur
Expert
Expert
Posts: 583
Joined: Sun Sep 09, 2007 10:18 am
Contact:

Postby Fonceur » Sat Jan 10, 2009 10:08 am

You could try a command like: "<<\2>>PON<<\3>>" or maybe "\002PON\003"...
Last edited by Fonceur on Sat Jan 10, 2009 12:06 pm, edited 1 time in total.
MLComDevice: Control serial/TCP device (ASCII/hex) - MLSchedule: Alternative to MLScheduler
MLBeyondTV and MLSageTV: PVR support - TChanger: Sony BDP-CX7000ES 400 disc Bluray changer
TRadio: Sirius/HD/XM radio - TChart: Chart from variable Wiki

User avatar
DaveB
Simply Incredible
Simply Incredible
Posts: 3143
Joined: Sun May 30, 2004 10:57 pm
Location: Mays Landing, NJ
Contact:

Postby DaveB » Sat Jan 10, 2009 10:41 am

So what is the actual command being sent for power on?

Is it STX PON ETX?

With my device for example, Zone Power command is

Z<<VAR1>><<VAR2>>

Where VAR1 is the zone (1-8) and VAR2 is the command (0,1)

My Command Name is Zone_PWR, so from a command button on screen or from cycle states, I simply send the following command for zone 1 on;

MLServeCmd.Macro|MLServeCmd.MLGenericDevice|MRC8~Zone_pwr~1~1!SetVariable|MRC8_Zone1Pwr~1

(and I set a variable as part of the command)

If your documentation is weak, you just need to start experimenting with combination's of commands. You must use the correct command terminator as well. Mine is "13". What are the valid parameters for each command?? IS Null a parameter? Is parameter optional? You must get answers to all of these questions first.

I would try the following;

STX<<VAR1>><<VAR2>>ETX

VAR1 = PON
VAR2= ??????

For testing, use hard values rather than variables. So that would look like;

STXPON???ETX

Once more, you need to figure out if the parameter is optional or required and if required, what the values should be.

Once you get this working, then you need to work on the response and what to do with the response.

Hope I did not confuse you more.
Thanks!

Dave Bruner
:shock:

ricks
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1127
Joined: Wed Oct 27, 2004 7:01 pm
Location: Latham, Massachusetts
Contact:

Postby ricks » Sat Jan 10, 2009 2:40 pm

Looking at the tech specs here http://www.aboutprojectors.com/pdf/pana ... manual.pdf

I'm assuming you have the correct comm settings:
"You must use only an RS-232C Serial Interface Cable with a ferrite core, type ET-ADSER.
Signal level RS-232C Character length 8 bits
Sync. method Asynchronous Stop bit 1 bit
Baud rate 9 600 bps X parameter None
Parity None S parameter None


Since the terminating character appears to be ETX or 3, I would try 3 in the command terminater box.

Then go to the commands tab and select the device from the drop down list. If its not there then close MLGD and re-open. Add a new command. The goal here is to get a response from the projector, whether good or bad. If you get ER401 then at least you know you're communicating with it and its telling you your command syntax is bad.

I would start with a command something like STXPONETX, hit "Test" and see what the response is. Also check the Events tab for responses. If STXPONETX doesn't give you any response then try variations of ascii characters for STX and ETX (see link on device setup page). You may also want to use hyperterminal to verify that your pc is communicating with the projector (need to shutdown MLGD first before connecting to hyperterminal).

The tech specs don't seem to tell you what you will receive from the projector when the command is good but usually its "OK" or some variation.

If the projector turns on you will then know the syntax is correct. Since the projector doesn't give a status of its condition automaticaly you will need to do a command to query it. It looks like the power status query would be STXQPWETX. When you send this command you will see in the box the projector's response. Looks like it should be 000 for Off and 001 for On. That response is what you will need to set up a Device Response action. In device response, plug the projector's response in to the Device Response line. From there it will update the variable you have named in the MLS Variable line above it.

If the response is 000 for off then I would use the script option in the device response tab to change it to OFF. See examples in MLGD for the very simple script. If the response is 000 then change the device response to 00<<VAR>> and add this script to the script box:

Function ReturnValue()
Select Case <<VAR>>
Case 0
ReturnValue = "Off"
Case 1
ReturnValue = "On"
End Select
End Function

Remember that you need to wait 10 seconds from the power on command to send any other commands to the projector, including the query command.

Hope this helps.

Rick

T.Wells
Intermediate
Intermediate
Posts: 379
Joined: Sat Sep 30, 2006 8:19 pm
Location: Philadelphia Suburbs
Contact:

Thanks!

Postby T.Wells » Sun Jan 11, 2009 12:35 pm

Thank you all for the ideas on how to get started. I am looking forward to giving this an attempt in the next few days.

Rick,
I do have the proper cable and adapter (ET-ADSER). It ran me an extra $45 bucks but if I can get serial control of the projector. It will be well worth the extra expense.

Thanks again,
Tom

ricks
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1127
Joined: Wed Oct 27, 2004 7:01 pm
Location: Latham, Massachusetts
Contact:

Postby ricks » Sun Jan 11, 2009 2:18 pm

$45!! Ouch! I bet the only place to get that specific cable is through the projector manufacturer. 8) I also bet that any quality RS232 serial cable would work just as well.

Oh well. Today AV cabling is like bottled water of the 80's and vodka of the 90's.

Good luck with MLGD. Works very well once you get the communications working.

Rick

T.Wells
Intermediate
Intermediate
Posts: 379
Joined: Sat Sep 30, 2006 8:19 pm
Location: Philadelphia Suburbs
Contact:

Error?

Postby T.Wells » Thu Jan 15, 2009 11:37 pm

Hello,

I am getting this error:

Replacing Control Character
Error 13(Type mismatch) @ Line 100 in procedure cmdTest_Click of frmInputEditor
New Command String - <<\2>>PON<<\3>>
Error 8005(Port already open) @ Line 270 in procedure cmdTest_Click of frmInputEditor
Error 8018(Operation valid only when the port is open) @ Line 310 in procedure cmdTest_Click of frmInputEditor
testing comand - <<\2>>PON<<\3>>

whenever I send any commands through MLDG to the device. In addition to the command above, I have tried several combinations of 02, 002, 03, and 003. Also, I tried using STX and ETX to no avail.

I have confirmed that the device will accept and power on to a RS232 command of STXPOnETX and also several other commands as well. Now, to get MLGD to work is the next step.

Thanks,
T.Wells

ricks
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1127
Joined: Wed Oct 27, 2004 7:01 pm
Location: Latham, Massachusetts
Contact:

Postby ricks » Fri Jan 16, 2009 11:02 am

It sounds like another app already has taken control of the serial port. Often times if you connect an app to a serial port and then close the app, the port remains locked to that app. Enable MLGD and then reboot making sure no other app that may use that comm port will run at startup.

Rick

User avatar
Fonceur
Expert
Expert
Posts: 583
Joined: Sun Sep 09, 2007 10:18 am
Contact:

Postby Fonceur » Fri Jan 16, 2009 11:14 am

ricks wrote:It sounds like another app already has taken control of the serial port.

Makes sense, I think he used MLComDevice to confirm that control over serial port worked, but my method to free up the port after use {a simple port.Close()}, doesn't seem to work properly... ;)
MLComDevice: Control serial/TCP device (ASCII/hex) - MLSchedule: Alternative to MLScheduler
MLBeyondTV and MLSageTV: PVR support - TChanger: Sony BDP-CX7000ES 400 disc Bluray changer
TRadio: Sirius/HD/XM radio - TChart: Chart from variable Wiki

User avatar
DaveB
Simply Incredible
Simply Incredible
Posts: 3143
Joined: Sun May 30, 2004 10:57 pm
Location: Mays Landing, NJ
Contact:

Postby DaveB » Fri Jan 16, 2009 11:43 am

I had this same issue in that one of the plug-ins that I did not use was set to the same COM port ID that I was attempting to use for my distribution amp. Every time I started MLS, that plug-in would grab the port prior to MLGD. I took me a day or two to figure out what was happening. I removed the plug-in and all came to life.
Thanks!

Dave Bruner
:shock:

T.Wells
Intermediate
Intermediate
Posts: 379
Joined: Sat Sep 30, 2006 8:19 pm
Location: Philadelphia Suburbs
Contact:

Postby T.Wells » Sat Jan 17, 2009 10:20 pm

Fonceur wrote:Makes sense, I think he used MLComDevice to confirm that control over serial port worked,


Yes, I have/had MLCom running and actively controlling the device/port.

I'll have to give it a shot without that running.

Thanks,
T.Wells


Return to “MLGenericDevice”

Who is online

Users browsing this forum: No registered users and 1 guest