01-31-2011 04:50 PM
I am using a NI Embedded Vision System RT and interfacing it through a Windows 7 Host computer. I have some shared variables including a 2MByte image shared variable deployed on the RT target which is being read by the Host constantly. I am getting an extra 100msec delay every once in a while. I am wondering if it is due to the image shared variable. How is it implemented differently than the other shared variables? What would be the impact if I deployed it on the Host side instead?
02-01-2011 08:33 PM
Hi Arnieb
The Image Data type is a reference to image data unlike normal data types which contain the data themselves. This typically results in pretty big differences when it comes coding in LV and data flow. Usually transferring the image data type is not deterministic of image size because of this (aka transferring reference to memory where something is stored over transferring the data itself).
I am assuming you do not have your shared variable set to Real Time FIFO. This should reduce the chances of the non deterministic windows OS effecting the data transfer.
<Joel Khan | Applications Engineering | National Instruments | Rice University BSEE>
02-02-2011 05:52 AM
I guess I didn't mention that I am using network published shared variables, so it must be raw data that is being sent over the network. I am using RT FIFOs.
02-03-2011 11:19 AM
Arnieb,
Are you able to tell where the 100ms delay is coming from? Is it on the side of the timed loops on the LV RT system, or are you seeing the delay over the transmission, or are you seeing the delay on the windows side.
With large files like a 2mb file its important to break it down and transfer in smaller chunks in order to reduce the chances of delays.
<Joel Khan | Applications Engineering | National Instruments | Rice University BSEE>
02-03-2011 11:40 AM
Actually, I miscalculated and they are only 1.3MByte images. The delays are coming in a timed structure when it blocks 33msecs to acquire an image.
Since you indicated that the images should be broken up, the implication is that the image is transferred all at once. If I break the image into 2 or 4 images but still write them to the image variable successively will it cause the same delay? Actually, I suppose I would either have to use a multi-element FIFO or maintain multiple image variables.
Is there a recommendation for size limit or just make the image chunks as small as possible and practical?
Is there an impact on the performance when the host is reading the image variable. For example, the host is reading it every 50msecs..
I tried to deploy the image variable on the host and bind it on the target (which is doing the writing) but I get a "process failure" displayed in the Distributed Systems Manager. Am I missing a service on the host side?