Thank you, the checkbounds function identified an array problem. I still do not understand the exception (or why it was not thrown when the array was created) other than my code would 'sometimes' try to access restricted memory. The exception has not returned yet to verify all this, but I have a tool to find problems if it comes back.
Update: I took a working project and migrated changes in small parts. I tested each change and then copied the working project to a different folder. At some point, the project started throwing the exception. I tried to compare files but the .bootinfo was not helpful. HOWEVER, I then copied the 'working' project back to the original folder. The exception remains. I have verified that the two .project files are exactly the same. If I open the 'working' project in the sub folder, it works. Same .project...
The project is large and proprietary. The steps involved to trigger the exception also require a TCP client that is specific to this application. The general steps are: PLC starts, initialization complete, TCP Listener initialized, client begins TCP communication. During handshaking, an acknowledgement of the connection is retuned. While adding the ACK to a queue the exception is thrown. The TCP communications code has not changed for months. I can connect and communicate every time until the 'magic'...
I have project in 3.5 SP15 64bit that has been working fine for months. Today, I made a seemingly innocent change and suddenly I am getting the following exception: SOURCEPOSITION App=[Application] area=3, offset=1422839 EXCEPTION [<excpt>PriviledgedInstruction</excpt>] occurred: App=[<app>Application</app>], Task=[<task>CommunicationTask</task>] The exception occurs on the same line of code (which has not changed for weeks) no matter what I do. Undoing the last change does not fix the problem. I...
Thank you @i-campbell. Using testBools[x] in the mapping does work. I am trying to pass these points along to a client over a network and I would like to just send a bunch of Bytes (without manually converting them). The BOOL type does not map nicely to Bytes. I would like to do something like: InputBytes : ARRAY[0..9] OF BYTE; and then use 'InputBytes[0].2' in the mapping. However, this will not even compile. Using an array of BOOL makes the network sending messy. The benefit of the Union is that...
Hi, I am trying to cleanup some variable mapping. I have an I/O device that has its points defined as BIT. I would like to map these into an array of something but I cannot use an array of BIT. Mapping to an array allows me to access bits through a common FB so I only need to map the points once. I have created a Union based on a Forum response (https://forge.codesys.com/forge/talk/Engineering/thread/9613d49992/) and it seems to do what I would like. However, when I map the bits to my device, I get...
Hi, I am trying to cleanup some variable mapping. I have an I/O device that has its points defined as BIT. I would like to map these into an array of something but I cannot use an array of BIT. Mapping to an array allows me to access bits through a common FB so I only need to map the points once. I have created a Union based on a Forum response (https://forge.codesys.com/forge/talk/Engineering/thread/9613d49992/) and it seems to do what I would like. However, when I map the bits to my device, I get...
I did not know about the device configuration option, thank you. I have an 'axis' function block that encapsulates all the functionality of an axis. All the MC function blocks are included and cyclically called based on inputs to the main FB. My motion FB's are all called the same way, which is why this error is so frustrating. I cannot see any difference between my calls to MC_Power or MC_MoveAbsolute and my call to MC_Home. I would expect a different error if my drive object was not configured...
I am using Servotronix CDHD, Yaskawa Sigma 7 and Oriental Motor stepper drives. The CDHD is the drive I am currently trying to home. I can also home the axis directly from the drive so that is not the problem. Thank you.
I am using Servotronix CDHD, Yaskawa Sigma 7 and Oriental Motor stepper drives. The CDHD is the drive I am currently trying to home. I can also home the axis directly so that is not the problem. Thank you.
Hi, I have a motion project that is working fine except when I call MC_Home. My axis (AXIS_REF_SM3) is enabled, at Standstill, and I can move the axis just fine. But, when I enable my MC_Home FB, it aborts right away and the axis object (not the FB) gets a "smc_fb_wasn't_called_during_motion" error. One odd thing is that the 'instance' of the SMC_FBError is zero: All of my motion FB's are on the EtherCat task so that is not the issue. If I replace the axis object with a virtual axis (AXIS_REF_VIRTUAL_SM3)...
Hi, I have a motion project that is working fine except when I call MC_Home. My axis (AXIS_REF_SM3) is enabled, at Standstill, and I can move the axis just fine. But, when I enable my MC_Home FB, it aborts right away and the axis object (not the FB) gets a "smc_fb_wasn't_called_during_motion" error. One odd thing is that the 'instance' of the SMC_FBError is zero: All of my motion FB's are on the EtherCat task so that is not the issue. If I replace the axis object with a virtual axis (AXIS_REF_VIRTUAL_SM3)...
Hello, I have been looking around the forum but I am not finding what I am looking for. I have a motion project using virtual axes objects linked to real axis objects. The motion is working fine but I had a problem with objects on different cycles. I had my axis object setup to 'Use parent bus cycle' but my EtherCat Master was set to 'MainTask'. This caused my motion FB's to abort. I went through and changed all by axes to use 'MainTask' and this fixed my errors. I can look at hTask of my axes with...
Progress! The OT side was set to DHCP (I need to go back to the document. I though I saw that both sides use the same address...). So, now the eState reports CONFIGURED and I get green activity LEDs on the OT side. The example app uses Message Mode, but I will be using Stream in the final project. The EDS file looks the same but I will TRIPPLE check this. I am also looking at the EIP example project from the Codesys store (I had downloaded it a while ago, but never needed to open it...) and incorporating...
Hi, I am trying to add an Anybus .Net-to-Ethernet/IP gateway (AB9078-C) device to my Codesys project. I have an example PC application that came from Anybus with an EDS file. I have installed this file into my Codesys, configured the I/O according to the example and downloaded my project. In the device tree, the adapter displays a red triangle and the Status is 'Not Running'. If I look at the EtherNet/IP IEC Objects tab, I see eState = ENCAPSULATION_CONFIG but no faults. The documentation for the...