Activity for BG_Automation

  • BG_Automation BG_Automation posted a comment on discussion Runtime

    Just for information, I tried Ubuntu Mate instead of Raspian and I had the same issue. I will try reverting the firmware to version 4.19.118 next.

  • BG_Automation BG_Automation posted a comment on discussion Runtime

    I will try the work around tonight and let you know. I would like to try to figure this out, so I don't have to work around this and help fix the problem. From: talk@forge.forge.codesys.com talk@forge.forge.codesys.com on behalf of eschwellinger forge@codesys.com Sent: Tuesday, September 8, 2020 1:43 AM To: [forge:talk] Runtime@talk.forge.forge.codesys.com Subject: [forge:talk] PI 4 Codesyscontrol terminating after 9 seconds please check if this is your problem: https://forge.codesys.com/forge/talk/Runtime/thread/4d43247a3a/...

  • BG_Automation BG_Automation posted a comment on discussion Runtime

    Hi, I am seeing the codesyscontrol terminating after 9 seconds on the PI. I have installed the full license and I have check the clock, I look in the logs and I don't see anything. It is like it just shutting down for no reason. Any clues what I can look for to figure this out? 2020-09-08T03:55:36Z, 0x00000124, 1, 0, 0, Multithreading activated. 3 workers used. 2020-09-08T03:55:36Z, 0x00000124, 1, 0, 0, ********** 2020-09-08T03:55:36Z, 0x00000124, 1, 0, 0, Provider CODESYS_DefaultProvider with Version...

  • BG_Automation BG_Automation committed [r4]

    ADDED MAIN SCREEN TO TEST RELAYS

  • BG_Automation BG_Automation modified a comment on a wiki page

    The led is a bool, all I can do with the LED is turn it on or off. The odd part to me is the ppFrame is a also a bool and it works good, but the output LED does not. I set the LED to true in my program and the value does not pass through into the library. *** Update, after playing with the code for a little bit, I found out I had to add it to my program. I was just trying to force the value to make it work. Once I added a LED coil to my program as a coil it started to work. Thanks again for your...

  • BG_Automation BG_Automation posted a comment on a wiki page

    The led is a bool, all I can do with the LED is turn it on or off. The odd part to me is the ppFrame is a also a bool and it works good, but the output LED does not. I set the LED to true in my program and the value does not pass through into the library.

  • BG_Automation BG_Automation posted a comment on a wiki page

    I have this partially working, but I seem to be missing something. My driver copies the first Channel Output which is a BYTE, but does not copy the boolean. It looks like the channel map stops at the first byte. I have read through the xml file over and over again, it pretty much matches what you have in the Can you please explain how this line works? pParameter^.dwDriverSpecific := ADR(_MCP3008.auiValue[i]); I don't understand how the channel map number of channels increments, looking at the line...

  • BG_Automation BG_Automation posted a comment on a wiki page

    Thanks for confirming the code. Knowing the code is good forced me to look in a new direction. The python line of code [spi.open(0,1)] was the area I needed to focus on. I read some website that said spi.open(0,1) meant open port 0 in mode 1. Then I found out it meant open port 0 using device 1. I changed the settings in the SPI master on the in the device parameters. I put as spidev0.1 instead of spidev0.0. Then everything started to work. Thanks for the help!

  • BG_Automation BG_Automation posted a comment on a wiki page

    Your comments above helped out a lot but I am a bit confused on how to create the methods for IoDrvReadInputs/WriteOutputs. I added these two methods to my library and they don't seem to be called. So lets say I have my Output to Relay1. I added this to my host parameter section as with an attribute of being an output. It shows up in my IO Map channel list in my project and I map a value to Relay1. All of this works for me so far, but I am lost on how the data moves from my project to the library...

  • BG_Automation BG_Automation posted a comment on a wiki page

    I figured out the problem with communicating over the SPI bus. I though this line of code in Python [spi.open(0,1) ] meant open port 0 in mode 1. I found out that this actually means open port 0, device 1. In the SPI master device I needed to replace the value in the SPI Port parameter from '/dev/spidev0.0' with '/dev/spidev0.1'. Once I did this everything started working. I am moving on to complete the driver. Thanks for your help, confirming the code told me to look in a new direction.

  • BG_Automation BG_Automation posted a comment on a wiki page

    I am having trouble writing to the SPI bus. I have a python script I am trying to translate to codesys. SPI Master settings in codesys: Max Hz 500000 bits per word is 8 port mode is 1 Python addr = 0 cmd = 0x12 //Toggle Relay param1 = 1 //Relay 1 param2 = 0 GPIO.setmode(GPIO.BCM) RELAYbaseADDR=24 ppFRAME = 25 ppINT = 22 GPIO.setup(ppFRAME,GPIO.OUT) GPIO.output(ppFRAME,False) #Initialize FRAME signa time.sleep(.001) #let Pi-Plate reset SPI engine if necessary GPIO.setup(ppINT, GPIO.IN, pull_up_down=GPIO.PUD_UP)...

  • BG_Automation BG_Automation modified a comment on a wiki page

    Yes, I did locate the SPI template titled SPI_Template.devdesc.xml, I probably did not explain myself well enough based on your response. I am looking for a template to create a plug in SPI module to plug into a connector slot. I did not see a template for a SPI_Modules_V1.0.xml file. I have successfully created 8 slots, now I want to create a module to plug into one of the slots. I also would like to see how to iterate through each module and and perform an action based on the module type. For example,...

  • BG_Automation BG_Automation posted a comment on a wiki page

    Yes, I did locate the SPI template titled SPI_Template.devdesc.xml, I probably did not explain myself well enough based on your response. I am look for the template to create a plug in SPI module to plug into a connector slot. I did not see a template for a SPI_Modules_V1.0.xml file. I have successfully created 8 slots, now I want to create a module to plug into one of the slots. I also would like to see how to iterate through each module and and perform an action based on the module type. For example,...

  • BG_Automation BG_Automation committed [r3]

    Start of SPI Driver for Pi-Relay PlateModified description file

  • BG_Automation BG_Automation modified a comment on a wiki page

    If I want to create a module file for a SPI bus device, what module filter do I use. For example, an ethercat fieldbus module uses a description file like this: <ethercatmodule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:nonamespaceschemalocation="EtherCATModule.xsd"></ethercatmodule> Is there a SPI module? Since the device I am using has multiple types of devices, I thought plugging modules would be the best.

  • BG_Automation BG_Automation posted a comment on a wiki page

    If I want to create a module file for a SPI bus device, what device description do I use. For example, an ethercat fieldbus module uses a description file like this: <ethercatmodule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:nonamespaceschemalocation="EtherCATModule.xsd"></ethercatmodule> Is there a SPI module?

  • BG_Automation BG_Automation posted a comment on a wiki page

    I have a question about the structures. I will start with the BIT structure. It looks Should the code read TYPE Bitfield : STRUCT Bit0 : Bit; Bit1 : Bit; Bit2 : Bit; Bit3 : Bit; END_STRUCT END_TYPE Device Description <BitfieldType basetype="std:BYTE" name="Bitfield"> <Component identifier="Bit0" type="std:BOOL"> <Default /> ....

  • BG_Automation BG_Automation committed [r2]

    Renamed pi-plate xml to pi-plate.devdesc.xml per suggestion from aliazzz, ticket number 2

  • BG_Automation BG_Automation modified ticket #3

    piplate.xml

  • BG_Automation BG_Automation posted a comment on ticket #3

    Ok, can do, thanks for the advise!

  • BG_Automation BG_Automation modified ticket #2

    Create Sudo Code Convert Python to SPI

  • BG_Automation BG_Automation created ticket #2

    Create Sudo Code Convert Python to SPI

  • BG_Automation BG_Automation posted a comment on discussion General Discussion

    I need to link a GPIO to a function block. I think I just need to point the address to the GPIO when the function block is initialized. Then control the output when needed. Output 25 turns on just before the SPI transmits to the relay board then turns off afterward. I don't know what is used for, but I am going to follow what the creator of the relay board did. Any suggestions?

  • BG_Automation BG_Automation modified a wiki page

    Pi-Plate Python Code To SPI

  • BG_Automation BG_Automation renamed a wiki page

    Convert to Python to Codesys

  • BG_Automation BG_Automation modified a wiki page

    Pi-Plate Python Code To SPI

  • BG_Automation BG_Automation renamed a wiki page

    Relay Plate Python Code

  • BG_Automation BG_Automation modified a wiki page

    Pi-Plate Python Code To SPI

  • BG_Automation BG_Automation modified a wiki page

    Pi-Plate Python Code To SPI

  • BG_Automation BG_Automation modified a wiki page

    Pi-Plate Python Code To SPI

  • BG_Automation BG_Automation created a wiki page

    Pi-Plate Information

  • BG_Automation BG_Automation modified a wiki page

    Pi-Plate Python Code To SPI

  • BG_Automation BG_Automation modified a wiki page

    Convertion to Python to Codesys

  • BG_Automation BG_Automation modified a wiki page

    Convertion to Python to Codesys

  • BG_Automation BG_Automation modified a wiki page

    Convertion to Python to Codesys

  • BG_Automation BG_Automation modified a wiki page

    Convertion to Python to Codesys

  • BG_Automation BG_Automation renamed a wiki page

    Convertion to Python to Codesys

  • BG_Automation BG_Automation modified a wiki page

    Pi-Plate Python Code To SPI

  • BG_Automation BG_Automation committed [r1]

    Start of SPI Driver for Pi-Relay Plate

  • BG_Automation BG_Automation modified a wiki page

    Home

  • BG_Automation BG_Automation modified a wiki page

    Pi-Plate Python Code To SPI

  • BG_Automation BG_Automation renamed a wiki page

    Pi-Plate Python Code To SPI

  • BG_Automation BG_Automation modified a wiki page

    Home

  • BG_Automation BG_Automation modified a wiki page

    Pi-Plate Code to Convert To SPI

  • BG_Automation BG_Automation renamed a wiki page

    Pi-Plate Code to Convert To SPI

  • BG_Automation BG_Automation renamed a wiki page

    Sudo Code For Relay On

  • BG_Automation BG_Automation modified a wiki page

    Home

  • BG_Automation BG_Automation modified a wiki page

    Home

  • BG_Automation BG_Automation modified a wiki page

    Home

  • BG_Automation BG_Automation posted a comment on a wiki page

    Suggested Edit: SPI Transfer You might have noticed the few lines above: aby[0] := 1; << aby[1] := 16#80 + SHL(usiChannel AND 7, 4); aby[2] := 0; aby[3] := 0; IF NOT transfer(pabyTxBuffer:=ADR(aby) , pabyRxBuffer:=ADR(aby) , udiLen:=3 , uiDelayus:=0) THEN _iState := 1000; END_IF

1