Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]The $getTag() method cannot get the value of the internal data #1479

Open
yy783 opened this issue Nov 5, 2024 · 5 comments
Open

[BUG]The $getTag() method cannot get the value of the internal data #1479

yy783 opened this issue Nov 5, 2024 · 5 comments

Comments

@yy783
Copy link

yy783 commented Nov 5, 2024

Describe the bug
Execute the function of opening the card and bind an internal variable A to S7 variable B, click the button to execute the script on the Open Card interface, the input parameter is the internal variable A, the script content is console.log($getTag(a)), and the printed result is undefined.

To Reproduce
Steps to reproduce the behavior:

  1. Draw a square, set the click event to Open Card, bind an internal variable to an S7 variable
  2. There is a button in the interface of the card being opened, and the click event of the button is: execute the test script console.log($getTag(a)), and a is the internal variable bound when the card is opene. The script mode is client
  3. Edge browser output is undefined
@unocelli unocelli added the feature New feature label Nov 6, 2024
@unocelli
Copy link
Member

unocelli commented Nov 6, 2024

Hi, since internal device is only accessible on the frontend, it could be possible to add the feature for scripts in client mode

@yy783
Copy link
Author

yy783 commented Nov 11, 2024

The mode I'm using is the client mode, I printed the object with the target id in $getTag, but there is no “value” attribute, so the $getTag() method always returns undefined

@unocelli unocelli added need more info and removed feature New feature labels Nov 13, 2024
@unocelli
Copy link
Member

Hi, I try to understand your description and I am confused to understand what your purpose is

@yy783
Copy link
Author

yy783 commented Nov 14, 2024

For example, there is an S7 variable called “LQB1_RunByte”, and there is an internal variable called “runByte”. In the click event of a certain element, it is set to “Open Card” to open “view1” and bind “runByte” and “LQB1_RunByte”. There is a button in “view1”, and when the button is clicked, the "Client-Mode" script "console.log($getTag(runByte))" is executed. The script prints a "null" or "undefined" result. My goal is to create a common card interface for objects of the same type.

@yy783
Copy link
Author

yy783 commented Nov 14, 2024

bug1_1
bug1_2
bug1_3
bug1_4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants