Search talk: byte to words

 
<< < 1 .. 10 11 12 13 14 .. 167 > >> (Page 12 of 167)

Post by dantheman on Connecting to SoftPLC Only Works By Turning Off Modbus Ethernet Port CODESYS Forge talk (Post)
I have an IPC with 2 ethernet ports and 1 Wi-Fi. I'm using ModbusTCP with the ethernet port named "enp2s0" connected to my remote I/O. This works fine when testing with Python and also works with CODESYS, but CODESYS is only able to scan for the Linux SoftPLC when I turn off the "enp2s0" interface. In other words, I can't get online with the IDE if I want my ModbusTCP comms to run with CODESYS. I'm using a Linux SoftPLC that has the following entry in CODESYSControl.cfg, hoping that this will allow me to connect with "enp1s0" or "wlp3s0", and leave "enp2s0" for field comms, but this seems to only make the source IP of the ModbusTCP comms to be bound to "enp2s0". That last point is the case only if I don't restart the service, but if I do restart the service after changing the config file, the source IP for the ModbusTCP comms then becomes the one for "enp1s0", which is very confusing to me: [SysSocket] Adapter.0.Name="enp2s0" Adapter.0.EnableSetIpAndMask=1 On the device list, I only have "enp2s0" given as the ethernet device that has the ModbusTCP master & slave beneath it, shown in Screenshot 1. On the IPC, I can ping the ModbusTCP client (remote I/O) from "enp2s0", and I've attached a Wireshark capture of running ModbusTCP from the CODESYS runtime as Screenshot 2, 3 & 4 (again, I can't get online when this is running, I have to turn off "enp2s0" to connect even when it's idle and I don't have an active TCP session with my Python tests). Like I explained above, the source IP is "enp1s0", even though the ethernet device on the project is "enp2s0". I was lucky to catch the red message that showed the source IP that makes sense to me (the one for "enp2s0"), but for some reason that connection was reset and I never saw that packet again. I've also tried this with Auto-reconnect both enabled & disabled, for the ModbusTCP Master device. I also have to turn off "enp1s0" and then turn it on, just so that I can have the ModbusTCP comms running from "enp2s0" (which is not intuitive in any way to me, I'd love some help understanding that phenomenon as well) in the weird manner that I've described above. I would be very appreciative if someone can help me figure out this pickle. I'd love to just connect to CODESYS through my Wi-Fi interface and leave my ethernet ports for field comms.
Last updated: 2024-08-01

Post by jickisticki on Witch library? CODESYS Forge talk (Post)
Crafting my Fellowship Personal Statement was like weaving the threads of my aspirations into a tapestry of words. Each sentence became a brushstroke, painting a vivid portrait of my journey and ambitions. Beyond being just a document, it became a mirror reflecting the depth of my experiences. Like a conductor guiding an orchestra, my personal statement was composed to resonate with my unique voice. In the realm of specialized opportunities, this statement serves as a compass, guiding me toward the next chapter of my professional growth. With each word, I felt the guidance of mentors shaping my story into an eloquent narrative.
Last updated: 2023-08-17

Post by ruobian on Analog Input Delay Timer CODESYS Forge talk (Post)
Hello there, I am new here and in programming. I need help with the basics. I am trying to do what I mentioned in the title. I have an analog input. So I have a real or integer data type value. I want to delay it. TON and TOF only work with bool. I think there is a function block that has two inputs, 1 for real or int and 1 for bool. And if bool is true, it will give the output as real or int. I don't know but I need something like this. Actually, it is not exactly like that. In other words, it will not show the real value at the input at the output after a certain period of time. I want it to show the real value from 2 seconds ago continuously. The purpose of doing this is to compare the real value I received with the value from 2 seconds ago and find out whether it went up or down. I am using only FBD. Please help me with this. Thanks in advance.
Last updated: 2024-08-20

Post by sumit on Not able to see input data coming from eip adapter on codesys CODESYS Forge talk (Post)
dhumphries, I changed the datatype this time from BYTE to USINT (because that's what my adapter is sending: array of uint8_t). The text "New Help String" you saw in previous screenshots is just the description of the input/s (it can be anything). I also looked into the logs (see attached) for that ! sign next to the device, I found that connection is being timeout. I tried some suggestions from online such as increase the RPI but still got connection timeout issue, also by changing the datatype, I still don't see incoming data from the adapter, although its visible on wireshark. thanks,
Last updated: 2024-03-07

Post by vipul on Multicast udp CODESYS Forge talk (Post)
Hi, Good afternoon can anybody help me with UDP Multicast code. I am not able to send or recieve data when code is dumped on linux device. Below is my code. Declaration: PROGRAM udp_multicast VAR oneTimeFlag :UINT :=0; state: INT:=0; driver: UDP.UDPDriver; //port : UDP.Port;//moved to GVL src_ipAddr_ud: UDINT; src_ipAddr_st:STRING := '192.168.127.155';//'192.168.1.155';//ipms ip address dst_ipAddr_ud:UDINT; group_ipAddr_st:STRING := '239.1.5.10'; //group_ipAddr_ud:UDINT; result: SysTypes.RTS_IEC_RESULT; //result of recieve function. bind: UDINT; //result of binding. resultCreate:SysTypes.RTS_IEC_RESULT;//result of port creation. timer:BLINK; temFlag :INT:= 0; post:INT :=0; checksumFunc:checksumXor; localStringBuf:STRING[500]; chksum:BYTE; dataBuffer:POINTER TO BYTE; checksumString:ARRAY[0..5] OF BYTE; recvSize:__XINT; errorCode:UDINT; joinGroupErrorCode:UDINT; END_VAR ************8 Implementation: IF oneTimeFlag <> 1 THEN oneTimeFlag:=1; resultCreate := driver.CreatePort(ADR(GVL.port)); src_ipAddr_ud := UDP.IPSTRING_TO_UDINT(sIPAddress:= src_ipAddr_st); GVL.group_ipAddr_ud := UDP.IPSTRING_TO_UDINT(sIpAddress:= group_ipAddr_st); GVL.port.IPAddress := src_ipAddr_ud; GVl.port.ReceivePort:= GVL.src_port;//port on which messages are expected. GVl.port.SendPort := GVL.dest_port; GVl.port.OperatingSystem := 0; //0- any system GVL.port.Socket :=3; //3- socket type is multicast bind := GVL.port.Bind(udiIPAddress:=src_ipAddr_ud,); GVl.port.JoinGroup(udiGroupAddress:= GVL.group_ipAddr_ud,udiInterfaceAddress:= src_ipAddr_ud,eLogCode=>joinGroupErrorCode); END_IF timer(ENABLE:=TRUE,TIMELOW:=T#100MS,TIMEHIGH:=T#100MS); IF timer.OUT = TRUE THEN GVL.port.Send(udiIPTo:=GVL.group_ipAddr_ud,GVL.dest_port,pbyData:=ADR(GVL.writeData),diDataSize:=SIZEOF(GVL.writeData)); ELSE SysMemSet(ADR(GVL.readData[0]),0,SIZEOF(GVL.readData)); result := GVl.port.Receive(ADR(GVL.readData),diDataSize:=SIZEOF(GVL.readData),udiIPFrom=>dst_ipAddr_ud,diRecvSize=>recvSize,eLogCode=>errorCode); SysMemMove(ADR(GVL.readDataBuf[0]),ADR(GVL.readData[0]),SIZEOF(GVL.readData)); END_IF post:=LEN(GVL.readDataBuf);
Last updated: 2024-01-14

Post by ara32 on CODESYS 4 Linux: CODESYS Forge talk (Post)
Hello! I managed to correctly launch CODESYS Developer Studio 3.5.17, almost all functionality works. The only issue remaining is that when connecting to a device and obtaining its public key, the NCryptEncrypt function is called, which is not fully implemented in the DLL source code, resulting in the connection not being established. Currently, the code of this function in the Wine repository looks like this: SECURITY_STATUS WINAPI NCryptEncrypt(NCRYPT_KEY_HANDLE key, BYTE *input, DWORD insize, void *padding, BYTE *output, DWORD outsize, DWORD *result, DWORD flags) { struct object *key_object = (struct object *)key; TRACE("(%#Ix, %p, %lu, %p, %p, %lu, %p, %#lx)\n", key, input, insize, padding, output, outsize, result, flags); if (flags & ~(NCRYPT_NO_PADDING_FLAG | NCRYPT_PAD_OAEP_FLAG | NCRYPT_PAD_PKCS1_FLAG | NCRYPT_SILENT_FLAG)) { FIXME("Flags %lx not supported\n", flags); return NTE_BAD_FLAGS; } if (flags & NCRYPT_NO_PADDING_FLAG || flags & NCRYPT_PAD_OAEP_FLAG) { FIXME("No padding and oaep padding not supported\n"); return NTE_NOT_SUPPORTED; } if (key_object->type != KEY) return NTE_INVALID_HANDLE; return map_ntstatus(BCryptEncrypt(key_object->key.bcrypt_key, input, insize, padding, NULL, 0, output, outsize, result, flags)); } The program crashes due to the NCRYPT_PAD_OAEP_FLAG flag. I'm not proficient in C++, but I attempted to add handling myself, and here's the result: SECURITY_STATUS WINAPI NCryptEncrypt(NCRYPT_KEY_HANDLE key, BYTE *input, DWORD insize, void *padding, BYTE *output, DWORD outsize, DWORD *result, DWORD flags) { struct object *key_object = (struct object *)key; TRACE("(%#Ix, %p, %lu, %p, %p, %lu, %p, %#lx)\n", key, input, insize, padding, output, outsize, result, flags); if (flags & ~(NCRYPT_NO_PADDING_FLAG | NCRYPT_PAD_OAEP_FLAG | NCRYPT_PAD_PKCS1_FLAG | NCRYPT_SILENT_FLAG)) { FIXME("Flags %lx not supported\n", flags); return NTE_BAD_FLAGS; } if (flags & NCRYPT_NO_PADDING_FLAG) { FIXME("No padding not supported\n"); return NTE_NOT_SUPPORTED; } BCRYPT_OAEP_PADDING_INFO oaepInfo = { 0 }; oaepInfo.pszAlgId = BCRYPT_SHA1_ALGORITHM; NTSTATUS status = BCryptEncrypt(key_object->key.bcrypt_key, input, insize, &oaepInfo, NULL, 0, output, outsize, result, flags); if (key_object->type != KEY) return NTE_INVALID_HANDLE; return map_ntstatus(BCryptEncrypt(key_object->key.bcrypt_key, input, insize, padding, NULL, 0, output, outsize, result, flags)); } Now, when calling the connection, it crashes with the error "bcrypt:BCryptEncrypt flags 0x4 not implemented." Can anyone help with enhancing this functionality or at least point me in the right direction?
Last updated: 2024-03-22

Post by pazderai on CanOpen write issue CODESYS Forge talk (Post)
Hi,is there any canopen library where is implemented sdo write with unspecified datalength (command byte 0x22)? I tried caa cia405 canopen library but it doesnt support this, but my slave device accept only 0x22. Thank you for any help.
Last updated: 2024-07-16

Post by pazderai on CanOpen write issue CODESYS Forge talk (Post)
Hi,is there any canopen library where is implemented sdo write with unspecified datalength (command byte 0x22)? I tried caa cia405 canopen library but it doesnt support this, but my slave device accept only 0x22. Thank you for any help.
Last updated: 2024-07-16

How to configure CODESYSControl_User.cfg in order to use a specific network card for OPCUA Server CODESYS Forge talk (Thread)
How to configure CODESYSControl_User.cfg in order to use a specific network card for OPCUA Server
Last updated: 2023-08-28

how to transfer raspberrypi runtime license from sdcard to dongle without the original raspi? CODESYS Forge talk (Thread)
how to transfer raspberrypi runtime license from sdcard to dongle without the original raspi?
Last updated: 2021-04-13

What is the best way to upgrade a project to a new version of Codesys? CODESYS Forge talk (Thread)
What is the best way to upgrade a project to a new version of Codesys?
Last updated: 2022-03-01

I want to use the function of PVT to realize move CODESYS Forge talk (Thread)
I want to use the function of PVT to realize move
Last updated: 2013-05-14

How to intercept a variation in the RetainPerstist variables (for saving to file) CODESYS Forge talk (Thread)
How to intercept a variation in the RetainPerstist variables (for saving to file)
Last updated: 2018-08-03

How to set "Always updatevariables" to "enable 2" by default in DeviceDescription. CODESYS Forge talk (Thread)
How to set "Always updatevariables" to "enable 2" by default in DeviceDescription.
Last updated: 2020-12-10

Specify Input Configuration "OnDialogClosed" Action to only react to certain Dialogs CODESYS Forge talk (Thread)
Specify Input Configuration "OnDialogClosed" Action to only react to certain Dialogs
Last updated: 2023-10-02

Can't connect to my raspberry pi 3 after I tried to adjust CODESYScontrol.cfg CODESYS Forge talk (Thread)
Can't connect to my raspberry pi 3 after I tried to adjust CODESYScontrol.cfg
Last updated: 2021-06-17

How to connect Codesys Control win v3 to an ethercat device CODESYS Forge talk (Thread)
How to connect Codesys Control win v3 to an ethercat device
Last updated: 2021-04-26

How to generate PDO explicit request with RTR flag to TRUE CODESYS Forge talk (Thread)
How to generate PDO explicit request with RTR flag to TRUE
Last updated: 2018-06-13

Codesys closes instantly after I try to download to PLC CODESYS Forge talk (Thread)
Codesys closes instantly after I try to download to PLC
Last updated: 2022-12-21

Unable to get retain variables to work in a specific Raspberry Pi project CODESYS Forge talk (Thread)
Unable to get retain variables to work in a specific Raspberry Pi project
Last updated: 2019-12-03

Cannot convert type 'Unknown type: 'ADR(tabOrderIdArray)" to type 'POINTER TO ARRAY [0..0]OF INT' CODESYS Forge talk (Thread)
Cannot convert type 'Unknown type: 'ADR(tabOrderIdArray)" to type 'POINTER TO ARRAY [0..0]OF INT'
Last updated: 2021-04-26

what to do in case of a writing error to eeprom CODESYS Forge talk (Thread)
what to do in case of a writing error to eeprom
Last updated: 2020-11-26

Beaglebone Black - only one Ethernet port - how to connect to LAN, and EtherCAT? CODESYS Forge talk (Thread)
Beaglebone Black - only one Ethernet port - how to connect to LAN, and EtherCAT?
Last updated: 2022-01-16

Trying to Use Python Script to Exclude Certain Objects from Build CODESYS Forge talk (Thread)
Trying to Use Python Script to Exclude Certain Objects from Build
Last updated: 2019-08-20

Attempt to upgrade a pi 3 from a working V3.5.11 to V3.5.15 fails CODESYS Forge talk (Thread)
Attempt to upgrade a pi 3 from a working V3.5.11 to V3.5.15 fails
Last updated: 2021-07-13

<< < 1 .. 10 11 12 13 14 .. 167 > >> (Page 12 of 167)

Showing results of 4164

Sort by relevance or date