Multiple Patterns Loading into GX5295 DIO's Memory

Sanjay E.
Bengaluru, Karnataka

Jan 2, 2018
10 Posts

0  |  0  

Re: Multiple Patterns Loading into GX5295 DIO's Memory

Hi all,

I'm using GX5295 DIO card in PCI Chassis linked to a PC.

I wanna to call the DIO_LoadFile of the GtDio32.dll to load Multiple pattern files to the board's memory at once.

Is there possibility to Run a particular pattern file from the board's memory without unloading?

For example, Pattern1, Pattern2 & Pattern3 are loaded into DIO's Memory. I want to run Pattern2 only.


Thanks&Regards,
Sanjay E.

Jason D.
Irvine, CA

Jan 3, 2018
32 Posts

0  |  0  

Re: Multiple Patterns Loading into GX5295 DIO's Memory

Hi Sanjay,

It is possible to do what you are describing, but you need to compensate for the DIO pipeline architecture to get it working.

What you want to do is the following:
1.       Create your patterns and load them to memory at different steps – making sure that they do not overlap. You will also need to pad your pattern with some extra vectors (about 20) for the dio’s processing at the beginning and end of each pattern segment. The padding would extend the pattern’s first/last step and should contain the same data as the first and last vector, respectively.
For example the dio output memory could look like this:
Step                       |0 …   19||20 …    39||40 …  59||60 … 79||80 … 119||120 … 139|
Contents             |Padding|| Pattern1 ||Padding||Padding||Pattern2 || Padding  |
2.       When you want to run a pattern, use the command DioWriteProgramCounter to set where in the DIO memory to set the sequencer. In the example above we would set it to 60 if we wanted to run pattern 2.
3.       After setting the program counter, you will also want to use DioWriteCtrlCommand at vector step 119 to halt the sequencer after it reaches the end of the pattern.
4.       Once that setup is complete, you can arm and trigger the DIO.
5.       When you run another pattern you will have to repeat steps 2 through 4.

Regards,
Jason

Sanjay E.
Bengaluru, Karnataka

Jan 4, 2018
10 Posts

0  |  0  

Re: Multiple Patterns Loading into GX5295 DIO's Memory

Hi Jason,

Thanks for your quick response.

We would like to know, if there is any option available to load different .dio files at the dio memory without creating a single dio files with appending the pattern vector segment at different step locations.

For example:
We have 2 dio files, ONE.dio & TWO.dio. these files should be loaded in the load function with non blocking mode without taking time to load complete pattern file in the memory it should goto the next statement, in background it should load the pattern in the memory with different address without waiting for the pattern to load.
Similar way to DIO.TRIGG  which works in non blocking mode. After trigger execution the pattern runs in the background until the HALT is occurred.

We want to save the time while loading the different dio files.

Thanks,
Sanjay

Jason D.
Irvine, CA

Jan 4, 2018
32 Posts

0  |  0  

Re: Multiple Patterns Loading into GX5295 DIO's Memory

Hi Sanjay,

I recommend looking at the function "DioLoadFile" or if you are using the ATEasy driver, the command "DIO File Load". There are parameters which allow you to set the dio's starting step and how many steps to load from the file.

Regards,
Jason

Sanjay E.
Bengaluru, Karnataka

Jan 4, 2018
10 Posts

0  |  0  

Re: Multiple Patterns Loading into GX5295 DIO's Memory

Hi Jason,

I understand different steps can be programmed & triggered.
My concern is loading different dio files, please refer below the example for loading different dio file. please answer with yes or no.

DWORD dwSize=0;
DioInitialize (0, &nMasterHandle, &nStatus);
DioLoadFile (nMasterHandle, “MemoryTest1.dio”, 0, 0, &dwSize, &nStatus);
DioLoadFile (nMasterHandle, “MemoryTest2.dio”, 0, 0, &dwSize, &nStatus);
DioArm(nHandle, &nStatus);  
DioTrig(nHandle, &nStatus); //MemoryTest1.dio
DioTrig(nHandle, &nStatus); //MemoryTest2.dio
DioHalt(nHandle, &nStatus);

Thanks,
Sanjay

Solution Available
Jason D.
Irvine, CA

Jan 5, 2018
32 Posts

1  |  0  

Re: Multiple Patterns Loading into GX5295 DIO's Memory

Hi Sanjay,

The code snippet would not work.

Here are a couple of processes that will provide close to the functionality you desire:
1. Two additional steps are needed.  For each pattern, set the program counter to the beginning of the pattern sequence (including some padding vectors as  previously mentioned), and you would need to define the end of the pattern with a Halt.  Then you can Arm and Trigger the DIO.

OR

2. Load the patterns as you suggested, and for each pattern, note the beginning vector for each. Once the patterns are loaded, send a Pause command to the beginning of the 2nd pattern.  Then, Arm the DIO.  The DIO will wait for an initial trigger, then execute pattern 1.  Monitor the DIO state.  When it returns to the Paused stte, that means you are at the beginning of pattern 2.  For each subsequent pattern, load a new Pause command for the vector at the end of the next pattern sequence, then Trigger the DIO.  Repeat this process, except for the last pattern in the sequence, load a Halt command at the last vector.

Regards,
Jason

Sanjay E.
Bengaluru, Karnataka

Jan 9, 2018
10 Posts

0  |  0  

Re: Multiple Patterns Loading into GX5295 DIO's Memory

Hi Jason,

I need two things to be cleared.
1. DIOLoadFile is it a blocking execution statement or non blocking execution.
2. How to load the separate pattern files in different memory locations.
E.G->
pattern1 has size of 20k vectors & pattern 2 has size of 40 k vectors. I want to load the pattern1 from 0 to 20 k address location & pattern2 21K to 61K address location.
Also i want to know whether once both the patterns are loaded, can i load different pattern(pattern3) at 0 to 20k address location by unloading pattern1 without affecting pattern 2??

Please reply if above cases are possible in GX5295, if not possible please suggest the newer version GX instrument supporting the features.

Many Thanks,
Sanjay E.

Sanjay E.
Bengaluru, Karnataka

Jan 16, 2018
10 Posts

0  |  0  

Re: Multiple Patterns Loading into GX5295 DIO's Memory

Hi Jason,

I've a pattern with 32 channels enabled, but in this case GX5295 DIO can support maximum 64M as vector depth for each channel.
(Note: I have to increase the vector depth to 128M for each .)

Is there any possibility to select particular 16 channels from those channel 0 to channel 31,in order to increase the vector depth to 128M?

Thanks,
Sanjay E.

Jason D.
Irvine, CA

Jan 16, 2018
32 Posts

0  |  0  

Re: Multiple Patterns Loading into GX5295 DIO's Memory

Hi Sanjay,

To answer your questions on your post from Jan 9, 2018:
1. DioLoadFile is a blocking statement.
2. Refer to the software user guide "DioSoftwareProgRef.pdf" located in Program Files (x86)\Marvin Test Solutions\GtDio.
DioLoadFile has input parameters for the board starting step number and the number of steps to load from the dio file. Make multiple calls to DioLoadFile and change dwStart and pdwSize as needed to load your patterns without them overlapping over the same steps.
3. Once both patterns 1 and 2 are loaded, you can load another pattern 3 over the steps that had pattern 1. You can't unload pattern 1, but you can write over it. You would need to take care that pattern 3 step position is set to the same as pattern 1 and that both pattern 1 and 3 are the same size.

To answer your questions on your most recent post on Jan 16, 2018:
In the same pdf, look at DioSetupIOConfiguration. You can set the width to be 16 bits wide, which gives you the maximum step count of 128M on channels 0-15.

Regards,
Jason


Please Note
You need to have a M@GIC account to participate in the Forums.
Not yet registered on our website? Click here to register today!

All content, information and opinions presented on the Marvin Test Solutions User Forums are those of the authors of the posts and messages and not Marvin Test Solutions'. All attachments and files are downloaded at your own risk. [Read More]