You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old January 16th, 2020, 08:08 AM   #1
matejak14
Member
Serbia

matejak14 is offline
 
Join Date: Jan 2020
Location: Belgrade
Posts: 4
Twincat 3 - Refactoring

Hello everyone,

I have a problem with TwinCAT 3. When I want to rename a variable, the name is changed only at this position, but not in other places where that variable is used in the software. I have already checked in the TwinCAT options (Tools > Options) under category TwinCAT > PLC Environment > Refactoring but everything is already turned on. Also in the Beckhoff documentation is written that when I select variable under refactoring there is rename option, but in my case, there is no rename (See in the picture).


Thank you in advance,

Best regards, Mateja
  Reply With Quote
Old January 16th, 2020, 09:19 AM   #2
g.mccormick
Lifetime Supporting Member
United States

g.mccormick is offline
 
Join Date: Jul 2012
Location: IN
Posts: 711
Is there a global search and replace? There is in TC2
  Reply With Quote
Old January 16th, 2020, 10:15 AM   #3
matejak14
Member
Serbia

matejak14 is offline
 
Join Date: Jan 2020
Location: Belgrade
Posts: 4
Thank you very much for a quick answer. There is a global search but I am looking for a better solution because I need to change names for a lot of variables and also with refactoring error possibility is less.
  Reply With Quote
Old January 16th, 2020, 11:02 AM   #4
kolyur
Lifetime Supporting Member + Moderator
United States

kolyur is offline
 
kolyur's Avatar
 
Join Date: Oct 2004
Location: Wooster, Ohio
Posts: 1,488
Have you built your project since those variables were created? It's possible that TwinCAT requires a Build before the refactoring can work.
__________________
John
  Reply With Quote
Old January 16th, 2020, 11:40 AM   #5
kamenges
Member
United States

kamenges is offline
 
kamenges's Avatar
 
Join Date: Nov 2002
Location: Brillion, WI
Posts: 4,035
Its hard for me to tell from the screen snip you included but it looks to me like you are trying to rename an element in a structure. From all the examples I have seen the refactoring command takes effect at the tag level. I'm not sure refactoring applies to sub-elements of a tag. You may be stuck with search and replace.

Keith
  Reply With Quote
Old January 16th, 2020, 04:05 PM   #6
matejak14
Member
Serbia

matejak14 is offline
 
Join Date: Jan 2020
Location: Belgrade
Posts: 4
Thank you a lot for your help. Unfortunately still not working. I tried to build the project and rename a global variable but without success.

Last edited by matejak14; January 16th, 2020 at 04:18 PM.
  Reply With Quote
Old January 17th, 2020, 07:11 AM   #7
karlek
Member
Croatia

karlek is offline
 
karlek's Avatar
 
Join Date: Jul 2014
Location: Varazdin, Croatia
Posts: 68
Hello mateja,


I checked in my version of TwinCAT (3.1.4022.22) and I have the option you are mentioning (Rename variable). What shell are you using to run TwinCAT (VS 2013 here)? I have now checked my other computer (TcXaeShell) and I don't have that option.
Attached Images
File Type: png Refactoring.png (20.6 KB, 21 views)
  Reply With Quote
Old January 17th, 2020, 08:28 AM   #8
matejak14
Member
Serbia

matejak14 is offline
 
Join Date: Jan 2020
Location: Belgrade
Posts: 4
That's the problem exactly. I am using TcXyeShell. When I tried the same thing in Visual Studio everything works well.

Thank you very much for your help!
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Twincat 2 64 bit re-engineering not able to start derickloo LIVE PLC Questions And Answers 15 May 17th, 2018 01:31 AM
Problem how to link c++ app with twincat 3 mhismail LIVE PLC Questions And Answers 12 March 22nd, 2016 01:49 PM
TwinCAT EtherCAT Help Needed sujal.sheth LIVE PLC Questions And Answers 13 February 4th, 2015 10:19 AM
Beckhoff Twincat code download over slow network connections? matt_sd LIVE PLC Questions And Answers 0 June 27th, 2012 11:48 AM


All times are GMT -4. The time now is 03:20 PM.


.