Jump to content

PC Based DMX Control development


wodp

Recommended Posts

  • Replies 56
  • Created
  • Last Reply

Hi

 

To control a DMX stream from a pc is so easy with vb.net apart from the fact the idiots at microsoft cut out any sort of rs232 output and drivers, which can be used to communicate with a rs232 to DMX protocol converter. The way to get round this is to install the backdated axtivex control pack from microsoft which you can get for free form their site. (I can't find the address at the moment). You then just add some simple control code to your control interface to work with the mscomm drivers or do it through the system api and then your sliders/buttons or any other control interface if properly coded should work and as long as the give a 0-255 output to you protocol converter and the channel number you can control a DMX stream.

 

Note: You need a vb.net version and protocol converter to do this.

 

I have a sort of working program apart from the ch$ script event is giving me some grief.

Link to comment
Share on other sites

I would be interested to see that Scene Master sounds interesting. I have yet to progress my apps to VB.Net although I am considering it as we have been given it by the Uni which is nice!

 

PM me or something and I will send you my email address if you wouldn't mind sharing it. I am intrigued by others work because it is such a bast area.

 

As anyone actually made a program and used it prperly in show situations?

Link to comment
Share on other sites

Next time the theatre company does a cabaret I'm gonna take my basic application with me on a laptop with my DMX interface - the place we use is a small cosy affair that only has 4 colour blasters, 2 pairs of VRX scanners + 2 pairs of VRX gladiators (which they've paired channel wise and inverted pans on due to it only being the Abstract VRX controller, but I've spoken to their guy and he says if I ask before the show he'll change their settings so they can all have independent control and I can just pump my DMX feed through them. For now though exams are more important ** laughs out loud **.

 

Anyone who's explored this already, can anyone break down the logistics of crossfading a scene namely where pan/tilt values are to be moved. eg if I have one preset which sets scanners to pan,tilt of 0,127 and another which sets it to 180,127 (i.e. when fading will scan from left to right) how do I adjust a VB timer and the values to change (my app will store whether its a xfade or snap fade as booleans as I figured that makes it easier to deal with).

 

Dave

Link to comment
Share on other sites

I've uploaded the incomplete code for my mainly live application described at the beginning of this thread to this address - it contains VB6 project files. All I ask if you make something based on it or expand it is that I get a copy incl source. Only thing that might not be obvious is to setup the channels for each of the 12 channels you have to click the v button at the top of each strip and choose what sort of unit it is (the lib file contains offsets and lamp on/off settings) then what channel it starts at. This exlcudes any kind of fade times between presets (code tells you how many you can have). You'll need to tick the box next to each row of parameters to make sure they're stored in the preset. I'd do a screengrab but hdd is stuffed and I'm waiting till I can afford a new one before I do a proper reinstall.

 

Dave

Link to comment
Share on other sites

Next time the theatre company does a cabaret I'm gonna take my basic application with me on a laptop with my DMX interface - the place we use is a small cosy affair that only has 4 colour blasters, 2 pairs of VRX scanners + 2 pairs of VRX gladiators (which they've paired channel wise and inverted pans on due to it only being the Abstract VRX controller, but I've spoken to their guy and he says if I ask before the show he'll change their settings so they can all have independent control and I can just pump my DMX feed through them. For now though exams are more important ** laughs out loud **.

 

Anyone who's explored this already, can anyone break down the logistics of crossfading a scene namely where pan/tilt values are to be moved. eg if I have one preset which sets scanners to pan,tilt of 0,127 and another which sets it to 180,127 (i.e. when fading will scan from left to right) how do I adjust a VB timer and the values to change (my app will store whether its a xfade or snap fade as booleans as I figured that makes it easier to deal with).

 

Dave

I am not 100% if what I suggest will work it is just how I have set things up.

 

Basically to do anything my app takes time frames, set to 40ms I think its been a while! So to move from x to y in z amount of time you give it the postitions and it setsthe correct values for the correct number of time frames. Then feeds those values out as each time frame occurs.

 

Thus moving the mirror in increments smoothly from a to b! You obviously have to be careful to get a smooth scroll.

 

I have possibly completely misunderstood but it may be adabtable. (My app is primarily to record a show then play it back time and time again so it can process things like this before a show plays. It May slow you down).

Link to comment
Share on other sites

You may well be right that is one thing I didn't think to actually consider! :rolleyes:

 

One major problem with VB is that the timer is never accurate anyway! That is one of my main reasons for wanting to change language.

Link to comment
Share on other sites

DMX actually sends every any-time-you-can-be-bothered-to-do-it.

 

The length of a stop bit in the data series isn't fixed, nor is the break or mark after break.

All of these just have a minimum value.

 

You can also have as long as you like between updates (in theory at least).

 

For example, the Celco Explorer we have updates the DMX signal every 3ms to 28ms.

(Fastest to slowest)

Link to comment
Share on other sites

Hi

 

SiCo, My program which I have been creating in vb.net works but I am having problems with the interface between the DMX protocol cord and the rs232 port. Could you give me any help? I have done all the vb 6.0 methods and usual code but .net dose not except the Chr$ any more and I believe this to be quite crucial (even if I don't no exactly what it does). Vb.net is a pain to upgrade existing apps to as all the methods are all slightly different and the upgrade wizard usually crashes. (Microsoftís fault again).

 

With regards to the timing and cross fading using a pc there is usually a problem as the timer (not the clock) within windows is inaccurate depending on the system load and I think (although not certain)resets it self from the system clock every so often. When doing cross fades and timed events timing may be slightly out due to system load (although this all depends on the system resources that are being taken up at that particular moment)

Link to comment
Share on other sites

If you look in the help it lists chr and chr$ as being replaced by chr() as a function.

 

Public Function Chr(ByVal CharCode As Integer) As Char

 

So try wrapping it in chr() instead of chr$ and see how that goes.

 

I have to say I really haven't used .NET much but from what I have learnt with VB 6 if I was to consider changing I would probably rewrite the code so as to learn .NET properly so to speak.

 

But the timer is a major concern some pofessional programs must get round this or do they simply not tell the consumer?!!

Link to comment
Share on other sites

DMX actually sends every any-time-you-can-be-bothered-to-do-it ... You can also have as long as you like between updates (in theory at least) ... For example, the Celco Explorer we have updates the DMX signal every 3ms to 28ms.

A problem on many desks, also, if you are making DMX on a PC, the timing will vary depending on machine load.

 

When doing cross fades and timed events timing may be slightly out due to system load

Most of the while this will not matter, certainly when driving dimmers, as cues tend to be manually triggered. Any errors are therefore not cummulative.

 

Thus moving the mirror in increments smoothly from a to b!

This might be a problem if the DMX refresh rate varies. I've never had a mover hooked up to a test rig to see what they do if the frame-to-frame time varies. I would expect that they must smooth out the movement. Certainly they aren't going to start and stop movements suddenly so they are doing some processing, which I guess introduces a lag on commands.

 

 

There is a way of generating DMX with a constant frame rate under PC control, I have a system doing it now on the bench.

Link to comment
Share on other sites

[snip] but .net dose not except the Chr$ any more and I believe this to be quite crucial (even if I don't no exactly what it does).

If you don't know what the Chr / Chr$ function does, then you shouldn't really be writing this kind of code. (It takes an extended-ASCII value and outputs the character)

 

Learn the programming language first!

- Buy or borrow some "How-to" books and do (and understand!) the examples therein. Otherwise you are going to end up banging your head against the code for some time, and possibly never get it working properly.

 

It sounds very much like you've grabbed hold of someone else's full code and are playing about with it - while this is a valid way to learn, it isn't a good way to produce programs as you'll not learn anything about how the program actually works, so when you come to produce a program of your own you'll have no idea how to go about it.

 

It can also get you in legal trouble, as you may well be breaking the copyright the original author owns.

 

(Incidentally, Chr$() has been non-standard in VB since version 4 or so, the terminating variable type identifier $ hasn't been necessary on PCs since BBC and RM BASIC!)

Link to comment
Share on other sites

Brian, nice new profile name + description *groans at terrible pun*. How have you got a constant frame rate for DMX on a pc? Lemme guess it doesn't involve vb. I've been learning java at uni but the problem is hand-coding guis is a pain in the ass and also mouse handling seems to be weird. If I could collaborate with a more experience java programmer on something (i.e. anyone fancy doing it with me?) then I could run it on the iBook which my budgeting says I'll be able to afford in a couple of weeks :)

 

Dave

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.