> I would like to try and run our hard drive diagnostics by issuing vendor
> unique "AT" commands. Any ideas on how this could be done with VEE?
Over what interface? (ATA, ATAPI?)
> Do we need to write a driver?
Probably not. On a high level you can escape through DeviceIoControl and
send whatever you want. I don't remember the details, but went though it
once. Info is in the DDK. Basically, you call
CreateFileA("\\.\PHYSICALDRIVEx", ... where x is a physical drive number
beginning with 0. Then use the returned handle with DeviceIoControl. This
would be preferable to...
Then again depending on your spec you can always use the io port thingy and
send whatever you want to whatever ports you need to. This would suffice for
simple things - like if the tests are run by the drive and all you need to
do is gather reporting data. It won't get you sophisticated stuff like DMA.
However, if you're running through a serial port now I doubt this would be a
problem
Thirdly, if you actually *do* have to construct a driver, it can be *very*
painless - though you would need a good C programmer. You can customize the
ATAPI driver that comes with Windows. On the one hand, the old escape
sequence might have gone away by now (haven't done it for four years, so I
don't know what's current). OTOH, the current escapes may not provide enough
flexibility. If this is the case, just download & install the DDK. You get
the ATAPI driver source for free, and it won't be hard to modify. Just add a
few control codes that send what you need with buffers specifically
constructed to your needs. In this scenario you would also use CreateFileA /
DeviceIoControl from VEE.
-SHAWN-
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
> unique "AT" commands. Any ideas on how this could be done with VEE?
Over what interface? (ATA, ATAPI?)
> Do we need to write a driver?
Probably not. On a high level you can escape through DeviceIoControl and
send whatever you want. I don't remember the details, but went though it
once. Info is in the DDK. Basically, you call
CreateFileA("\\.\PHYSICALDRIVEx", ... where x is a physical drive number
beginning with 0. Then use the returned handle with DeviceIoControl. This
would be preferable to...
Then again depending on your spec you can always use the io port thingy and
send whatever you want to whatever ports you need to. This would suffice for
simple things - like if the tests are run by the drive and all you need to
do is gather reporting data. It won't get you sophisticated stuff like DMA.
However, if you're running through a serial port now I doubt this would be a
problem
Thirdly, if you actually *do* have to construct a driver, it can be *very*
painless - though you would need a good C programmer. You can customize the
ATAPI driver that comes with Windows. On the one hand, the old escape
sequence might have gone away by now (haven't done it for four years, so I
don't know what's current). OTOH, the current escapes may not provide enough
flexibility. If this is the case, just download & install the DDK. You get
the ATAPI driver source for free, and it won't be hard to modify. Just add a
few control codes that send what you need with buffers specifically
constructed to your needs. In this scenario you would also use CreateFileA /
DeviceIoControl from VEE.
-SHAWN-
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
This seems normal behaviour to me. If you set the top part of
your example ( say ) to 20 so that the statement is false then you will see
an output of 0 type real64 ( not sure why this is not type int, but that's
another issue! ).
The (A<10)*A is a 'trick' - all it does is say 'evaluate the expression, if
<> 0 then output to pin 1, otherwise pin 2'. It just so happens that A<10
and (A<10)*A both evaluate to non-zero but the output of the latter is
arguably more useful than that of the former.
What I think you are pointing out is: "don't use this construct".
I tend not to use this structure - either I use If/then/else for branching
flow, or I use the incredibly useful triadic operator y=(A<10?A:0).
Cheers,
Mike Watts
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".