Error 9(Subscript out of range) @ Line 300

A plugin that allows for end user development of multiple RS232 device control systems.
Dkip
New Member
New Member
Posts: 27
Joined: Sun Feb 26, 2006 1:25 pm
Contact:

Error 9(Subscript out of range) @ Line 300

Postby Dkip » Sun Mar 20, 2016 6:04 pm

Hello all,
I have bee trying to setup some devices using the MLGenericDevice I have had good luck with controlling the devices but I have had no luck with populating variables.
Even though the commands seem to work I receive the following error message in the log I think this is why the variables do not populate
I have only been able to find this error in one other post and it did not seem to get resolved

any help would be welcome

Also where should I setup the export file I have now deleted 2 substantial devices and would like to be able to back up in the future :)

testing comand - ?11VO

Processing Return String -
#?11VO
Error 9(Subscript out of range) @ Line 300 in procedure ProcessCommands of modSharedCode
Processing Return String -
#>11VO12
Error 9(Subscript out of range) @ Line 300 in procedure ProcessCommands of modSharedCode

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10549
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Error 9(Subscript out of range) @ Line 300

Postby CinemarDave » Tue Mar 22, 2016 7:43 pm

We do not have source code for MLGenericDevice so I cannot tell what/where the issue is. What type of serial device are you trying to control?

Dkip
New Member
New Member
Posts: 27
Joined: Sun Feb 26, 2006 1:25 pm
Contact:

Re: Error 9(Subscript out of range) @ Line 300

Postby Dkip » Tue Mar 22, 2016 8:57 pm

I control a factor V66 controller amplifier the protocol is dead simple and a Chinese knock off 8x8 hdmi matrix
Both code sets are pretty simple I rely on both of them pretty heavely
Is there an alternative to the MLgenericDevice I would be willing to purchase it. I know serial is phasing out to ip but usually if there is a com port there is a code set available, that's not always the case with a network jack

Dkip
New Member
New Member
Posts: 27
Joined: Sun Feb 26, 2006 1:25 pm
Contact:

Re: Error 9(Subscript out of range) @ Line 300

Postby Dkip » Thu Mar 24, 2016 10:21 pm

Is there plans for a Generic serial device to be added to the control family? If not, is there a way I can send a direct serial command and get a reply to set a variable outside of the MLGenericDevice

Dkip
New Member
New Member
Posts: 27
Joined: Sun Feb 26, 2006 1:25 pm
Contact:

Re: Error 9(Subscript out of range) @ Line 300

Postby Dkip » Thu Mar 24, 2016 11:58 pm

Update

I have got rid of the error but still cannot populate the variables I am certain it is something I am doing

To get rid of the error I was a line space in the default script I have posted a pic
maybe someone can show me where i am going wrong in formatting the variable. I did add a setvariable command in the Run Command box but that was desperation
Untitled.png
You do not have the required permissions to view the files attached to this post.

Dkip
New Member
New Member
Posts: 27
Joined: Sun Feb 26, 2006 1:25 pm
Contact:

Re: Error 9(Subscript out of range) @ Line 300

Postby Dkip » Fri Mar 25, 2016 12:08 am

Here is a log
Opening Com Port 6
Processing - V66~Z2PWR~01 from
CMD: V66~Z2PWR~01 FROM:
Sending command for V66 - <12PR01
via COM: 6
Processing Return String - <12PR01
Command string (<12PR01) was not processed
Processing - V66~Z1BASS~02 from w1921680206
CMD: V66~Z1BASS~02 FROM: w1921680206
Sending command for V66 - <11BS02
via COM: 6
Processing Return String -
#<11BS02
Command string (
#<11BS02) was not processed
testing comand - <11BS04

Processing Return String -
#<11BS04
Command string (
#<11BS04) was not processed
testing comand - <11BS03

Processing Return String -
#<11BS03
Command string (
#<11BS03) was not processed
testing comand - <11BS00

Processing Return String -
#<11BS00
Command string (
#<11BS00) was not processed

Dkip
New Member
New Member
Posts: 27
Joined: Sun Feb 26, 2006 1:25 pm
Contact:

Re: Error 9(Subscript out of range) @ Line 300

Postby Dkip » Fri Mar 25, 2016 8:58 pm

SOLVED!!!

I post this for anyone like me who has just enough skill to screw thing up
After countless hours of trying different thing and questioning my existence all together I am now able to set Variables using MLDG
If you have MLGD version 3.99.7 there are errors in the template for the Device Response. As I mentioned above in the script window there is an extra line space this has to be removed. This will get rid of the "Error 9(Subscript out of range) @ line 300" Error
But also in the Device Response Window there is a line space below that has to be removed. You have to go to the Device Response window and Arrow down then delete. This removes the blank field. Its best to do this after you have entered in something so you can see the action.
Once these two simple thing are done (by simple I mean 3+ days to figure out) everything should work fine

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10549
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Error 9(Subscript out of range) @ Line 300

Postby CinemarDave » Sun Mar 27, 2016 11:52 am

I'm happy you figured it out. Without source code to figure out what it was doing it was impossible for me to know what is going on.

Longer term I'll write a simple GenericDevice driver but we always would rather write a dedicated device driver as it will always be easier for the end user.


Return to “MLGenericDevice”

Who is online

Users browsing this forum: No registered users and 1 guest