Generic Serial Outp...
 
Notifications
Clear all

Generic Serial Output byte count .

10 Posts
3 Users
0 Reactions
3,724 Views
Posts: 7
Topic starter
(@molten-fungus)
Active Member
Joined: 15 years ago
[#24103]

Being a computer guy, this is actually my first post to a "help" section, so please be gentle...

I've got a simple problem/setup

- I've got Vixen with 12 channels, hooked up to an Arduino Uno (my test guy)
- The only plugins are the "Generic Serial" and "Event Data Logger".
- The generic serial I have for channels "1-12".. I'm sending a text header ""
- Baud rate and all that is set the same..

EVERYTHING works as expected when there's only 12 channels.

So.. I then add 3 channels to the vixen sequence...
now back to the Uno..
When I encounter the "<" , I start counting bytes
When I encounter the ">", I flash the number of bytes on the uno that I encountered..

Now, with the "Generic Serial" set to channels "1-12", you'd expect only 12 bytes (the Data loggers shows only 12), but it seems like all channels are going to the serial.. (1-15), not the ones specified in the plugin setup.

My goal is to have 2 Arduinos.. one on COM 'x' and the other on COM 'y' and send channels 1-12 to the first arduino and the 13-64 to the other..
I'm using the "" for a particular reason (controlling IR equipment.. so I need to control the flow of bytes.. but that's another subject)

Any help is very much appreciated !!!

Thanks ahead of time.


9 Replies
Festus
Posts: 508
(@festus)
Honorable Member
Joined: 15 years ago

I can't help you with your questions, but your screen name is awesome X10!


Reply
teberle
Posts: 641
(@teberle)
Honorable Member
Joined: 19 years ago

The Generic Serial controller does not take into account the start and end channel. If you configure 15 channels on comport 1 then all of the 15 channels will be output on the controller when it writes to the serial port.

If you want 12 channels to go to com port 1, then you configure 2 seperate controllers on the different ports. In your case you would have channels 1-12 on com port 1 and channels 13-64 on com port 2.

If I understand your question correctly.


Reply
Posts: 7
Topic starter
(@molten-fungus)
Active Member
Joined: 15 years ago

Intuitively, you'd expect that to be the case..

So.. in Vixen, define a 15 channel sequence.
Click, Attached Plugins, select "Generic Serial"...
Two text boxes are displayed under "Channels" [ ] to [ ]
Enter 1 to 12.

When running, 15 channels are sent over the com port.. not 12

Mr. Google isn't helping with this either...

teberle wrote:The Generic Serial controller does not take into account the start and end channel. If you configure 15 channels on comport 1 then all of the 15 channels will be output on the controller when it writes to the serial port.

If you want 12 channels to go to com port 1, then you configure 2 seperate controllers on the different ports. In your case you would have channels 1-12 on com port 1 and channels 13-64 on com port 2.

If I understand your question correctly.


Reply
teberle
Posts: 641
(@teberle)
Honorable Member
Joined: 19 years ago

I'm one of the vixen developers so I will take a look at this controller and see what is going on with it. Can you duplicate this problem in vixen 2.x?


Reply
Posts: 7
Topic starter
(@molten-fungus)
Active Member
Joined: 15 years ago
teberle wrote:I'm one of the vixen developers so I will take a look at this controller and see what is going on with it. Can you duplicate this problem in vixen 2.x?

First, thanks for the help. The work you guys do is pretty amazing..

This is Vixen 2.1.4.0 ... I even downloaded the latest generic dll and still not good..
(and I'm striking out with Google.. which is hard to believe since this looks pretty straightforward and I don't want to waste anyone's time)

I'll post the Arduino code tonight.. (again, pretty straighforward.. just need to strip out all the IR codes since I'm using an Uno to control LEDs and a Mega to control regular light strings..and doing all this through IR)
I've also double checked that I wasn't blowing out string buffers on the uno..

In pseudo code..
If "<" start countingFlag
If ">" , then for (i=0 to number of counts), flash LED

It flashes the total number of channels from Vixen, no matter what range I specify in the generic serial..I do have a workaround (which kind of sucks.. by throwing everything onto the mega), but I'd rather have functionality split up (long story)


Reply
Posts: 7
Topic starter
(@molten-fungus)
Active Member
Joined: 15 years ago

OK.. I confirmed there's an issue coming in from Vixen (took the Arduino out of the equation)

I'm using a USB port monitoring tool (COM3).

Setup
------
- Create a 3 channel sequence
- Sequence Length is 00:00.100
- 50 millisecond intervals
- You end up with 3 x 2 matrix (actually 3x3 is sent due to trailing 0's)
- Set channel 2, at interval .05 box to on

Set the Plugin
============
- Click Attached Plugins
- Generic Serial (Channels 1 to 2 )
- Plugin setup
- Baud 9600, COM3,
- Checkbox "Send Text header" - Character is "<"
- Checkbox "Send Text footer" - Character is ">"

---------------------------------------------------------------------------
Now, you'd expect only channels 1 and 2 coming across the com port.. BUT...
---------------------------------------------------------------------------
[22/01/2013 20:29:16] - Open COM3 port (C:\Program Files\Vixen 2.1.1.0\Vixen.exe)
[22/01/2013 20:29:16] - Written data

3c 00 00 00 3e 3c 00 ff 00 3e 3c 00 00 00 3e

[22/01/2013 20:29:17] - Close port

NOTE: 3C is ""

and there you go... I wasn't crazy..


Reply
teberle
Posts: 641
(@teberle)
Honorable Member
Joined: 19 years ago

I have made a change in the code to use the 'to' value from the setup config so it will only write the number of channels that are configured in the output. Not the total number of channels in the sequence. If you pm me your email address I will send you a dll for testing.


Reply
Posts: 7
Topic starter
(@molten-fungus)
Active Member
Joined: 15 years ago

Perfect..

I also tested ranges 2-13 (with a 15 channel sequence)
and ranges 1-12 (same sequence)

The video just shows how quick you can do IR..so that board will now be configured to run IR..
Thanks again..

teberle wrote:I have made a change in the code to use the 'to' value from the setup config so it will only write the number of channels that are configured in the output. Not the total number of channels in the sequence. If you pm me your email address I will send you a dll for testing.

Reply
teberle
Posts: 641
(@teberle)
Honorable Member
Joined: 19 years ago
Molten Fungus wrote:Perfect..

I also tested ranges 2-13 (with a 15 channel sequence)
and ranges 1-12 (same sequence)

The video just shows how quick you can do IR..so that board will now be configured to run IR..
Thanks again..

Glad I could help.


Reply
Share: