Re: Pascal code to labVIEW vi

2004-02-25 Thread Bupe
mad props to you Brian, you really did give me something to work with.
The idea of using the inport vi's was really great as I mentioned and
I am glad to say that I got my code to work and read from my circuit.

The line that reads

'if (port[MSR] AND $10)=$10 then inc(value)'

was what puzzled me and now I realised that it means read whats on
that particular address port[MSR] then AND it with hex value 0x10 and
if the results of the operation is equal to '0x10 or (16 Decimal)'
then increment the value (the MSB is set) else do nothing. Thanks
again for pointing me in the right direction.

I still don't get how this actually works (gets the actual value) but
looking at the code I did, I know exactly how it runs and what it
does.

Thanks again, i owe you some stars...

Bupe



Re: Pascal code to labVIEW vi

2004-02-25 Thread Brian Powell
You can use the "And" function with integer inputs.  One of the inputs
comes from InPort, and the other is a constant hex 0x10.  The result
of the "And" will also be a numeric.  You can test this result with
the "=0?" function.  If the result is zero, you do nothing.  If the
result is non-zero, you know the 0x10 bit must have been set.  So,
you'll then increment your "value" as in the code above.

Does this make sense?

Brian



Re: Pascal code to labVIEW vi

2004-02-17 Thread Brian Powell
Rather than use VISA, you might consider using the Port I/O functions.
This would make for a more straightforward translation of your
program.

Brian