cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Moving Strings and Longs from ODBC with Advanced Link Tags

JR_10809048
3-Newcomer

Moving Strings and Longs from ODBC with Advanced Link Tags

I have used Link tags successfully with standard data types but am having difficulty with strings and DateTime.

I am trying to move data from an ODBC/MYSQL database.  The standard data is moving fine, but two types are not moving correctly.  Strings, DATETIME, and Long variables.  The ODBC driver reads LONGs as strings, so essentially it is string-type and Date-type links that aren't moving.  I created the links using the GUI instead of typing them by hand, so the fields are correct.

Quick Client shows the data read into the tags in the ODBC device tags, but in the PLC tags on the output of the links are all quality BAD/value UNKNOWN. DWords are reading correctly.

Any thoughts?.

 

 

1 REPLY 1
ntripathi
14-Alexandrite
(To:JR_10809048)

Greetings @JR_10809048 

 

Handling data types like strings and DateTime in link tags can sometimes be tricky, especially when moving data from an ODBC/MYSQL database.

 

  • Strings and Longs:
    • Since the ODBC driver reads LONGs as strings, you might encounter issues when moving data. Ensure that the data types are consistent between the source (ODBC) and destination (PLC) tags.
    • Verify that the link tags are correctly configured to handle string-type and Date-type data. Double-check the field mappings and ensure they match the expected data types.
    • If the PLC tags show BAD quality or UNKNOWN value, consider the following:
      • Check if there are any data conversion errors or mismatches.
      • Inspect the data in Quick Client to see if it aligns with your expectations.
      • Review the link configuration and verify that the data flow is correctly set up.

 Feel free to provide more details or ask for further assistance if needed!

Announcements


Top Tags