Search the Community
Showing results for tags 'twincat'.
Found 16 results
NEED HELP, TwinCat 3 NCI SlaveAxis
LauMotion posted a topic in Other PLCsi am trying to set up dual motors "master and slave" on a X axis in TwinCat NCI , so far i don some test with "MC_GearIn" but i keep getting this error "Error 40 14-05-2016 11:27:39 417 ms | 'TCNC' (500): NC-Ctrl (R0), Cannot configurate axis 4 into group 4 because a slave is coupled or this axis is a slave itself (CoupleState: 1) !!" when i activate NCI. also i did try using a virtual axis as X and link two slave , but i get the same result :( anybody knows how to do this ?
Twincat3: Can't connect to LabVIEW's Modbus TCP/IP server via Tc2_ModbusSrv library (on virtual PLC)
szlaur.jakub posted a topic in Other PLCsI am trying to create a simple `Hello World` Modbus TCP/IP program using Twincat3 and virtual PLC (PLC running locally on my computer). I have set up a LabVIEW Modbus TCP/IP master + slave program (both of which are working see screenshots below). I can send data between LabVIEW's master and slave programs. And also read the data from Python script (so I know for sure they are all working). Now I have tried to create a Twincat3 program to set some registers using Beckhoff example What I have tried: - I have tried changing the ipAddr parameter to: 'localhost', '192.168.88.1', '192.168.88.126' - Also I have tried the nUnitID set to: 0, 1, 16#FF (16#FF as specified by Beckhoff docs) This is my Beckhoff code: PROGRAM MAIN VAR ipAddr : STRING(15) := '192.168.88.1'; //Tried also 192.168.88.126 and 192.168.88.1 'localhost' M0 AT %MB0 : ARRAY [0..3] OF WORD; nValue : ARRAY [0..3] OF WORD; fbWriteRegs : FB_MBWriteRegs; bWriteRegs : BOOL; END_VAR IF NOT bWriteRegs THEN nValue := nValue+1; nValue := nValue+1; nValue := nValue+1; nValue := nValue+1; bWriteRegs := TRUE; fbWriteRegs.sIPAddr := ipAddr; fbWriteRegs.nTCPPort := 502; fbWriteRegs.nUnitID := 16#FF; //Tried setting this to 0,1 and it also and didnt work ... fbWriteRegs.nQuantity := 4; fbWriteRegs.nMBAddr := 16#3000; //Tried: 16#3000, 0, 1 fbWriteRegs.cbLength := SIZEOF(nValue); fbWriteRegs.pSrcAddr := ADR(nValue); fbWriteRegs.tTimeout := T#5S; fbWriteRegs (bExecute:=TRUE); ELSE IF NOT fbWriteRegs.bBUSY THEN bWriteRegs :=FALSE; fbWriteRegs (bExecute:=FALSE); END_IF fbWriteRegs (bExecute:=FALSE); END_IF What should I change in my code in order to make this example work? Thank you in advance for any support! Info about LabVIEW programs: I am using the Modbus TCP Master / Slave examples The IP address is set to localhost and the port to 502 (which should match the IP address in my Beckhoff code) I am 100% sure it works because I have also tried connecting to this program via Python script. Picture of my LabVIEW programs:
CX9020 Beckhoff PLC Project Upload Failure
mick1994 posted a topic in Other PLCsDear All, I had encounter a problem when i try to open the plc project from Beckhoff CX9020 plc using Twincat 2. There error show that the File'source.dat' could not be read. I had connected the plc from system manager and i able to load the configuration of plc but not the program. I do also tried to file the program file from the flash card but i cant find any .pro file. Is that any possible to read the program or source code inside? Thanks.
Twincat 2.11 different time
saruans posted a topic in Other PLCsHello, Hello, I am using twincat v2.11. I have different time with computer timer and Twincat system time difference about 6 hour. How need synchronize twincat system time with PC time?
Beckhoff CX5020-0120-M310 can't read data from Siemens 1SI RS232 on ET 200s
deividasn posted a topic in Other PLCsHi i have Beckhoff (CX5020-0120-M310) (profibus master) with TC3.1 and want communicate with Siemens Profibus ET 200S (IM151) DPV1. All modules works on ET200s except 1SI RS232 (6ES7138-4DF01-0AB0). When i triggered Barcode scaner i have one bit ON on no more data from 1SI module. on Array (0..15) of words 0.#0000000000000000 1.#0000000000000001 <= this bit is ON after trigered pushbutton on scaner 2.#0000000000000000 3.#0000000000000000 ..#0000000000000000 ..#0000000000000000 15#0000000000000000 This Same ET200S with this same configuration i have tested with Siemens S7-300 and it works, i can read data from Barcode scanner on the 0..31 array of byte (no WORD's like on CX5020) Siemens have On Communication => ET200s serial interface => Function block S_RCV i use them and i can communicate with 1SI RS232 via this block. But Twincat 3,1 don't have this block. On ET200s i have: 1. 1SI(rs232) module (rs232 parameter is : Data - 8bit, Stop - 1 bit, Parity - NONE, Data Flow - NONE, Interface type RS232-C ) 2 DO modul 3 RTD modul 4. DI 5. RO modul Any ideas where are problem? why can't read data from 1SI RS232?
Beckhoff PLC servo connection EtherCAT to MR-J4-TM servodrive
grvchy posted a topic in MitsubishiHello All I am new to Mitsibishi servodrive, i am using a Beckhoff PLC TwinCAT3 and MR-J4-TM servo drive from mitsubishi , i connected the servo to the NTwinCAT using etherCAT. I was able to write a program where i was able to activate the servo from the TwinCAT using the mc_Power instruction . My question is , i am not able to run the servo using the mc_movevelocity and mc_moverelative . Do any one have any suggestion to how to go from here .. datei_Mr-J4-TM_TwinCat_EtherCAT.pdf
[SOLVED] What is the purpose of a variable w/ no assignment ?[IEC 61131-3 (ST)]
andre_teprom posted a topic in Other PLCsHello, The program I'm working on, which was written by another professional who does not work in the company anymore. My doubts lie in the programming language itself, namely IEC-61131-3 (ST). In a section of the program (PRG) code, a BOOL variable appears without any assignment or evaluation, only itself followed by a semicolon, as this: PLC_Ok; I did not understand what the purpose of this, could anyone give an insight ? Thanks in advance.
Twincat 3: Problems with visualisation and Global Variables
Bram posted a topic in Other PLCsI’m working on a project in twincat 3 from Beckhoff in which I made a Global variables list, a function block and a visualisation. When I call the FB in the program I made and add some of the Global variables to this FB, I can’t control them in any way. Nor in the visualisation, nor in my program itself. What do I have to do to make these Global variables work?
Twincat 2 with Motion control (Maxon motor) and torque sensor
TwinCAT Newbie posted a topic in Other PLCsHi, I'm new to TwinCAT 2 and i'm upgrading a long time design (hence the TwinCAT 2 reference), to read a more sensitive torque signal. I'm using a Beckhoff CX1030 as my PLC Controller. I needed to add 'homing' to my motor sequence and confirmed with Maxon, im using the function blocks correctly and in the correct sequence to establish my 'absolute zero'/'home' position. The motor has an output to write to: ControlWord, which tells the motor that the position it is sitting in is '0.' My program compiles, it runs, it writes each function block, but it's not seeming to get back to the test run opMode, even though i tell it to and the function block performs the 'Write' function. it's stuck at zero and not reading an analog input signal from my torque sensor. so im getting an artificial torque reading through every test. i think this is related to my tare motion. I start the program, home the motor, get into profile velocity mode, tare my sensor, enter profile position mode, go back to position 0, then back to profile velocity mode, run a test, sample data, go back to 'home' or '0.' I wonder 1st, is my variable not linked properly through the system manager? 2nd, i set a boolean variable to set the 4th bit to 1 in my control word write (setting the 4th bit high will set my current position to absolute zero), but did i not connect the program to the main sequence properly? looking to read a valid signal again and see that my motor moves back to 'home' each time. Do i not need to home the motor after the tare, since the tare nulls out the torque value after the tare? after this i need to program my sample period, instead of it being fixed, as it is currently written and then use my home position as my trigger to start sampling.... Beckhoff applications department is overloaded, currently and can't help and this is all beyond the knowledge of the general support line. I've gotten fairly far, on my own, but of course, the project is under a time crunch. Does anyone know twincat well enough to help guide me?
Mahmoud Nabil posted a topic in Other PLCsHi all.... I have bc9000 plc and there are 2 problems I face,the first is when the power is off ,the downloaded program does not remain. the second is how to configure internal register with system manager.
Beckhoff Control panel testing?
acuralegendz posted a topic in Other PLCsI am a technician at a large repair facility and we often have Beckhoff control panel displays come in for repair. I'm having trouble using Twincat to set up the buttons on a CPxx to test the buttons and assignable leds. We have a PC running windows XP with the twincat software, a CP9035 pci card to connect the CP to the pc, i can see the PC's display on the CP and also recognize the CP in twincat, just unsure how to map testable functions to the keys on the CP. Hope this all makes sense. Hopefully there is a Twincat guru out there that knows how to do this. Thank you!!
Beckhoff PLC Counter
DeadPool posted a topic in Other PLCsHi everyone, I need some help with my PLC programming. I am currently using a twincat 2 software and a Beckhoff CX 8090. Basically, the gist of my program is to send and receive data and datalog the input data received from the sensors and timestamp the received data for every 1 second. I want to create a boot up counter where it will count the number of times my data logging program has restarted(if it did). This boot up counter serves as a health monitoring check to ensure that my program is running perfectly and thus, not restarting randomly when it shouldn't. I am more familiar with structured text so if you have a solution, kindly post it in structured text form. Your help would be greatly appreciated. Best regards, DeadPool
Vijeo Citect and Beckhoff OPC problem - all values are shown as zeros
jacek28x posted a topic in HMI & SCADAHello, I am responsible for implementation of Vijeo Citect 7.4 SCADA in my company. I want to connect to Beckhoff PLCs by using Twincat OPC Server. I can control and observe the variables through OPC Control tool, but when I add the device and variables to my Citect aplication, they are always equal zero. I cannot also force through Citect to change the value. I don't know where the problem lies. If you need additional information, please ask me. I will provide you with all the data I have. Thank you in advance. beckhoff_opc.bmp
My goal is: HMI development in Win 64-bit while supporting old HMI and TwinCat 2.11 PLC in Win-32 bit. Current PC setup: - Windows 7 64-bit for developing HMI in Visual Studio; - TwinCat 2 for x64 Engineering installed; - VMware Workstation installed on same PC; - XP mode VM imported to Workstation; - 32-bit Twincat 2.11 is installed and running in XP mode VM.
Problems with lost comm to Beckhoff CX-19FDB8 PLC
MathHead posted a topic in Other PLCsI am using a Beckhoff windows based controller, with TwinCAT modular I/O (EL series). I have several problems: 1) Our HMI frequently loses comm. with the PLC. Beckhoff seems to use their own special networking. 2) The PLC ladder language supported is very rudimentary. For example, I had to create my own function block just to do simple analog scaling. 3) Their documentation is pretty bad -- Web based and very hard to find specific information. I would like to replace the Beckhioff controller with a more standard industrial PLC (like Automation Direct Productivity -- I like the programming language and ease of use.) My question is -- how can I use the existing Twincat I/O with AD, for example Modbus TCP. Is there some sort of gateway available for this purpose?
Twincat System Manager & PLC Control, Beckhoff BC9020
Gregifrett posted a topic in Other PLCsHi, I have a problem with my BC9020 and hope that someone can help me. I managed to set the IP adress of my PLC in the 10.2.5... add a root, run a program and make the PLC working for a while. I then tried another program, a new one... and now that I want to re-read the first program, Twincat System Manager doesn't allow me to enter in the "run mode" and stays in "config mode". It also has lost the IP address I set (10.2.5.....) and came back to the 172.16.22... (manufacturer settings) I cannot determine if the problem is in the PLC Control or In System Manager... This is my method to change the IP *** IP config *** 1) Reset the PLC First I place the end terminal next to the PLC. I set the DIP switches 1,6,7 to ON, power on the PLC and power off. I set the DIP switches 2,6,7 to ON, power on the PLC and power off. I set the DIP switches 1,2,6,7 to ON, power on the PLC and power off. 2) Set my PLC on the same AMS than my own IP (172.16.22...1.1) 3) In System Manager, add a new route 4) change the setting in I/O Configuration -> I/O Device -> Device 2(BX9000) -> clic on BX9000 define "set IP Address" to Manual define " IP Address" to 10.2.5...., the AMS change automatically. Press the configuration button and then Ctrl+F4 (run mode) This method worked but seems not to be the best... If you have any Ideas ? or questions? Thank you in advance Gregi