Troubleshooting Array Data Retrieval Issue with GSV in Studio 5000 v33

Question:

In an attempt to gain experience with arrays, I am currently practicing using Studio 5000 v33. Within my program, I have a rung set up with an XIC bit connected to a push button input, along with an ONS and a GSV function copying data to a specified destination, button_press_log[10,7]. My goal is to store multiple time stamps within this array. Despite not receiving any errors and configuring the necessary fields in the GSV, such as WallClockTime, DateTime, and Button_Press_Log[0,0], I am facing issues when trying to retrieve data. Even after restarting my system, the array monitor shows no data except for the manually entered values. I have also attempted removing the ONS function without success. Any assistance on this matter would be greatly appreciated as I continue to troubleshoot the issue.

Top Replies

One important question to consider: Are the left and right rails of your logic displaying a green color? It's crucial to understand that while the XIC and its surrounding rung may be illuminated in green, it doesn't necessarily indicate that the logic is actively running. This could simply mean that particular bit is activated, especially if it's an assigned input or alias.

plvlce asked a common question about PLC programming: Are the left and right rails of your logic displaying green? Keep in mind that just because the XIC instruction and the rung it's on are highlighted in green, it doesn't necessarily mean the logic is functioning correctly. It could simply indicate that the bit is on, especially if it's a physical input or an alias. It's important to check both the XIC instruction and the overall logic for complete functionality.Click to read more...I quickly realized that the issue was simply a matter of being in program mode instead of run mode. Sometimes, it's easy to overlook the obvious when troubleshooting. Thanks for pointing me in the right direction.

Your issue may be stemming from attempting to store data from a 1-dimensional array (DINT[7], as used in WallClockTime) into a 2-dimensional array (Button_Log[10,7]). The incorrect array type is causing the GSV command to not function properly. To improve results, consider storing the GSV result into a standard DINT[7] array, and then copying DINT[0] to Button_Log[Index,0] with a length of 7. Alternatively, there may be other underlying issues to address.

Aardwizz pointed out that the issue may be with attempting to store data from a 1-dimensional array (DINT[7]) into a 2-dimensional array (Button_Log[10,7]), causing the GSV command to not function properly. To resolve this, it is suggested to first store the GSV result in a regular DINT[7] array and then transfer the data to Button_Log[Index,0]. Ensuring you are in "rem run" mode instead of "rem prog" mode can also impact the functionality. Additionally, making adjustments to shift and index the data in the 10-position array may be necessary for smoother operation.

plvlce raised an important inquiry: Are the left and right rails of your logic displaying green? It's crucial to note that just because the XIC and the rung surrounding it are highlighted green, it doesn't necessarily indicate that the logic is actively running. This could simply mean that that particular bit is activated (which may happen if it's an input or an alias). Keep in mind that the presence of green rails does not guarantee logic execution; it could simply mean that a JSR exists leading to it. A cautionary note to remember is that green rails do not always indicate logic execution. This is a lesson learned the hard way by mistakenly duplicating a JSR. If you encounter this issue, try toggling the bit between JSR | ROUTINE_OLD and JSR | ROUTINE_NEW to resolve it. This mistake led to confusion when troubleshooting ROUTINE_OLD, as it was not being called due to the duplicate JSR. To avoid this in the future, consider renaming the routine to ROUTINE_NO_JSR and erasing the unnecessary JSR reference.

It seems like you are doing everything correctly. However, I would suggest checking the scope of your array variable. In Studio 5000, variables can be either Controller or Program scoped. If the scope of your array is Program, then it might not be accessible where you are trying to use it. Try changing the array scope to Controller or making sure your GSV is occurring within the same program scope as the array. Also, ensure your GSV function is executing properly - sometimes it might not throw an error even if there's an issue with its execution.

Hi there, it seems like you're on the right track with setting up the GSV to copy to your array. One typical problem that might be causing the issue is the array index. Ensure that you're actually incrementing the array index each time the button is pressed. It’s quite easy to forget about incrementing and end up overwriting the same array element over and over. If that's not the problem, you might also want to double check the data type of your array - make sure it's capable of storing the data provided by the GSV function. Lastly, if you're still having issues, trying to isolate the problem by testing each part of your configuration separately could be helpful. All the best with your troubleshooting!

More Replies β†’

Streamline Your Asset Management
See How Oxmaint Works!!

βœ…   Work Order Management

βœ…   Asset Tracking

βœ…   Preventive Maintenance

βœ…   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

FAQ: 1. Why am I facing issues retrieving data from an array in Studio 5000 v33 despite configuring the GSV function correctly?

Answer: Answer: The issue could be related to the configuration of the GSV function parameters or the way data is being stored in the array. Double-check your GSV function settings, array dimensions, and how data is being written to the array to ensure everything is set up correctly.

FAQ: 2. How can I troubleshoot the problem of not being able to retrieve data from the array in Studio 5000 v33?

Answer: Answer: You can start by verifying that the data is being written to the correct locations in the array. Ensure that the array dimensions match the data being written, and review your program logic to confirm that the data is being stored properly.

FAQ: 3. What steps can I take if the array monitor in Studio 5000 v33 shows no data except for manually entered values?

Answer: Answer: Firstly, recheck the configuration of the GSV function and make sure the data is being written to the correct elements of the array. Additionally, consider reviewing your array indexing and data storage methods to identify any potential issues.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  β†’