In my attempt to retrieve a tag value from a sinumerik 840d system through Ignition, I have provided the tag details for reference. The value obtained is in a DBD format, which seems to be the only successful method so far. Despite trying out Ignition's addressing method, it only resulted in an error_config message. The current setup successfully reads values, which also go down to zero when the machine stops. However, it is noted that the value is a 32-bit DBD and requires conversion into a regular integer. For further clarification, please refer to the attached images. As a beginner in this field, any guidance on this matter would be greatly appreciated.
Are you sure you're not trying to read a double integer instead of a float value? This is not an integer; it is a float (real) datatype.
Parky pointed out that the data type selected may not be accurate, as it appears to be a float instead of an integer. Could the issue be related to reading a double integer instead of a float (real)? Regardless of the selected data type, the output remains consistent, only varying in format. This begs the question if there is an underlying encoding issue causing this discrepancy.
ank03 raised a concern about the consistent output of the same value despite selecting different data types. This discrepancy in formats prompts speculation about a potential encoding issue. Could the stated value of 1,116,902,400 possibly translate to around 73.29 instead? Expanding on this inquiry may shed light on the underlying problem.
ank03 mentioned that they find value in using DBD, as it is the most effective method for them. Have you considered trying out DBR (REAL) as an alternative approach?
Are you wondering if the struct module is available in Ignition's Python/Jython? If you're looking to pack and unpack data in Python, you may be interested in using the struct module. For example, you can convert an integer to a float using struct.pack and struct.unpack functions in Python.
It sounds like you've made good progress so far. To convert the PLC data type DBD (Double Word Binary) to an integer, you might want to try using Ignition's built-in expression functions. To be specific, you could use the 'toInt' expression function to change the DBD to an integer. But remember, since DBD is a 32-bit value, you need to ensure that the value does not exceed the upper limit of integers, which is 2147483647. If the value exceeds this limit, the conversion might cause an overflow error. Can't wait to hear more about your project!
You're on the right track, but more often than not, issues like these may be the result of incorrect data-type handling. Translating 32-bit DBD into an integer within Ignition might require you to implement a script for this conversion. Ignition uses Jython (Python implemented in Java), which could be utilized for this task. An alternative approach could be to try and cast the DBD into an INT within the PLC itself if possible, then directly read it with Ignition. Remember to ensure that the endianness matches between your PLC and Ignition for proper data representation. If you continue encountering the error_config message, double-check the addressing method. Good luck and don't hesitate to ask more questions!
It sounds like you're on the right track by using the DBD format, but getting that conversion right can definitely be tricky. You might want to take a closer look at how Ignition handles raw data types—sometimes there are built-in functions or scripts that can help with converting DBD to integer. Also, make sure that your tag configurations in Ignition align with how the 840D represents that data. If you're still running into issues, sharing your conversion code or any specific error messages could help others give you more pinpointed advice. Keep at it, and don’t hesitate to lean on the community for support!
It sounds like you’ve made some good progress already! Since you’re dealing with a 32-bit DBD format, you might want to look into using Ignition's scripting capabilities to convert that value into a standard integer. A simple way to handle the conversion is by using a script to read the DBD as a byte array and then process it accordingly. If you’re getting that error_config message, double-check the addresses you’re using in your tags and make sure they align with the Sinumerik's documentation, as sometimes small discrepancies can cause communication issues. Don't hesitate to ask more specific questions if you run into further roadblocks—this community is really helpful!
âś… Work Order Management
âś… Asset Tracking
âś… Preventive Maintenance
âś… Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: Answer: The DBD format appears to be the most successful method for retrieving the tag value. It is noted that Ignition's addressing method may result in an error_config message.
Answer: Answer: To convert the 32-bit DBD value into a regular integer, additional steps may be required. Please refer to the attached images for further clarification.
Answer: Answer: The behavior of the tag value going down to zero when the machine stops is a common occurrence in certain setups. It may be related to the real-time data being read from the system.
Answer: Answer: For beginners seeking guidance on retrieving tag values from a Siemens PLC system using Ignition, reviewing step-by-step guides and seeking assistance from experienced users or forums can be beneficial.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.