I am using a shared variable that is defined in the RT target (cFP-2110) to transfer data from the host PC. The shared variable is a cluster of scaling parameters that needs to be stored in the RT target. The host PC is only connected temporarily for system setup and calibration.
There is only one instance of the shared variable in both the host PC vi and the target vi. The shared variable in the host is located in an event case that is activated when there is a value change. Everything works great until I make a value change in the shared variable. The target vi promptly slows from 30mSec to about 500 mSec and stays that way. The only way I can get the RT target to run full speed again is to recycle power or reset it.
What am I doing wrong?
Temporarily slowing down the RT target when the shared variable is updated is not a problem for this application. The problem is that I have to restart the target to get it running at full speed again.
I’m using Win-XP, LV 8.5.1 and FieldPoint 6.0.1
What is your code doing with the shared variable? Can you priovide and example? What kind of code are you using to read the change?
The host is sending the shared variable via an event case. When the event is activated, the data is sent to the target and it functions as expected, except that it slows down to a crawl. I have to restart the target to get it working up to speed again. The are no error codes.
The shared variable is a cluster of several items and it is attached.
In the mean time to promote the project, I split up the cluster into smaller clusters to use several shared variables and now I do not have a slow down problem. In other words, it works great. As an experiment I have sent the several small clusters at one time and I get the slow-down problem again.
I've come to the conclusion that large single cluster (which is attached) is too much to send at one time.
Please advise if there is something else to learn or understand.
Does the Program stop completely after you try reading the variable? Have you tried to read the variable multiple times? It's possible it might be a synchronization or buffering issue. Can you run the remote VI in highlight execution and see if it is hanging anywhere?
The program continues to run and it runs correctly with no errors. It just runs very slow (approx 500 mSec). It also remains connected to the host PC and continues to function properly. I have to do a power recycle to get to run at the wanted period (30 mSec).
I think what is happening is the time required to get the large amount of updated data is greater than 30 mSec and it "times out" and then it jams up internally; for lack of a better phrase. I've had very little time to work with it and now the project is released and will be difficult to get back to it. (The show must go on.) At this point I'm taking it as a lesson learned. This is the first time I have attempted to use such a large cluster for a shared variable.
I'm sorry to hear that this is an issue in a released version. If you do continue to troubleshoot it or face similar issues in the future you can use the error code to get a feel for what the code it doing. If something times out it will inform you through the error cluster.
The project was not released with the problem because it was solved by splitting up the cluster used for the shared variable into smaller clusters. I have looked everywhere I could think of to view error codes. For example, I connected all the error clusters that involved the large shared variable and the timed loop within the RT target prior to splitting up the shared variable. I would think there would be an error for it slow down like it does, but I’m not able to see any. Is there a specific area where I should look to view an error code for this? It's quite possible that I missed something.
It sounds like you were looking at the errors the way I expected with the error out clusters. If it timed out then it would tell you in the decription of the error. So maybe it isn't timing out. What timeout value are you using? Do you see any delay with the new setup?
Sorry it took so long to get back to you. Attached is a screen shot of the RT target timed loop setup. The target hesitates slightly as the list of small clusters are transferred from the host to the target.
Assuming you are in Austin, I would be pleased to go there and show you this if you are interested. I work in Cedar Park.
Can you attach the section of code that is doing this? Maybe create a VI that just reads that variable and make sure it replicates the issue.