Re: Number of records in datalog-file

2004-06-21 Thread Jean-Pierre Drolet
The file function EOF end-of-file returns the number of records in a datalog file when 
leaving pos and offset inputs unwired.

Jean-Pierre Drolet
www.avensys.ca

- Original Message - 
From: Marco Tedaldi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 21, 2004 6:37 AM
Subject: Number of records in datalog-file


 Hello wiring people
 
 Is there an easy way to find out how many records there are in a datalog 
 file?
 I've thaught about reading every record sequentially till an error 
 occurs (or offset after read == filesize) but I think that's not 
 really economical. Is there a better way to do this?
 
 Thank you in advance
 
 Marco
 
 
 




Re: Opening Acrobat Doc from LV

2004-06-17 Thread Jean-Pierre Drolet

Sergey Liberman wrote:

 I am trying to open an Adobe Acrobat document (a manual for my program) from
 a LabVIEW program that will be deployed on a customer's computer. I was able
 to do it using System Exec with a command line like
 
 C:\Program Files\Adobe\Acrobat 5.0\AcroRd32.exe C:\Manuals\My
 Manual.pdf
 
 For that, I needed to find the absolute path to the Acrobat Reader on the
 target computer which I do by interrogating the Windows registry. It works
 fine, but I have a feeling that the same goal can be achieved by simpler
 means. Anyone can tip me on how to do it?


On Win NT/2K/XP you can call System Exec (minimized) with

cmd /C start  c:\document\path.ext

That will open any document (or application) with the default application associated 
with the file extension. 

On Win 95/98/ME it is command instead of cmd but I didn't test it.

Jean-Pierre Drolet
www.avensys.ca









Re: Wanted: #define

2004-06-16 Thread Jean-Pierre Drolet
I think that the combo text box and the non-sequencial ring would make good symbolic 
constants on the diagram, allowing to display
an item label and outputting a constant value with smaller footprint than a global. 
Unfortunately, in LV7 such diagram constants do
NOT update from their typedef, keeping the same label and value as when they were put 
on the diagram. Is it fixed in 7.1?

I agree that a better support for symbolic constants is needed for LabVIEW. I try to 
train my C programmers (and myself when I do
C) to use symbolic constants for better documentation and maintenance (once one used 
#define K1 1024 which meant he didn't quite
understand yet the actual purpose...). However it is more difficult to accomplish in 
LabVIEW.

And the problem of defining symbolic constants is different than having no constants 
in the diagram at all. Symbolic constants are
defined at compile time. Changes in constant values need recompilation. No constants 
on the diagram requires that parameters are
assigned at run-time from a file or other resource that can be edited without 
recompilation of the source code. In this case, a
Global VI populated with a INI file at initialization is a good technique.

Jean-Pierre Drolet
www.avensys.ca










RE: Time zones and time stamps

2004-06-10 Thread Jean-Pierre Drolet
Lewis Drake wrote:
 However, there is still an area where NI could improve the time plotting
 capability. When the plot span is greater than a few days, the major tic
 marks are placed on the UTC values for midnight (and multiples of midnight
 for spans of a month or so) rather than the values for midnight local time.
 This results in weird, non-intuitive, major tic mark values to mark day
 boundaries, such as 8:00:00 pm (i.e. EST for midnight).

I've just found that in LV7 you can correct this using the property Xscale.Range.Start 
and setting it to your local midnight instead
of 0.

Jean-Pierre Drolet
www.avensys.ca









Re: Checking for running applications on remote machines

2004-06-09 Thread Jean-Pierre Drolet
When the client app starts, it can try to open TCP connections to port
3015(Datasocket) and port 3363 (default TCP VI Server) to see if they
are listened to by the server. If the connections fail the server is
not running. If they succeed, close them.

You could also set the server to reply to some UDP broadcast request
when it is running. That allows to identify which servers are online
on the network without knowing their IP.



Re: I want to acquire and display data from 89C51 micro controller using RS 232 port

2004-06-09 Thread Jean-Pierre Drolet
Nice project, we do that all day long here. What is your problem
exactly?
The 89C52 has a UART you can use to write commands and read data. It
is fairly straightforward to write a command processor for the uC and
implement a command set. Is it the computer or the uC that generates
the control pulses?



Re: Problem in receiving serial data!

2004-06-09 Thread Jean-Pierre Drolet
UARTs (PC and uC) used to transmit data can be configured  to transmit
5,6,7,8 or possibly 9 bits per transmission. You can't transmit 12
bits in a single operation. Either you set the uC to transmit 12bit
data as 2 packets (2x6bits or 2x8 bits) or you pack 2x12 bits into
3x8bit packets.
The 2x8bits seems to be convenient since you send data with the same
packaging as internally used by the PC and the uC (16bit integers).
You read 2 bytes from the serial port and then typecast the string to
a U16.
3x8 would require a little bit swapping on both ends but would
transmit the data faster if this is important. You read 3 bytes from
the serial port and could typecast it to a U32 and extract 2 U16 with
masking and shifting bits.



Re: Problem about SGL with temperature unit

2004-06-09 Thread Jean-Pierre Drolet
Quote of the year:i
 1 cannot be represented exactly in binary...
/i
That's too funny altenbach! How many bits of precision do you need to
represent 1 exactly in binary??
=A6=AC



Re: Recursive Code Challenge

2004-06-04 Thread Jean-Pierre Drolet
Salut,

You are right. Formally, recursion can always be emulated with a data stack and a 
while loop.
Using a recursive call, the data stack is managed automatically as data space is 
created for each recursion level. The cost in
LabVIEW is efficiency.

A recursive call makes the code more simple to design. The recursive nature of the 
code is explicit which is not the case with a
while loop.

Other than that, there are no clear advantage for the recusive call.

Jean-Pierre Drolet
www.avensys.ca



- Original Message - 
From: Dominic Lavoie [EMAIL PROTECTED]
To: Info-LabVIEW [EMAIL PROTECTED]
Sent: Friday, June 04, 2004 9:15 AM
Subject: RE: Recursive Code Challenge


Salut.

Could someone explain in a simple way what are the advantages of making a function 
recursive instead of just making the data
recursive(arrays or strings) and building one function to play with that data(while 
loops)?






Re: Recursive Code Challenge

2004-06-04 Thread Jean-Pierre Drolet
When I said efficiency, I was refering to the fact that recursive calls are reputed 
inefficient in LabVIEW. I guess It is less
efficient to instanciate the VI space than to pre/reallocate an array for next data 
level.
Often it is not possible to figure how is big enough without first digging in the 
recursion tree.

It seems to me that recursion is needed when you you didn't think you would have 
needed it in the first place!!!
(design phase)

It is the nature of the task that requires recursion, not the designer to decide! But 
the programmer can implement it with recursive
calls or while loops.

Jean-Pierre Drolet
www.avensys.ca


- Message d'origine - 
De : Dominic Lavoie [EMAIL PROTECTED]
À : Jean-Pierre Drolet [EMAIL PROTECTED]; Info-LabVIEW [EMAIL PROTECTED]
Envoyé : 4 juin, 2004 10:13
Objet : RE: Recursive Code Challenge


Couldn't you just allocate a big enough stack to begin with, or allocate chunks of it 
as you go on(initialize and resize array) and
get an efficient behavior?

It seems to me that recursion is needed when you you didn't think you would have 
needed it in the first place!!!(design phase)






Re: ActiveX Remote access

2004-06-04 Thread Jean-Pierre Drolet
Look here:
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/38787589f325412186256de100671a8e?OpenDocument

Jean-Pierre Drolet
www.avensys.ca


- Message d'origine - 
De : Norman Kirchner [EMAIL PROTECTED]
À : Info-LabVIEW [EMAIL PROTECTED]
Envoyé : 4 juin, 2004 14:05
Objet : ActiveX Remote access


Is it possible to open an automation reference to an activeX control in
a VI running on another computer on the local network, and how?

On the Automation Open function there is a machine name option which
allows me to reference the other computer. I've selected the intended
class that I will be accesing, but I need that next step/configuration
on the remote machine that will complete the circuit.

 And they're off

Norman J. Kirchner Jr.
Automation Software Engineer
Engineering Specialists, Inc.
(262)783-8000
(262)783-8001 Fax





Re: ActiveX Remote access

2004-06-04 Thread Jean-Pierre Drolet
Sorry, it is there:
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B123AE0CBA64111EE034080020E74861p_node=DZ52051p_source=External

Jean-Pierre Drolet
www.avensys.ca

- Message d'origine - 
De : Norman Kirchner [EMAIL PROTECTED]
À : Info-LabVIEW [EMAIL PROTECTED]
Envoyé : 4 juin, 2004 14:05
Objet : ActiveX Remote access


Is it possible to open an automation reference to an activeX control in
a VI running on another computer on the local network, and how?

On the Automation Open function there is a machine name option which
allows me to reference the other computer. I've selected the intended
class that I will be accesing, but I need that next step/configuration
on the remote machine that will complete the circuit.

 And they're off

Norman J. Kirchner Jr.
Automation Software Engineer
Engineering Specialists, Inc.
(262)783-8000
(262)783-8001 Fax





Re: Comment sur chaque pts d'un graphe superposer un curseur

2004-06-04 Thread Jean-Pierre Drolet
Utilise la propri=E9t=E9 Cursor List (ou l'=E9quivalent fran=E7ais). C'es=
t
un array de propri=E9t=E9s de tous les curseurs. Le nombre d'=E9l=E9ments d=
ans
l'array d=E9termine le nombre de curseurs que tu auras.



Re: How would you recommend that I schedule a file-creation...

2004-06-03 Thread Jean-Pierre Drolet
To avoid polling you could calculate (in a separate loop) the amount
of time left before the next save and then feed this time to the
timeout of a wait notification node. When the notification times out,
write file. Other processes can control/abort this loop sending
notifications to the loop e.g. when the wait notification node
returns, you check for notification data or a timeout.



Re: [W] user specific LabVIEW ini file

2004-06-02 Thread Jean-Pierre Drolet
Jason,

Like others have said, have a shortcut with the -pref switch on the command line.

I use to have one shorcut and one labview.ini file for each project. That has the 
advantage to set the default directory to the
project directory and to have a different Recently Opened Files lists.

For those using builtin SCC, setting different default directories for projects allows 
to use different SCC repositories and
settings.

Jean-Pierre Drolet
Avensys
www.avensys.ca





Re: Turning off right click on table in 6.1

2004-06-01 Thread Jean-Pierre Drolet
There is a VI setting to disable right clicks when the panel is
running in VI PropertiesWindow AppearanceCustomizeAllow Run-Time
shortcut menus. This will disable RCmenus for all the FP.

For an indicator, you can disable it to prevent the RC menu to appear.
However, the user won't be able to select and copy data from the
content.



Re: How to reopen a same vi ?

2004-06-01 Thread Jean-Pierre Drolet
Qu=E9b=E9cois.
Quand le template VIT (avec l'extension VIT, pas une instance Template
N.vi)est en m=E9moire et que tu ouvres une r=E9f=E9rence au template, tu ne
cr=E9es pas une nouvelle instance. Tu ouvres simplement une nouvelle
r=E9f=E9rence au template. C'est pourquoi tu ne le vois s'ouvrir qu'une
seule fois.

Une fois que ton VI appelant a ouvert une r=E9f=E9rence, ouvert la face
avant et lanc=E9 le VIT, il peut fermer la r=E9f=E9rence; le VIT va
continuer de tourner.

Il ne faut pas que le VIT soit en m=E9moire pour cr=E9er diff=E9rentes
instances. C'est =E0 dire que la face avant est ferm=E9e et que toutes les
r=E9f=E9rences sont ferm=E9es.
Lorsque tu ouvres une r=E9f=E9rence alors que le template n'est pas en
m=E9moire, alors une nouvelle instance et une nouvelle face avant est
cr=E9=E9e =E0 chaque r=E9f=E9rence que tu ouvres.

Donc si tu viens d'=E9diter ton template, tu fermes la face avant avant
de lancer ton VI Top Level. Le VIT va aussi rester en m=E9moire
lorsqu'il est copi=E9 sur le clipboard ou sur le diagramme d'un VI
appelant.



Re: can I see Labview discussion Forums in Outlook Express

2004-05-31 Thread Jean-Pierre Drolet
Or a href=news:\\newsgroups.ni.com\comp.lang.labview;Click
Here/a.



Re: can I see Labview discussion Forums in Outlook Express

2004-05-31 Thread Jean-Pierre Drolet
Copy the link in your internet browser...



Re: How to reopen a same vi ?

2004-05-28 Thread Jean-Pierre Drolet
It is just that the template VI must not be in memory when you want to
instanciate it. Make sure that the template is closed before running a
new instance.



Re: cluster names and data types

2004-05-28 Thread Jean-Pierre Drolet
Joolz,

In LV7 (don't know about LV6.1) get the bValue/b property and feed
it to the VI located at a href=c:\Program Files\National
Instruments\LabVIEW
7.0\vi.lib\utility\GetType.llb\vi.lib\utility\GetType.llb\Get Type
of Variant.vi/a. The output is an enum with the data type.

If the VI is not in LV6.1 then it is time for yet another shameless
plug for the LabVIEW Data Tools in the OpenG Toolkit at a
href=http://openg.org/tiki/tiki-index.php?page=OpenG+Toolkit;OpenG.org/a
and use bGet TDEnum from Data/b.



Re: Is there something to reset all indicators when the VI is open?

2004-05-20 Thread Jean-Pierre Drolet
In the VI Properties, execution options, there is a checkbox bClear
indicator when called/b. That clears graph when the VI is called or
when a top level VI is run. If your subVI is set to open FP when
called, that will do what you want. If you open the panel using VI
Server, you may also use the VI method bReinitialize All To
Default/b.



Re: Can I call a labview VI from a batch file?

2004-05-18 Thread Jean-Pierre Drolet
Scott,

Be sure to enclose the path to LabVIEW and started VI within double quotes, e.g.

C:\Program Files\National Instruments\LabVIEW 6.1\labview.exe c:\path\to\Vi.vi

To start LabVIEW without the batch file waiting until it's done, use the start 
command:
start  c:\program files\national instruments\labview 6.1\labview.exe 
c:\path\to\Vi.vi

The first argument is for the window title and is left as empty double quotes.
It works on W2K and it should be the same for Win98.

Jean-Pierre Drolet
www.avensys.ca


- Original Message - 
From: Scott Serlin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 17, 2004 5:33 PM
Subject: Can I call a labview VI from a batch file?


With much frustration, I cannot seem to get my labview vi to run from a
batch file.  Everything appears ok in terms of the directory and
filename but I keep getting a bad filename error message.  Anyone have
any ideas around this?  I also tried using the call command with no such
luck.  Windows 98 is the OS run lv 6.1.






Re: Type issues in LV

2004-05-07 Thread Jean-Pierre Drolet
To some extent, you can compare two variants using bEqual?/b
comparison nodes. There are some issues as 0.0(DBL) will be different
from 0(U32) and NaN(DBL) will be equal to NaN(DBL) (IEEE spec requires
that (NaN == NaN) should return False).

Take a look at LabVIEW Data Tools in the OpenG Toolkit at
http://openg.org . There are tons of VIs to manipulate variant data.



Re: how can I do cluster with both indicators and controls

2004-05-03 Thread Jean-Pierre Drolet
Je crois que tu as simplement besoin d'un peu de temps pour t'habituer
=E0 la fa=E7on de programmer avec LabVIEW. Il est normal de s=E9parer les
commandes et les indicateurs.

Sur la face avant du VI, rien ne t'emp=EAche de regrouper visuellement
les donn=E9es. Habituellement, quand je dois faire une interface usager,
je rend invisibles les contours des clusters et je regroupe ensemble
les commandes/indicateurs dans un cadre(d=E9coration). Il n'est m=EAme pas
n=E9cessaire d'utiliser des clusters car tu peux faire un bundle dans le
diagramme pour regrouper les donn=E9es (et l'inverse). Bref il arrive
souvent que la structure des donn=E9es telle que pr=E9sent=E9e =E0 l'usager
soit diff=E9rente que celle que tu utilise sur le diagramme. Si tu veux,
publie ton VI dans ce forum et on pourra regarder quelle est la
meilleure fa=E7on de g=E9rer ton interface.



Queues and built application

2004-04-14 Thread Jean-Pierre Drolet
Hi,

I have a LV7 built application that works well on many computers here but, of course, doesn't on the customer's computer.

As far as I can tell, the queue (LV6 VIs) of the UI state machine doesn't work as none of the events queued are triggered while event structure works when event is managed immediately instead of being queued.

The culprit computer is a Compaq Evo N600s running Windows 2000.

Has anybody encountered similar problem? (before I spent the rest of the week to nail it myself...)

Jean-Pierre Drolet
Avensys



Localized units

2004-04-08 Thread Jean-Pierre Drolet
Hi

Can someone tell me if LabVIEW localizes units abreviations such as ft (foot) and d 
(day)?
In French LabVIEW will they be displayed as pi (pied) and j (jour)?
Thanks

Jean-Pierre Drolet
Avensys



Re: Compiler error: Code could not be generated

2004-04-08 Thread Jean-Pierre Drolet
The VI compiles in LabVIEW 6.0.2. You are using version 6.0. Since the
problem seems fixed, you should upgrade to 6.0.2.



Re: How can I obtain a reference to a global variable?

2004-03-25 Thread Jean-Pierre Drolet
Hint: an excellent answer provided with a working example certainly
worths a ! (it's four stars rating... not censored =A6=AC)
It may not be the solution you expected but it is not the poster's
fault after all...



Re: How do I define symbolic constants?

2004-03-23 Thread Jean-Pierre Drolet
With LabVIEW 7 you can use a ring constant with non sequencial value.
They take less diagram space than a global and the same ring can hold
several related values. The best is to save the ring as a strict
control typedef so that all occurences of the ring will change when
you modify the typedef.

If you have symbolic constants defined in terms of each other, e.g.b

#define array_len 100
#define array_size array_len*sizeof(data_type)

/bthen you'll have to use VIs to compute the values. Use the VIs
directly or use them to initialize globals.



Re: Alternative info-LabVIEW list

2004-03-22 Thread Jean-Pierre Drolet


 I would like to see Info-LabVIEW on a news (NNTP) server.

 
 I sure hope this doesn't happen... I have tried and tried to get our IT guys
 to open up NNTP for me. They simply won't do it... I am sure there are many
 others in the same situation
 

Scott, 

Would it be possible for the mailing list to be mirrored on a news server?
This way one could browse messages by threads with one's favorite news client.
 I remember having read somewhere that some company (is it NI?) does that internally 
to distribute the Info-LabVIEW mailinig list.

I don't mean a public USENET newsgroup but maybe a private news server accessible only 
to the list subscribers.

Jean-Pierre Drolet
Avensys




Re: serial TX completion

2004-03-11 Thread Jean-Pierre Drolet
It is not something I've tested actually but if you use bVISA
Write/b node, the help says: Right-click the node and select bDo
I/O Synchronously/b from the shortcut menu to write data
synchronously. The operation returns only when the transfer
terminates.

Take also a look at bVISA Flush I/O Buffer/b. With a mask 32, it
is supposed to return after the TX buffer is emptied.



Re: Communicating Between Built LV App.s

2004-03-02 Thread Jean-Pierre Drolet
It will work fine but still requires TCP for VI Server operation...



Re: PushOK CVS proxy

2004-02-23 Thread Jean-Pierre Drolet
Craig,

There is a tool called LVDiff written by Ian Dees at SourceForge that allows to 
compare VIs from TortoiseCVS. You just have to enter
the tool path in TCVS settings to have it lauch LabVIEW VI comparison tool with the 
two revisions to compare automatically.

Jean-Pierre Drolet
Avensys

- Original Message - 
From: Craig Graham [EMAIL PROTECTED]
To: Jim Kring [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, February 23, 2004 4:12 AM
Subject: Re: PushOK CVS proxy


 Yeah, I use Tortoise, but doing it inside Labview would give me the
 advantage of being able to view the changes between two versions, if I
 understand right.

 I guess I could manually check out two versions to two different directories
 and do a compare manually, but that's more hassle. Less hassle than screwing
 the registry though, since there are many hits on the term vss and some
 don't look like I should play.





Re: Text Selection and Font Color Bug?

2004-02-17 Thread Jean-Pierre Drolet
The problem is that you rewrite the whole text on the indicator and
LabVIEW has no clue that you just append new text and want to keep
current colors.

To fix this you have to keep a table of position/attributes and
recolor the string each time the string is rewritten.



Re: Associate a type of file with a LV7 app

2004-02-12 Thread Jean-Pierre Drolet
Ha! my pet topic.

Alas the solutions proposed previously won't work when LabVIEW is already running...

The trick is to build a small executable and then associate the file extension to it. 
This small application, reads the file path
from the command line and then launches LabVIEW (if necessary) and runs the 
appropriate VI using the VI Server. That requires the
TCP VI Server be enbled on LabVIEW. The launching applications then quits and is ready 
for the next call.

Jean-Pierre Drolet
Avensys




[W] Image acquisition

2004-02-08 Thread Jean-Pierre Drolet
Hello all.

I'm not familiar with image acquisition and I have to communicate with a CCD camera, 
Photometrics CE 300, using its driver PVCAM.
The camera acquires a spectrum and the only processing required is to sum horizontal 
or vertical lines into bins.

I have LabVIEW 7 Pro and I would like to know if someone here can tell me what else is 
required to get this job done.

Thanks

Jean-Pierre Drolet
Avensys.




Re: [W] Image acquisition

2004-02-08 Thread Jean-Pierre Drolet
Hamid,

I have to upgrade an old Turbo Pascal (DOS) application to LabVIEW with the currently 
perfectly working hardware. The camera is
cooled with liquid N2. I've already began to write an interface to their  PVCAM DLL 
and it shouldn't required more than a dozen of
CLNs to get what I need.

Thanks to those who replied.

Jean-Pierre Drolet
Avensys


- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Info-LabVIEW
Sent: Wednesday, February 04, 2004 3:54 PM
Subject: Re: [W] Image acquisition



Hi Jean-Pierre;

I had to look for this particular camera (photometrics 300). I did not spend much time 
but it seems to me that the camera is made
by Roperscientific and they also provide the frame grabber (PCI bus). By the sound of 
it, I guess the camera is RS170 and most
probably
has some special features which makes is so special! (I guess it communicates with the 
card).

Now, I don't know what exactly you want to do? I guessed you want to write a 
particular program in LV.

If you want to have the functionality of PVCAM (I think it is Roper's software) then 
you will need more information
regarding their DDL's and most probably their SDK.

If you can get hold of the pointer to the pixel values in the memory, (assuming you 
would know the image format)
then the rest of the job is a piece of cake!

But getting hold of that pointer may not be an easy job.

What would I do? I would buy a frame grabber from NI and a compatible camera according 
to my application and then
IMAQ 7 and viola!

If you need further help please contact me

Regards


+
Dr. Hamid R. Yazdi
Federal Mogul
Manufacturing technology
3935 Research park drive
Ann Arbor, MI 48108

Tel: 734 222 4108




Re: Unable to install when 32GB free space available

2004-02-02 Thread Jean-Pierre Drolet
Not absolutely crazy, I think.

I vaguely remember having had this problem once, and maybe not with
LabVIEW. However, I think the older installer receives the free disk
size modulo 2GB (I32)or 4GB (U32) so you may have to create a file
large enough just to get under 32GB or 30GB free space boundary. If I
remember correctly, I solved this by duplicating the Windows or other
large directory.

Not easy to explain to a customer...Good luck!



Re: Programatically Changing Cluster Size

2004-01-08 Thread Jean-Pierre Drolet
Eric,

It is not possible yet for the Array to Cluster node to adapt to the size of the 
output it is wired to.
However in the OpenG LabVIEW Data Tools, there is a VI Array to VCluster that 
converts an array into a variant cluster of the same
size of the array. Wire your array to the input of that VI and wire the variant output 
to the Variant to G Data primitive and then
to your cluster. When Variant to G Data is not wired directly to a typed input (such 
as a tunnel to a structure) the wire may be
broken. Connect a local variable of the cluster to the type input of Variant to Data 
node.

Basically, Array to VCluster takes the flattened data of the array and formats it in 
cluster flattened data and dynamically
generates the type descriptor of a cluster having the same number/type of elements as 
the array. Flat Data and type descriptor are
then converted into a variant using the primitive Flattened string to Variant.

You could probably make a subVI out of this piece of code and, using a typedef for the 
cluster, have code that doesn't break when
the cluster size is changed.

Jean-Pierre Drolet
Avensys