03-11-2011 10:19 AM
Hi HKH,
Are you getting a broken wire in LabVIEW when you try to put a script reference into a queue? I was able to wire one up with no problem by just wiring the script reference wire into the Element Data Type terminal of an Obtain Queue VI.
Also, you should be able to use the NI-845x Close Reference VI to delete a script.
Best Regards,
John M
03-22-2011 05:57 AM
Hi John,
Are you getting a broken wire in LabVIEW when you try to put a script reference into a queue?
I don't know exactly where I did wrong, but I did get a broken wire.
But, for some reason, I have now succeeded generating a script queue and it works perfectly.
For now, not as per the producer/consumer principle, but sequential. It doesn't really matter, as I have a much bigger problem.
I have a while loop that only does the following: 1) deducts the scripts from the queue 2) executes the deducted script, and 3) deletes the script.
I beleive that the active loop of the program has been scraped down to a minimum.
But I still have a delay in between the executions of the scripts of approx. 1½ ms.
Could it simply be the time it takes for the device to read in the script via USB? Can I speed this up in any way?
Best regards,
HKH
03-23-2011 02:11 PM
Hi HKH,
Do you have any delay in your while loop? If you do, that is one reason that the gap between scripts would be extended. Other than that, you are on the right track with your suspicion that there is some delay as the script is transferred via USB. If your loop is only running the scripts (with no additional delay) then unfortunately there isn't anything else that can be done to cut down on that time between scripts.
Best,
John M
03-24-2011 07:43 AM - edited 03-24-2011 07:44 AM
Hi again,
@John_M. wrote:
Do you have any delay in your while loop? If you do, that is one reason that the gap between scripts would be extended.
Nope. I do not have any other delays.
I am not an USB expert, but I suspect that the driver provided sets up and closes an USB connection every time a script is executed.
I am thinking that either I should try and write my own USB driver or I must find another setup for the SPI communication.
So much for a 12 MHz USB SPI device, when the driver needs 2-3 ms to set up communication for the script every 64 (max) write operations...