Questions tagged [twincat]

TwinCAT is a PC-based PLC automation software package made by Beckhoff Automation.

TwinCAT is a PC-based PLC automation software package made by Beckhoff Automation.

Links

Related Tags

421 questions
0
votes
1 answer

Error 262145 while trying to insert in SQL db with TwinCat 2

I am trying to insert data into a SQL Server database from TwinCat 2 program. When the trigger is activated, I am getting the following error: 262145 racer_name : STRING(256); racer_name := 'CS1'; FB_FormatStringC1_lap_db( sFormat:='INSERT…
ZhivkoPetkov
  • 33
  • 1
  • 5
0
votes
4 answers

TwinCAT Systemtime-Timestruct to milliseconds since epoch

I need to convert the timestruct I get from Beckhoffs function block "FB_LocalSystemTime" to milliseconds since epoch to receive the local computer time in milliseconds. Unfortunately I can't find a function to convert this timestruct. Any help is…
timosmd
  • 159
  • 11
0
votes
1 answer

TwinCAT 3 console message display

ADSLOGSTR(msgCtrlMask := ADSLOG_MSGTYPE_LOG, msgFmtStr := 'OSIO: %s', strArg := 'Autostrsys'); I'm using this function in TwinCAT 3, but when I'm running my code it's getting hanged because of ADSLOGSTR function. If I'm commenting this then it's…
0
votes
1 answer

How can I save .mat data from twincat?

I am using the below model for real-time control with twincat. I cannot get the .mat file in the folder. In the twincat environment, I have linked the object to the tcextendedfilewriter. I can obtain data from the workspace, but I cannot save data…
Eric
  • 1
0
votes
1 answer

Calculate acceleration from data points

I have a servo motor, and this servo motor I would like to make it follow a "motion pattern" as closely as possible, and use the same value for acceleration and deceleration. The attach picture illustrates the "motion pattern" (Y = velocity, X =…
Laurits S
  • 19
  • 5
0
votes
3 answers

TwinCAT : Getting a file (FB_FileGets)

I am developing a code to get a text file in twincat. I am using the block functions: FB_FileOpen FB_FileGets FB_FileClose I build on the example on the website…
hachete14
  • 3
  • 1
0
votes
1 answer

Import Beckhoff twinCAT scope view csv format into Matlab

I try to import data from twinCAT into matlab for analyzing. I have tried it with the code: Tb = readtable('LogTestScopeView1.csv'); But that didn't work. I guess the header of a twinCAT csv-file is a bit more complicated. Have someone experience…
0
votes
1 answer

Failed to read and write xml file with TwinCAT

I have a custom function block which can read or write xml files. It can also create a new file, if one with the current name already exists. It does that by appending a number to the filename. The first xml file is created without a problem (e.g.…
Roald
  • 2,459
  • 16
  • 43
0
votes
1 answer

FBD for TwinCat Beckhoff... Function Block Input Output How is this working

Seems IW_PR_Schrittnummer is only referenced in 3 spots... where it's declared and where its read in the fbd routine... I guess what I'm asking is something writing a number to this variable... or what? If so how would I find it... also what is the…
0
votes
0 answers

How to connect to a beckhoff CB3263?

We have a beckhoff cb3263 with some IO blocks on loan and I am trying to let it do anything. So far I am not a fan of TwinCat. I found it to be not user-friendly and very complicated. I can only hope that I can eventually write C++ programs for…
0
votes
1 answer

Can I access device commands in Lenze 9400 Highline servo drive with twincat3 via CoE?

I want to access and change parameters on a Lenze 9400 Highline drive, specifically the device commands. I know i can do it via the CANOpenOverEthercat with Twincat3 but i don't know exactly how. I already have the drive as a device in my Twincat…
0
votes
1 answer

Why dont the try catch statements work in TwinCAT 4024.7

I'm trying the newly implemented try/catch statements which are available since TwinCAT 4024.0. However, I'm getting the following error when compiling: The codegenerator for the current device does not support structured exception…
Roald
  • 2,459
  • 16
  • 43
0
votes
1 answer

TwinCAT 3.1 fCoE read and write with Complete Access

I am attempting to perform complete access read and writes to an EtherCAT slave controller using TwincAT 3.1 on Windows 10. Generated EtherCAT Slave Stack Code using the Beckhoff Slave Stack Code Tool 5.12. Successfully able to enter operational…
embedcrazy
  • 11
  • 1
0
votes
2 answers

TwinCAT 3 using FTP Functions

I am trying to use FTP functions on CX8190 (Beckhoff). I want to use FB_FTP_HostResolve, then FB_FTP_Open and after FB_FTP_FileUploadEx to upload a CSV file on FTP Server. I used that way already on other PLCs of Beckhoff and also on this one…
0
votes
1 answer

32/64 bit WiX Combined Installer-Copying files only

I have an msi that copies files (PLC Code) to a directory(C:\Product\3.1\Boot), and modifies one key. My visual studio project generates different PLC Code for the different architectures, but the destination is the same on both platforms. They key…
Gene Parmesan
  • 211
  • 2
  • 8