Counter setting NI 6509 in c#

Hello

I use an NI 6509 IO card. I have to write in different lines of C# on a different port to control LEDS, relays, motors and so forth...

I found in dotnet 2.0/example written in c# to write examples of digital ports put out as "ReadDigPort".

I would like to know if the code examples exist on 'masking or Xoring' data to change a single line of the port without

affect the value of the other lines?

Thnaks for your answers

Hello

You can use the function 'WriteSingleSampleSingleLine' to write only one byte on the port or you can read, masking and write the line with "WriteSingleSamplePort".

Kind regards

Tags: NI Hardware

Similar Questions

  • How to keep count issues to the rank of quiz

    I have a few checks to understand throughout my module using question slides. I do not want to count in the category of quiz at the end. How can I accomplish this? I can't do 'Survey' questions because I want there to be reactions. If I uncheck "Report responses", maintains that the question of counting towards the rank of quiz?

    Have you tried their score to 0?

    Check the than advanced interaction, Panel very useful, linked dynamically to the properties pane. For all the slides in question you don't want to count, set the score to 0.

    Variables more quizzes will be correct, except for the total number of questions.

    Lilybiri

  • Problem in loop... How to create and lock a set of PathItems?

    Hi all!

    I'm a noob... a very confused

    And I'm not trying to get this thing to work

    So here's what I have. The first loop catches from geometries in the active document and he turns around itself to create duplicates. The second loop is supposed to work around several geometries autour geometries newly created.

    But instead of creating a radiating pattern, copy the following code builds a Tower: for the second loop every time, he seized the last geometry drawn instead of what is in the 'Original '.

    Can someone explain what is the problem? Thank you!

    NumPaths = 1 to frontDocument.PathItems.count

    Set myPath = frontDocument.PathItems.item (NumPaths)

    For index = 0 to 30

    Define newPath = myPath.Duplicate

    Call newPath.translate (100 * sin (6.14* index/30), 100 * cos (6.14* index/30))

    Call newPath.rotate (360 * index/30)

    Next

    Next

    The original value = frontDocument.PathItems

    NumPaths = 1 to Original.count

    Set myPath = Original.Item (NumPaths)

    For index = 0 to 30

    Define newPath = myPath.Duplicate

    Call newPath.translate (100 * sin (6.14* index/30), 100 * cos (6.14* index/30))

    Call newPath.rotate (360 * index/30)

    Next

    Next

    something like that?

    first loop is a 'ring', in order to make this 'ring' turning around to make the sphere that you do a group, so the second loop duplicating the 'ring' (Group) and basically does the same thing as the first, but uses the group instead of pathItems.

        For NumPaths = 1 To frontDocument.PathItems.Count
                  Set myPath = frontDocument.PathItems.Item(NumPaths)
    
                Set myGroup = frontDocument.GroupItems.Add 'add a group
    
                  For Index = 0 To 30
                            Set newPath = myPath.Duplicate(myGroup) 'add each duplicate to the group
                            Call newPath.translate(100 * Sin(6.14 * Index / 30), 100 * Cos(6.14 * Index / 30))
                            Call newPath.rotate(360 * Index / 30)
                  Next
        Next
    
         Set Original = frontDocument.GroupItems 'make original all groupItems instead of pathItems
    
        For NumPaths = 1 To Original.Count
                  Set myGroup = Original.Item(NumPaths) '
    
                  For Index = 0 To 30
                            Set newGroup = myGroup.Duplicate     'duplicate the groups
                            Call newGroup.translate(100 * Sin(6.14 * Index / 30), 100 * Cos(6.14 * Index / 30))
                            Call newGroup.rotate(360 * Index / 30)
                  Next
        Next
    
  • Remove the quotation marks the names of channel

    First of all - I'm new to tiara and VB so please forgive my ignorance!

    I have a large data set containing several groups with the same names (or almost) in each group. For reasons not worth going in channel names have quoation marks around them, while others do not.

    I'm trying to remove the quoation marks to standardize all channel names in groups, to do hoped to browse channels renaming groups as the case

    I think it should work: -.

    For

    i = 1 to GROUPCOUNT

    Call GROUPDEFAULTSET (i)

    CN (""ChannelName"" "") = "ChannelName".

    Next

    ChannelName, where is the name that I am trying to replace, but I get the following error:-expected ')'

    Can someone point out where I'm wrong?

    (Note: I also tried to use triple quotes ('' ' ChannelName' ' "), but I get this error instead - CN (" "ChannelName" "" "): = ChannelName Close support" ") ("expected for the index fields)

    Bonus points - how to get the loop jump over all groups where the channel that I'm already referencing isn't quotes in it, rather than giving me an error that the channel can not be found?

    Thank you very much in advance for any help!

    Dan

    Hello Dan,.

    You use the old syntax of script to manipulate the data. Please find below the current way to replace the double quotes with a underscote:

    Dim iLoopG, iLoopC, oGroup, oGroupChns m²

    m² = Chr (34) "character".

    Set oGroup = Data.Root.ChannelGroups

    iLoopG = 1 to oGroup.Count
    Set oGroupChns = oGroup (iLoopG). Channels
    iLoopC = 1 to oGroupChns.Count
    ' msgbox oGroupChns (iLoopC). Name
    oGroupChns (iLoopC). Name = Replace (oGroupChns (iLoopC). Name, m², '_')
    next
    next

    Greetings

    Walter

  • Report: channel error in several tables description

    I get several error messages when you create more of a channel table and you want to view the descriptions of channel. Is there something wrong with the allocation of the value of the description of the header line? I have attached a minimal example:

    Option Explicit  ' force explicit declaration of all variables in a script.

    Call Data.Root.Clear)
    Call DataFileLoad ("C:\Program Files (x 86) \National Instruments\DIAdem 2014\Examples\Data\Example_data.tdm")
    Call Report.NewLayout)

    Dim oMySheet, oMyTable, oMyColumn, oMyGrp, iCount, gCount

    GCount = 1 to GroupCount
    Set oMyGrp = Data.Root.ChannelGroups (gCount)
    Set oMySheet = Report.Sheets.Add ("Table" & gCount)
    Set oMyTable = oMySheet.Objects.Add (eReportObject2DTable, "Table" & gCount)
    oMyTable.Settings.Header.Title2 = "@Data.Root.ChannelGroups (CurrGroupIdx).» Channels (CurrChnNo). Properties ("& Chr (34) &"description"& Chr (34) &" ""). "Value".
    oMyTable.Settings.Header.UseAutoFontSize = TRUE
    oMyTable.Position.ByBorder.Bottom = 5
    oMyTable.Position.ByBorder.Top = 5
    oMyTable.Position.ByBorder.Left = 5
    oMyTable.Position.ByBorder.Right = 5

    ICount = 1 to oMyGrp.Channels.Count
    Set oMyColumn = oMyTable.Columns.Add (e2DTableColumnChannel)
    oMyColumn.Channel.Reference = oMyGrp.Channels (iCount). GetReference (eRefTypeIndexName)
    Next
    Next
    Call Report.Refresh)

    As you will see, everything works fine for the first table, but errors are produced for all of the following.

    / Phex


  • Pulse frequency of CO generates actually 1 pulse per second?

    Hi all

    I have a VI installed outside in the attachment below.  I seem to have a lack of understanding on how to program this VI here.  I do not understand what might not.

    The VI is very basic.  The frequency has been set to 1, and the units are Hertz.  For me, this means that the application must send a pulse to my linear actuator ONCE per second.  I have a simple Pulse counter set up in VI so count the number of pulses is actually sent (using the DAQ assistant).  Why is that when I run the program, I get around 300 pulses per second?  Elevate the value makes it goes a little faster, but the value isn't really do go more slowly.  It seems no real correlation between the input frequency and the number of pulses that are sent.

    I just want a program that I can enter "1 pulse per second" or however many impulses I want per second and have the card send a pulse per second (or however much is entered).  Where should I start?  I have an entire program written and ready to go, but this concept of base here escapes me completely.

    Thank you

    James

    Attached: photo 1) of the concept that I am completely baffled on 2) VI of my program that says the concept is used in

    In the simple image, you run a loop as soon as possible (it has no timer mechanism).  Inside this loop, you configure the task of the pulse, run it, then immediately stop and disable.  You need to create the channel and configure the synchronization outside the while loop before it starts, and you need to clear the task outside of the loop this way, after the while loop ends.  Depending on what you want to do, you should be able to move the beginning of the task outside of the loop this way, or simply let the task automatic start.

    You will need to restructure your VI a little.  I can't tell if you want to delete the task after each step, or simply change the frequency.  If it is just the frequency, you can use DAQmx write to change; If you need start and stop the task, you will need logic to do once whenever you want to start (you can get an error if you start a task that is already running).  There is no need of "Is the task performed?" since you do not use the exit for what it is.

    EDIT: Also, it's always a good idea to put a waiting inside loops that run indefinitely.  Otherwise, they will turn as soon as possible, all processors available time and prevent any other code to run.  If you configure your task to meter correctly the time loop will not affect the value of the pulse (because it is done in hardware), but there is no need to run the quick loop.

  • Retrieve data after a certain line

    Hi guys,.

    Any advice or assistance would be appreciated

    Question: How do I retrieve data after a certain line of a string of delimited by commas that are read from a port series?

    More info: to have a map which includes data values and can be read in the computer via a serial port. Example of a string of acquired data as below:

    Data = 1 bit/s = sensor tool
    ; Label, time, voltage, pressure, temperature, current
    A, 01:33, 5.1, 18.1, 31.2, -.
    B, 01:34, 5.5, 19.2, 30.5, -.
    Data = 1 bit/s = sensor tool
    ; Label, time, voltage, pressure, temperature, current
    A, 01:35, 5.3, 18.3, 30.1, -.
    B, 01:36, 5.1, 19.0, 30.5, -.

    Data = 1 bit/s = sensor tool
    ; Label, time, voltage, pressure, temperature, current
    A, 01:37, 5.1, 18.1, 30.8, -.
    B, 01:38, 5.3, 19.2, 30.1, -.

    The value of these data is kept up-to-date line by line. I would like to start to extract data only on the 3rd block of incoming data. I would not that the first 2 blocks incoming data.

    More info: currently, my idea to do this is to analyse the '; '. data"and put it in a counter. If there are 2 '; data' scanner, then woud counter set to True in a case to start structure to extract the output data. Please see my attached picture.

    However, I'm not able to create also a counter using a table that I can't use a while loop and register shift. You have an idea? Thank you very much.

    Hi pokerprof,

    If you plan to get the data individually, have you tried the following:

    Put the output of the select.vi (where it is used as part of the counter) to a comparison so that when we tell: counter-online 3, begin to extract.

    Alternatively, you can use the below:

    The number of iterations that you plan to run? My concern would be the overflow of integer of the meter (http://en.wikipedia.org/wiki/Integer_overflow).

    You can try like vi, illustrated by johnsold (if you get all the data in a single iteration).

    Thank you

    Warm greetings,

    Lennard.C

  • The width is my PopupScreen?

    I've implemented some slightly modified fields and buttons to allow the adjustment of the width. They work great on a screen:

    FixedLabelField ("count Set:",Display.getWidth()/2)); ")

    But what I can call to get the width of the PopupScreen? I tried all sorts of things, but they all come to zero...

    You still add your fields until the screen has its chance to layout itself.

    Create and add them inside of, say, of your PopupScreen onDisplay() (onUiEngineAttached() in 4.3 +).  When you do that, your screen is sure to have been laid out.

  • Problem of multithreading with Mac system task class

    I have a class that extends the thread

    public class Convert extends Task
    
    
    

    Inside the class, I have a need to interrogate a file every 5 seconds to see if the new file has been added to it or not.

    So that's what I did, is that I did a while loop inside of which I kept the logic and I did the sleep of thread for 5 seconds.

    @Override
        protected Object call() throws Exception {
            // TODO Auto-generated method stub
            try{
                while(!Thread.currentThread().interrupted())
                {
                      //my logic to query the folder
                        Thread.sleep(5000);
                 }
                  catch (Exception e) {
                        e.printStackTrace();
                }
              return null;
        }
    
    
    

    I call this thread via an ExecutorService

    ExecutorService exec = Executors.newCachedThreadPool(new ThreadFactory() {
            @Override
            public Thread newThread(Runnable r) {
                Thread thread = new Thread(r);
                thread.setDaemon(true);
                return thread;
            }
        });
    
    
    

    and then

    exec.execute(convert123); //where convert123 is an reference of Convert class
    
    
    

    This exec.execute is called on the press of a button.

    Now, the problem is that it seems to work fine on my windows machine, but blocks the scene just when clicking the same button on a MAC system. (It works for 1 or 2 out of 10 times, IE 8 times out of 10 times, the scene just gets hanged and unresponsive)

    I have never created a thread running forever, so there might be a problem with my design, but I have no idea about it.

    I don't see anything inherently wrong with that. You get all exceptions?

    Note that there is an built-in API (not very high level) to watch directories for changes. You still need the wire without end (that you can implement a task if you want to cancel easily), but it should make your code easier (no need to survey and waiting for a fixed amount of time, at least on operating with os level file systems I look).

    The following example can run several tasks ending not quite happily on my Mac.

    import java.util.concurrent.ExecutorService;
    import java.util.concurrent.Executors;
    import java.util.concurrent.ThreadFactory;
    
    import javafx.application.Application;
    import javafx.application.Platform;
    import javafx.beans.binding.Bindings;
    import javafx.beans.property.IntegerProperty;
    import javafx.beans.property.SimpleIntegerProperty;
    import javafx.concurrent.Task;
    import javafx.concurrent.WorkerStateEvent;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.geometry.Pos;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.Label;
    import javafx.scene.control.ScrollPane;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.BorderPane;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    
    public class NonTerminatingTaskTest extends Application {
    
        private static class CounterTask extends Task {
            private final IntegerProperty counter;
    
            private CounterTask(IntegerProperty counter) {
                this.counter = counter;
            }
    
            @Override
            public Void call() {
                while (!isCancelled()) {
                    try {
                        Thread.sleep(1000);
                        Platform.runLater(new Runnable() {
                            @Override
                            public void run() {
                                counter.set(counter.get() + 1);
                            }
                        });
                    } catch (InterruptedException exc) {
                        // allow to cancel
                    }
                }
                return null;
            }
        }
    
        @Override
        public void start(Stage primaryStage) {
            final ExecutorService exec = Executors.newCachedThreadPool(new ThreadFactory() {
                @Override
                public Thread newThread(Runnable r) {
                    Thread thread = new Thread(r);
                    thread.setDaemon(true);
                    return thread;
                }
            });
    
            final BorderPane root = new BorderPane();
            final VBox counterContainer = new VBox(5);
            counterContainer.setPadding(new Insets(10));
            final ScrollPane scroller = new ScrollPane();
            scroller.setContent(counterContainer);
            root.setCenter(scroller);
    
            final Button startCounterButton = new Button("Start new counter");
            startCounterButton.setOnAction(new EventHandler() {
                @Override
                public void handle(ActionEvent event) {
                    final Label label = new Label();
                    final IntegerProperty counter = new SimpleIntegerProperty();
                    label.textProperty().bind(Bindings.format("Count: %s", counter));
                    final Task counterTask = new CounterTask(counter);
                    counterTask.setOnCancelled(new EventHandler() {
                        @Override
                        public void handle(WorkerStateEvent event) {
                            counterContainer.getChildren().remove(label);
                        }
                    });
                    label.setOnMouseClicked(new EventHandler() {
                        @Override
                        public void handle(MouseEvent event) {
                            counterTask.cancel(true);
                        }
                    });
                    counterContainer.getChildren().add(label);
                    exec.submit(counterTask);
                }
            });
    
            startCounterButton.setAlignment(Pos.CENTER);
            root.setBottom(startCounterButton);
    
            Scene scene = new Scene(root, 200, 450);
            primaryStage.setScene(scene);
            primaryStage.show();
        }
    
        public static void main(String[] args) {
            launch(args);
        }
    }
    
  • Top 10 SQL

    Hello
    on the 11g R2, excluding AWR report
    There are queries that return of:
    10 SQL albums when the excution
    10 high CPU load SQL
    10 SQL albums by number of day

    On ORACLE_HOME/rdbms/admin?

    Or somewhere else?

    Where can I find them?



    Thank you.
    select c.* from
        (select disk_reads,
                buffer_gets,
                rows_processed,
                executions,
                first_load_time,
                sql_text
           from v$sqlarea
           where parsing_user_id !=0
           order by
              buffer_gets/decode(executions,null,1,0,1,executions) desc ) c
    where rownum < 11;
    
    select c.* from
        (select disk_reads,
                buffer_gets,
                rows_processed,
                executions,
                first_load_time,
                sql_text
           from v$sqlarea
           order by
              disk_reads/decode(rows_processed,null,1,0,1,rows_processed) desc ) c
    where rownum <11;
    
    --Top 10 by Buffer Gets:
    
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            buffer_gets, executions, buffer_gets/executions "Gets/Exec",
            hash_value,address
       FROM V$SQLAREA
      WHERE buffer_gets > 10000
     ORDER BY buffer_gets DESC)
    WHERE rownum <= 10
    ;
    
    --Top 10 by Physical Reads:
    
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            disk_reads, executions, disk_reads/executions "Reads/Exec",
            hash_value,address
       FROM V$SQLAREA
      WHERE disk_reads > 1000
     ORDER BY disk_reads DESC)
    WHERE rownum <= 10
    ;
    
    --Top 10 by Executions:
    
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            executions, rows_processed, rows_processed/executions "Rows/Exec",
            hash_value,address
       FROM V$SQLAREA
      WHERE executions > 100
     ORDER BY executions DESC)
    WHERE rownum <= 10
    ;
    
    --Top 10 by Parse Calls:
    
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            parse_calls, executions, hash_value,address
       FROM V$SQLAREA
      WHERE parse_calls > 1000
     ORDER BY parse_calls DESC)
    WHERE rownum <= 10
    ;
    
    --Top 10 by Sharable Memory:
    
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            sharable_mem, executions, hash_value,address
       FROM V$SQLAREA
      WHERE sharable_mem > 1048576
     ORDER BY sharable_mem DESC)
    WHERE rownum <= 10
    ;
    
    --Top 10 by Version Count:
    
    set linesize 100
    set pagesize 100
    SELECT * FROM
    (SELECT substr(sql_text,1,40) sql,
            version_count, executions, hash_value,address
       FROM V$SQLAREA
      WHERE version_count > 20
     ORDER BY version_count DESC)
    WHERE rownum <= 10
    ;
    
  • VCO allows to disconnect the removable devices on multiple virtual machines

    Hey everybody,

    I am new to vCO and trying to get wet feet.  I noticed there is already a "workflow" for disconnection of any removable devices, but you can only apply it to a virtual computer at a time.  I tried and it worked, but I would like that it run on a schedule and do all my virtual machines.  I did some reading and think I need to use the workflow batch to get there.  I read that I had to complete her run a Workflow on a selection of objects and then fill the filling batch configuration elements.  Is it true or I read that wrong?

    Before that, however, I tried to start running it a workflow on a selection of workflow objects.  For my item type, I chose VirtualMachine.  I selected no, for the Action or of the elements of the array.  I can go through and manually set the virtual machines (which is hard enough to do one at a time, but I don't know how to use an appeal to get back them again).  However, when I choose a workflow, the window of the selector is just empty.  I should have the permissions because I am an administrator in vCO and overall environment.

    I am completely off track here?  Is there a better way to do it?  Or am I just missing a step?  It's all in 4.1.1.

    Any help would be appreciated!

    Thank you

    Lauren

    OK I found how you did it. You have renamed the local parameters of entry and vmNb.

    For example, your script should look like this:

    Instead:

    If you did not replace full box yet, you can go on the in / out tab and double click on the local parameter rename them to the counter.

    Like this (it is not very visible here, but the local counter setting is being edited)

  • ESXi 4.1 - Windows 7-4 affected carrots - 2 carrots in OS

    I attributed to 4 processors to a virtual from Windows 7 computer in ESXi. Manager tasks indicates that the operating system to use two hearts... Not four...

    Why is this?

    Please see the pictures attached for more details.

    ESXi_screenshot.png

    ESXi_screenshot2.png

    Windows 7 license only allows 2 CPUs. You can change the cores per processor count setting while Windows is presented with 2 processors dual core.

  • A script that removes vmnic vswitch?

    I can only find escli allows to remove a vmnic a vswitch?

    esxcfg-vswitch - U < vmnic > < vSwitch > #unlink an uplink
    http://KB.VMware.com/selfservice/microsites/search.do?language=en_US & cmd = displayKC & externalId = 1008127

    Is this possible in powershell?

    I want to remove a vmnic vswitch, who have no status report.

    This is because the vswitch for the virtual machine has 2 x quad portcards, but only 4 uplink adapters are physical patched.

    Thank you very much

    To remove a vmnic that are not physically connected, each vSwitch on a host, you could do something like this

    $esx = Get-VMHost MyESXServer $notConnected = $esx.ExtensionData.Config.Network.Pnic | where {!$_.LinkSpeed} | %{$_.Device}
    Get-VirtualSwitch -VMHost $esx | %{
        $connectedNic = $_.Nic | where {$notConnected -notcontains $_} | %{$_}
        if($connectedNic.Count -ne $_.Nic.Count){
            Set-VirtualSwitch -VirtualSwitch $_ -Nic $connectedNic    }
    }
    
  • Bulck collection data update just hangs.

    Each no problem with anonymous block below? Can someone direct me to optimize this code. Scenario of having to update about 40 million lines to static value, I agree 1 million lines in a single loop. 1 million first lines are getting updated very soon probably in 2 minute, after that the hungs just code and I do not increase in the committed rows.


    Declare

    cursor c1 is
    Select the rowid of the t1
    where c1 is not null;

    TYPE t_rowid IS the TABLE OF the INDEX of ROWID OF directory;

    v_rowid t_rowid;

    Start
    OPEN c1;
    LOOP
    FETCH c1 COLLECT LOOSE v_rowid LIMIT 1000000;
    WHEN OUTPUT v_rowid.count = 0;
    FORALL i in 1.v_rowid.count

    setting a day of t1 set c1 = 'seda54t557790890778689890' where rowid = v_rowid (i);

    commit;
    end loop;
    commit;
    Close c1;
    end;

    Never engage inside the loop

    Do it in SQL

    update t1 set c1 = 'seda54t557790890778689890' where ROWID IN (select rowid from t1 where c1 is not NULL);
    
    commit;
    

    If you want to use SQL PL then

    BEGIN
    FOR i IN
    (
    select rowid from t1
    where c1 is not NULL
    )
    LOOP
    update t1 set c1 = 'seda54t557790890778689890' where rowid=i.rowid;
    END LOOP;
    COMMIT;
    END;
    
  • Create rectangles of information in the excel file... Help!

    I need help and have NO idea of what I'm doing. I have an excel file with thousands of lines, each with a column for the coordinate x, y-suface, the height and width of a rectangle. I need a script that will ask me to select the excel file, read the excel file and create rectangles of each of thousands of lines. I guess it would be simple enough for someone who knows what they're doing, but I have no idea where to start. I work in a windows environment and I have Illustrator CS4. Any suggestions? All scripts out there that could give me a start?

    you go, it's VBA code, I prefer to use it when I need to have Excel speak to Illustrator directly without exporting the data in Excel.

    to set up...

    -Open Excel

    -Press on Alt + F11 to bring up the editor

    -in the Tools menu, click references.

    -Add a reference to 'Adobe Illustrator CS5 type library' (or CS4 or your version)

    -in the perso.xls (or any other book) to add a Module. Personal is a comprehensive workbook that is always available. If you don't see it, go back to Excel and save a macro, anything will do. Who will create the personal folder.

    -type the following in this module

    Sub makeSquares()
        'carlos canto // 6/26/13
        'reads the active Excel workbook data to create squares in Illustrator
        'data is organized in rows as follows x, y, width, height
        'data has no headers, first row in cell "A1"
    
        Dim iapp As New Illustrator.Application
        Dim idoc As Illustrator.Document
        Dim isquare As Illustrator.PathItem
    
        Dim rowcount As Integer
        Dim x As Double
        Dim y As Double
        Dim w As Double
        Dim h As Double
    
        rowcount = Cells(1, 1).CurrentRegion.Rows.Count
    
        Set idoc = iapp.Documents.Add
    
        For i = 1 To rowcount
            x = Cells(i, 1)
            y = Cells(i, 2)
            w = Cells(i, 3)
            h = Cells(i, 4)
    
            Set isquare = idoc.PathItems.Rectangle(y, x, w, h)
        Next
    
        Set isquare = Nothing
        Set idoc = Nothing
        Set iapp = Nothing
    End Sub
    

    -Save the personal book

    -to run, move the cursor anywhere inside the slot... End Sub and press F5

    For simplicity, launch illustrator before running the script

Maybe you are looking for