Jump to content

Bayu A

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Bayu A

  1. this is my project. Controlling multiplexer. like this for script. 

    const mux = ["0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111", "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111"];
    const Yarray = [];
    const Parray = [];

    for (i = 0; i<16; i++){    
        //MUX bagian 1 - Vccs
        StaticIO.Channel0.DIO3.value = mux[i].substr(3,1);
        StaticIO.Channel0.DIO2.value = mux[i].substr(2,1);
        StaticIO.Channel0.DIO1.value = mux[i].substr(1,1);
        StaticIO.Channel0.DIO0.value = mux[i].substr(0,1);
        
        //MUX bagian 2 - Ground
        var a = i+1;
        if (a>15){
            a -= 16
        }
        StaticIO.Channel0.DIO7.value = mux[a].substr(3,1);
        StaticIO.Channel0.DIO6.value = mux[a].substr(2,1);
        StaticIO.Channel0.DIO5.value = mux[a].substr(1,1);
        StaticIO.Channel0.DIO4.value = mux[a].substr(0,1);
        
        wait (0.1);

        for (j=0; j<16; j++){
            //Bagian 3 - (-)
            StaticIO.Channel1.DIO15.value = mux[j].substr(3,1);
            StaticIO.Channel1.DIO14.value = mux[j].substr(2,1);
            StaticIO.Channel1.DIO13.value = mux[j].substr(1,1);
            StaticIO.Channel1.DIO12.value = mux[j].substr(0,1);
            
            //Bagian 4 - (+)
            b = j+1;
            if (b>15){
                b-=16;
            }
            StaticIO.Channel1.DIO11.value = mux[b].substr(3,1);
            StaticIO.Channel1.DIO10.value = mux[b].substr(2,1);
            StaticIO.Channel1.DIO9.value = mux[b].substr(1,1);
            StaticIO.Channel1.DIO8.value = mux[b].substr(0,1);

            print("i: "+i+" ,a: "+a+" ,j: "+j+" ,b:"+b);

            wait(0.3);

    I want to uses python code. How? 

  2. Hi, @attila, thans for your response. I have any script like that.

    var dataImp=[],dataPhase=[];

    for(var i = 0; i<3; i++){

    conMux(i);

    wait(0.1);

    Impedance1.single();

    if(!Impedance1.wait()) break; // wait for or exit on stop

    var phase= Impedance1.Traces.Trace.getData("Phase");

    var imp= Impedance1.Traces.Trace.getData("Impedance");

    dataImp.push(imp);

    dataPhase.push(phase);

    print(i+1);}

    Supplies.MasterEnable.checked= 0;

    StaticIO.stop();

    FileWrite("~/Desktop/ia/impIM_"+freq+".csv",dataImp);

     

    I will create CSV file. First colomn is impedance value and second colomn is phase value. 

×
×
  • Create New...