Activity for laruso

  • laruso laruso posted a comment on discussion Engineering 🇬🇧

    I implemented the parts from the CAA Device Diagnosis Example.project and could use it for switching on and off, the CAN devices that were located under the CANbus and CANopen_Manager. But i can't do the same with I2C_master_test_version or devices below this one. In the example project there is only the EtherCAT Master, CANbus and CANopen_Manager, and Ethernet with devices below.

  • laruso laruso posted a comment on discussion Engineering 🇬🇧

    I also struggle with low performance and long waiting times during compiling while cpu load is around 20 %. Fastest is with energy option of 100 % as maximum cpu power, but even then it takes 10-30 seconds. Because my internal fan is not good controlled and speeds on every 15 seconds and then throttle down but quite constantly active, I tried to decrease the maximum cpu power in the energy option down to 99 % (constant low fan) and 98 % (fan mostly off or constant low) without any problems with other...

  • laruso laruso posted a comment on discussion Deutsch 🇩🇪

    You can find my solution on this issue here: https://forge.codesys.com/forge/talk/Runtime/thread/3d46e97553/#5be1 Man kann meine Lösung zu dem Problem hier finden: https://forge.codesys.com/forge/talk/Deutsch/thread/8a6a09a000/#2d58

  • laruso laruso posted a comment on discussion Runtime 🇬🇧

    You can find my solution on this issue here: https://forge.codesys.com/forge/talk/Runtime/thread/3d46e97553/#5be1 Man kann meine Lösung zu dem Problem hier finden: https://forge.codesys.com/forge/talk/Deutsch/thread/8a6a09a000/#2d58

  • laruso laruso posted a comment on discussion Runtime 🇬🇧

    Because there is something wrong with the initalization andthe preconfigured values (inputs) from the library are used. I found solutions for the issue "not being able to change the outputs, before a dump via linux shell": quick and dirty: change the preconfigured value in the library for your needs. Use 16#FF for Inputs and 16#00 for outputs: IO_A : BYTE := 16#FF; IO_B : BYTE := 16#FF; more usually one: reinitialize the port configuration on request. Add this code in the library to the case structure...

  • laruso laruso posted a comment on discussion Runtime 🇬🇧

    I really appreciate your changes on the library regarding the polarity of inputs. Additionally I tweaked it a little bit to controll this for each port with a variable. What do think?

  • laruso laruso posted a comment on discussion Deutsch 🇩🇪

    Ich habe eine Lösung für das Problem "die Ausgänge werden nicht gesetzt, bevor nicht ein Dump über die Linux Shell ausgeführt wurde": Schnell und einfach: Ändere die vorkonfigurierten Werte der Bibliothek nach den Bedürfnissen ab. Benutze 16#FF ffür Eingänge und 16#00 für Ausgänge: IO_A : BYTE := 16#FF; IO_B : BYTE := 16#FF; Etwas gebräuchlicher: Reinitialisiere die Port Konfiguration auf Anfrage. Füge diesen Code in der Bibliothek der Case Struktur des FB hinzu: 10: IF REINIT THEN _iState := 0;...

  • laruso laruso posted a comment on discussion Deutsch 🇩🇪

    Hallo , ich habe leider das gleiche Problem wenn ich das Gerät "MCP23017 IO Expansion Board" an einem BeagleBone Black betreiben möchte. Die Eingänge werden in CODESYS sofort erkannt. Die Ausgänge schalten nachdem sie in CODESYS geändert werden erst dann, wenn per linux shell einmal "i2cdump -y 2 0x27" ausgeführt wurde (die Adresse meines Boards ist ohne Veränderung 0x27 und nicht 0x20). Danach schalten sie bei jeder Änderung in CODESYS. Benutzt habe ich die Gerätebeschreibungsdatei und die Bibliothek...

  • laruso laruso modified a comment on discussion Runtime 🇬🇧

    In the documentation of the Add-on "CODESYS Control for BeableBone SL", under point "Preparing the PLC", there is the hint to deactivate "Real-Time group scheduling"with this code segment: CONFIG_RT_GROUP_SCHED=n but I don't know were to put (very weak doku here). The only place I found it, was in the kernel configuration files, found in /boot/config-<kernel name="">. But these file must not be edited.</kernel> In the default kernel configuration files (ti, non-rt, e.g. "config-4.19.94-ti-r42") there...

  • laruso laruso posted a comment on discussion Forge 🇬🇧

    Dear Ingo, if I get you right there are two kinds of drivers: Driver (only consists of „connector“ like in the SPI template) CODESYS I/O driver (consists of „connector“ for logic access, and in adddition "IBase", "ICmpIoDrv" and "ICmpIoDrvParameter" to properly implement the device into CODESYS) The driver should works as it is, but the use could perhaps be a little bit more complicated because addressing the instance calls/variables. The CODESYS I/O driver works too, but a little bit more comfortable...

  • laruso laruso modified a comment on discussion Runtime 🇬🇧

    @ ojz0r: Thanks for your offer to help me out. After spending several hours checking the code, the only missing thing was to enable/pinmux the SPI in the device (BeagleBone Black) I did: - changed the library according to the already given MCP3008 (available as a package over CODESYS Forge) and the MCP3202 (thread "Raspberry Pi: List of available drivers / libraries" in CODESYS forum), to fulfill the needs of the MCP3204. In the library code I did (as usual) documented the relevant code by comments....

  • laruso laruso posted a comment on discussion Forge 🇬🇧

    From the description of writing an driver for a ADC via SPI I do only need a FB that contains the connector (also from SPI the template). Within the MCP3008 template there is the connector PLUS a additional FB contains "IBase", "ICmpIoDrv" and "ICmpIoDrvParameter". So what is the right way how to do it? Are both FBs needed? Why the temperature template contains only the connector? The unique ID was already considered. On the other side there are many deviations regarding the documentation, but that...

  • laruso laruso modified a comment on discussion Forge 🇬🇧

    I want to write a (correct) driver for the MCP3204! I downloaded a few templates and codes related to the MCP3008 and MCP3202 and merged everything together and it works. But now I wanted to read all the documentation here to fully correct the code and put it on the CODESYS Forge, and I struggle. For an SPI I/O driver: do I have to follow the SPI guidelines and/or follow the generic guidelines and/or follow the Driver FB guidelines??? It's very confusing to me. At the beginning there are three sentences,...

  • laruso laruso posted a comment on discussion Forge 🇬🇧

    I want to write a (correct) driver for the MCP3204! I downloaded a few templates and codes related to the MCP3008 and MCP3202 and merged everything together and it works. But now I wanted to read all the documentation here to fully correct the code and put it on the CODESYS Forge, and I struggle. For an SPI I/O driver: do I have to follow the SPI guidelines and/or follow the generic guidelines and/or follow the Driver FB guidelines??? It's very confusing to me. At the beginning there are three sentences,...

  • laruso laruso posted a comment on discussion Runtime 🇬🇧

    Anything new on your plan?

  • laruso laruso posted a comment on discussion Engineering 🇬🇧

    To change the pending EMCY error the master detected, the device have to send an "emergency reset". Please see the doku for this function block. The EMCY error you get from CiA405.RECV_EMCY_DEV seems to be the recording at the master, NOT the still pending error at the device. My device only sends out an EMCY over COB-ID 81 (for node-id 1) once, if there is a rising edge of an error. Nevertheless if the errors is still pending or not. So only one message on CAN bus. This results in not being the...

  • laruso laruso posted a comment on discussion Deutsch 🇩🇪

    So wie Ihr euch das vorstellt kann es nicht funktionieren! Erklärung: Ein kommender Fehler erzeugt über dessen positive Flanke eine EMCY Nachricht, die das Device an den Master schickt. Die Nachricht wird auch nur einmal geschickt, selbst wenn der Fehler noch anliegt oder schon behoben ist. Diese Nachtricht wird vom Master gespeichert und mit dem Funktionsblock CIA405.RECV_EMCY_DEV abgeholt. Hinweis: Es wird nicht der EMCY Fehler aus dem Device ausgelesen, sondern der letzte EMCY Fehler aus dem Master!...

  • laruso laruso posted a comment on discussion Engineering 🇬🇧

    You need to first trigger the function with its input "enable". Then you can use the output "ERRORINFO.EMCY_ERROR_CODE". In your example code the "ERRORINFO.EMCY_ERROR_CODE" will stay 0 because it is the initial value and the function is not executed. You can have a look into the example project "CANopen example" from CODESYS Store.

  • laruso laruso modified a comment on discussion Runtime 🇬🇧

    In the documentation of the Add-on "CODESYS Control for BeableBone SL", under point "Preparing the PLC", there is the hint to deactivate "Real-Time group scheduling"with this code segment: CONFIG_RT_GROUP_SCHED=n but I don't know were to put (very weak doku here). The only place I found it, was in the kernel configuration files, found in /boot/config-<kernel name="">. But these file must not be edited.</kernel> In the default kernel configuration files (ti, non-rt, e.g. "config-4.19.94-ti-r42") there...

  • laruso laruso modified a comment on discussion Runtime 🇬🇧

    In the documentation of the Add-on "CODESYS Control for BeableBone SL", under point "Preparing the PLC", there is the hint to deactivate "Real-Time group scheduling". There is a code segment: CONFIG_RT_GROUP_SCHED=n but I don't know were to put (very weak doku here). The only place I found it, was in the kernel configuration files, found in /boot/config-<kernel name="">. But these file must not be edited.</kernel> In the default kernel configuration files (ti, non-rt, e.g. "config-4.19.94-ti-r42")...

  • laruso laruso posted a comment on discussion Runtime 🇬🇧

    How to tweak real time performance on a BeagleBone Black? In the documentation of the Add-on "CODESYS Control for BeableBone SL", under point "Preparing the PLC", there is the hint to deactivate "Real-Time group scheduling". There is a code segment: CONFIG_RT_GROUP_SCHED=n but I don't know were to put (very weak doku here). The only place I found it, was in the kernel configuration files, found in /boot/config-<kernel name="">. But these file must not be edited.</kernel> In the default kernel configuration...

  • laruso laruso posted a comment on discussion Runtime 🇬🇧

    Offtopic! But: To retain the variables, the variables have to be declared as retain ;-) and are only reliable saved, if the system process "shutdown/reboot" is used.

  • laruso laruso posted a comment on discussion Runtime 🇬🇧

    Please keep in mind, that from date xxx on, the additional system processes are need to be declared in "CODESYSControl_User.cfg" and not in "CODESYSControl.cfg" anymore.

  • laruso laruso posted a comment on discussion Runtime 🇬🇧

    My proposal for integer values: VAR a: INT; // Dividend b: INT; // Devisor c: INT; // Result END_VAR ----- c := (a-1)/b+1; I needed that conversation for getting the correct number of column and row, out of the (overall) count of an array (to correct the code of OSCAT's "CSV_PARSER_FILE_DEMO"). It works with the integrated truncation feature while calculating with integer values. Or you look after "ROUND" functions in OSCAT's library.

  • laruso laruso modified a comment on discussion Runtime 🇬🇧

    Did you get anything to work? I want to use the MCP3204 too, in combination with SPI and CODESYS COntrol for Beaglebone SL. I've got it done.

  • laruso laruso modified a comment on discussion Runtime 🇬🇧

    I did my changes for MCP3204. Therefore I coded with shifting (like template), masking out unrelevant values with 2#... and leave some comments ;-) FOR usiChannel := 0 TO 3 DO aby[0] := SHL(2#1, 2); // Start bit aby[0] := aby[0] + SHL(2#1, 1); // 1: Single-ended, 0: differential input mode aby[0] := aby[0] + SHL(SHR(usiChannel AND 2#00000111, 2), 0); // D2 / 2. digit of channel (only digits till D2 allowed) aby[1] := SHL(usiChannel AND 2#00000111, 6); // D1 and D0 / 1. and 2. digit of channel (only...

  • laruso laruso posted a comment on discussion Runtime 🇬🇧

    @ ojz0r: Thanks for your offer to help me out. After spending several hours checking the code, the only missing thing was to enable/pinmux the SPI in the device (BeagleBone Black) I did: - changed the library according to the already given MCP3008 (available as a package over CODESYS Forge) and the MCP3202 (thread "Raspberry Pi: List of available drivers / libraries" in CODESYS forum), to fulfill the needs of the MCP3204. In the library code I did (as usual) documented the relevant code by comments....

  • laruso laruso posted a comment on discussion Runtime 🇬🇧

    Wouldn't it be enough to shift 6 digits instead of only 4 digits and leave the code as it is? //old / original code // aby[0] := 1; // aby[1] := 16#80 + SHL(usiChannel AND 7, 4); // aby[2] := 0; //changed code for MCP3208 aby[0] := 1; aby[1] := 16#80 + SHL(usiChannel AND 7, 6); aby[2] := 0; //end of new code IF NOT transfer(pabyTxBuffer:=ADR(aby) , pabyRxBuffer:=ADR(aby) , udiLen:=3 , uiDelayus:=0) THEN _iState := 1000; END_IF ui := aby[2]; ui := ui + (BYTE_TO_UINT(aby[1]) AND 2#1111) * 256; auiValue[usiChannel]...

  • laruso laruso posted a comment on discussion Runtime 🇬🇧

    I want to implement the ADC IC MCP3204 in CODESYS Control for BeagleBone SL. (Preconditions: already operational attached CAN cape for analog input and CAN bus manager and device) After searching and reading for 8 hours, I couldn't get it. I'm relatively new to CODESYS, but familiar with "package manager" and "library repository". What I have and what I've done: Project and info from Erwin Schwellinger: https://forge.codesys.com/forge/talk/Runtime/thread/39c439b0c2/?page=2&limit=25#e953 (but MCP3008...

  • laruso laruso posted a comment on discussion Runtime 🇬🇧

    Did you get anything to work? I want to use the MCP3204 too, in combination with SPI and CODESYS COntrol for Beaglebone SL.

  • laruso laruso posted a comment on discussion Engineering 🇬🇧

    Here an explanation from the help files: „As of CODESYS V3.5 SP7, each enumeration that you add to a project receives the 'strict' attribute automatically in the line above the TYPE declaration. For compiler versions >=3.5.7.0 , this causes compile errors in the following cases: - Arithmetic operation with variables of the enumeration type - Assignment of a constant value to a variable of the enumeration type, in which the constant does not correspond to an enumeration value - Assignment of a non-constant...

  • laruso laruso posted a comment on discussion Codesys V2.3 🇬🇧

    I'm pretty sure that the formula should be: (ymax-ymin)/(xmax-xmin)*(value-xmin)+ymin For me the formula worked perfectly and is used to interpolate values for special needs, w/o using the function from the OSCAT library called LINEAR_INT.

  • laruso laruso posted a comment on discussion Codesys V2.3 🇬🇧

    I'm pretty sure that the formula should be: (ymax-ymin)/(xmax-xmin)*(value-xmin)+ymin For me the formula worked perfectly and is used to interpolate values for special needs, w/o using the function from the OSCAT library called LINEAR_INT.

  • laruso laruso posted a comment on discussion Motion 🇬🇧

    You can directly go to your CANopen device in the device tree and oprn the tab CANopen I/O mapping and set a variable to your controlword. First make shure that your controlword is activated in the PDO mapping. When the variable changes the controlword is being transfered.

  • laruso laruso posted a comment on discussion Motion 🇬🇧

    My configuration: BeagleBone Black, CODESYS Control for BeagleboneBlack SL, CANbus, CANopen_Manager, TMCM-3110, SM_Drive_GenericDSP402 My issue: If a "SM_Drive_GenericDSP402" is added to the TMCM-3110 (Trinamic Motion controller), CANopen_Manager logs following: "SDO Write Error for object 16#60C2sub01" "SDO Write Error for object 16#60C2sub02" "SDO Read Error for object 16#6067sub00" If a "SML_Drive_CAN_GenericDSP402" is added to the TMCM-3110 (Trinamic Motion controller), CANopen_Manager logs following:...

1