gotoxx diseqc 6E cmd

Status
Please reply by conversation.

updatelee

SatelliteGuys Pro
Original poster
Jul 22, 2006
1,604
112
CFB Edmonton
If I send the 6E string once and wait 25 sec the motor doesnt go all the way, just stops part way.
If I send the 6E string 5x and wait 5sec between each resend it goes all the way and works fine.

this is just an example, if the motor doesnt have to move far, say from 82/91 then I could probably get away with few resends.

this I assume isnt normal, does the 6E cmd have a timeout like 68 and 69 ? the diseqc docs I read dont say it does.
 
6E works without resends for me on a DG380. I don't have a SG2100, but I've come across odd comments in code that they can be temperamental to command. Give us a couple of examples of the full hex commands you are using.
 
DiSEqC: e0 31 6e e1 7b 00 length: 5

thats for a roto angle of -23.69

Code:
        struct dvb_diseqc_master_cmd usals_cmd = { { 0xe0, 0x31, 0x6e, angle_1, angle_2, 0x00 }, 5 };
        int i;
        for (i = 0; i < 5; i++) {
                diseqc_send_msg(frontend_fd, usals_cmd);
                sleep(6);
        }

Ive wanted to get myself a DG380 for awhile, my SG2100 is almost 5 years old and is starting to show wear. instead I bought a Prof 7500 :) hehe. to many toys never enough money
 
Last edited:
on another note I see alot of apps, kaffine for linux and enigma for dreambox insted of using the full 1/16 resolution that hex provides for the decimal place on gotoxx, they use a lookup table

Code:
int DecimalLookup[10] = { 0x00, 0x02, 0x03, 0x05, 0x06, 0x08, 0x0A, 0x0B, 0x0D, 0x0E };

this provides single digital decimal resolution 1/10 its easy to impliment and a nice one liner. insted I used

Code:
int last_digit(double var)
{
        var -= floor(var);
        int i = 0;
        double test;
        for (test = 0; test <= var; test += 0.0625 )
                i++;
        return --i;
}

Code:
        int RotorCmd = (int)floor(fabs(motor_angle)) * 0x10 + last_digit(fabs(motor_angle));

to give me the full 1/16 of a degree. Is this a better way todo things ? or is the motor ignoring it anyways and still only giving me 1/10 of a degree
 
DiSEqC: e0 31 6e e1 7b 00 length: 5

thats for a roto angle of -23.69

Looks ok to me.

on another note I see alot of apps, kaffine for linux and enigma for dreambox insted of using the full 1/16 resolution that hex provides for the decimal place on gotoxx, they use a lookup table
<snip>
Is this a better way todo things ? or is the motor ignoring it anyways and still only giving me 1/10 of a degree

The DG380 appears to interpret fractional degrees correctly. It also appears to have more resolution than can be specified in a command like this. I can't answer your question with respect to a SG2100. In terms of code, I think there are simpler ways if you assume the presence of a floating point unit (the Linux world often appears committed to dumbing down all code to fixed point only):

Code:
    cmd[3] = angle >= 0.0 ? 0xd0 : 0xe0;
    int sixteenths = fabs(angle) * 16.0 + 0.5;
    cmd[3] |= sixteenths >> 8;
    cmd[4]  = sixteenths & 0xff;

or something along those lines.
 
thanks for the code snippet, works like a charm. Im still learning C and im sure no matter how long I do it there will always be something new to learn.
 
Sure, happy to help.

I don't know why your 2100 wants multiple commands to make it all the way to its commanded destination. Make sure you wait a little after commanding a voltage change before sending a DiSEqC command of any type to the motor. Likewise I would first verify completed operation before turning on 22 kHz or making another voltage change.

I did a quick search on the web and found a code example that specifically commanded 13V for SG 2100 motor movements. That sounds dubious to me, but it's all I found and might be worth a shot in the dark.
 
Status
Please reply by conversation.

Polarity question

What is LP (Low Power) ?

Users Who Are Viewing This Thread (Total: 0, Members: 0, Guests: 0)

Who Read This Thread (Total Members: 1)