CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Sat Oct 21, 2017 9:32 am

All times are UTC+01:00




Post new topic  This topic is locked, you cannot edit posts or make further replies.  [ 17 posts ]  Go to page 1 2 Next
Author Message
PostPosted: Thu Sep 11, 2014 9:58 am 
Offline

Joined: Wed Jan 16, 2013 8:35 am
Posts: 91
List of available drivers


SPI devices:
MCP3008 - Is included by the standard package from the CODESYS Store
PiFace - Is included by the standard package from the CODESYS Store
PiFace as IODriver - Is included by the standard package from the CODESYS Store
PiFace Control and Display - Is included by the standard package from the CODESYS Store (3.5SP6 Release)
MCP23S17 - Is included by the standard package from the CODESYS Store (3.5SP6Patch30 Release)
LCD4x20N Character Display
MAX7219 Library MAX7219
MCP3202 Library 2 ana inputs 12bits on SPi bus: MCP3202


I2C devices:
SRF02 Ultra sonic range finder - Is included by the standard package from the CODESYS Store
AK8975 Compass - Is included by the standard package from the CODESYS Store
MPU9150 Gyro- Is included by the standard package from the CODESYS Store
MPU6050 Gyro- Is included by the standard package from the CODESYS Store
AdafruitPWM - Is included by the standard package from the CODESYS Store
Arduino UNO IO Device Description and Library
Adafruit LCD Plate Device Description and Library
MCP23017 16-Bit I/O Port-Expander Device Description and Library
PCF8574 8-Bit I/O Port-Expander Device Description and Library
PCF8591 4 Channel, 8bit Analog to Digital converter Device Description and Library
PiChips 4 PWM I2C Device
SHT21 Humidity & Temperature Sensor
UPSPIco library
DS1803 potentiometer
MCP4725 DAC
LSM9DS1, an Accelerometer/Gyro/Magnetometer
LSM303 accelerometer and Magnetometer

1-wire:
DS18B20 - Is included by the standard package from the CODESYS Store (3.5SP5Patch2 release)


others:
PiCam - Is included by the standard package from the CODESYS Store


Top
   
 
PostPosted: Thu Sep 11, 2014 10:53 am 
Offline

Joined: Wed Jan 16, 2013 8:35 am
Posts: 91
Arduino UNO IO Library for Codesys on Raspberry Pi

Author: Gerhard Schillhuber
Date: 11.09.2014
Version: 1.1.0.0


You do not have the required permissions to view the files attached to this post.


Top
   
 
PostPosted: Fri Sep 12, 2014 2:57 pm 
Offline

Joined: Wed Jan 16, 2013 8:35 am
Posts: 91
Adafruit LCD Plate (http://www.adafruit.com/products/1110)

Author: jjsmith88
Date: 12.11. 2014
Version: 1.1.0.0


You do not have the required permissions to view the files attached to this post.


Top
   
 
 Post subject: 4x20 Character LCD
PostPosted: Sun Sep 21, 2014 6:46 pm 
Offline

Joined: Wed Jan 16, 2013 8:35 am
Posts: 91
4x20 Character LCD

Author: Werner Hinterseer, Lambda GmbH & Co. KG
Date: 21.09.2014
Version: 2.0.0.0


You do not have the required permissions to view the files attached to this post.


Top
   
 
PostPosted: Sun Oct 05, 2014 5:25 pm 
Offline

Joined: Wed Jan 16, 2013 8:35 am
Posts: 91
Author: madax
Date: 05.10. 2014
Version: 1.0.0.0


You do not have the required permissions to view the files attached to this post.


Top
   
 
PostPosted: Sun Oct 05, 2014 5:26 pm 
Offline

Joined: Wed Jan 16, 2013 8:35 am
Posts: 91
Author: madax
Date: 05.10. 2014
Version: 1.0.0.0


You do not have the required permissions to view the files attached to this post.


Top
   
 
PostPosted: Sun Oct 05, 2014 5:29 pm 
Offline

Joined: Wed Jan 16, 2013 8:35 am
Posts: 91
Author: madax
Date: 05.10. 2014
Version: 1.0.0.0


You do not have the required permissions to view the files attached to this post.


Top
   
 
 Post subject: PiChips 4 PWM I2C Device
PostPosted: Tue Oct 21, 2014 8:00 pm 
Offline

Joined: Wed Jan 16, 2013 8:35 am
Posts: 91
Author: madax
Date: 21.10. 2014
Version: 1.1.0.0

PiChips 4 PWM I2C device.
Tested with 100kHz and 3,3V on a L272 as H-Bridge with default settings on the eeprom.


You do not have the required permissions to view the files attached to this post.


Top
   
 
PostPosted: Mon Feb 16, 2015 8:24 am 
Offline

Joined: Wed Jan 16, 2013 8:35 am
Posts: 91
Author: Erikk
Date: 16.2. 2015
Version: 1.0.0.0

I´ve attached my library for the SHT21.

It has an internal statemachine inside the _iState, dont know if this was neccesary but i think the symbolic status of the device changes if it isnt "10" ?
It has a TON Timer of 50ms before Writing a measurement request ( i´ve only tested the No-Hold commands ).
The internal state machine has these states:
10: Write Temp measurement command -> Send to state 11.
11: Read/wait for respons, when respons is found -> Send to state 20.
20: Write Humidity measurement command -> Send to State 21.
21: Read/wait for respons, when respons if found -> Send to state 10.

Every read checks the statusbit of the second byte, to check if it is the correct measurement that is read(temp/humidity), and sets or resets the xTempValid and xHumidityValid booleans.
It dont use the checksum.

After a Temperature measurement request is sent, a 100ms TON is set, before doing a Read, same with Humidity Measurement, but only 40ms.
If the read isnt successfull it will try again in the next cycle.

I tried withouth these timers with 4ms cycle time. On the 17th Temperature read (68ms) I got a respons from the sensor, and the 7th Humidity read (28ms).
So to take some cycles of the Cpu and the bus, i think its the right way to go. But you could probably go down to ~65-70ms for a temperature read and ~30ms for a Humidity.

It also has a internal watchdog timer, which is needed if it doesnt get a respons at all (i made a short between the SCL/SDA lines and it got stuck in a reading state), when it runs out, it starts from _iState 0 (complete restart).

If you dont specify a I2C address, in _iState 0 it automatically sets the address 0x40 (decimal 64), which is specified in the SHT21 manual.




Its probably not the best written library but it works very well.
Hope it will be of some use to someone.

SHT21 Humidity & Temperature Sensor


You do not have the required permissions to view the files attached to this post.


Top
   
 
 Post subject: MAX7219 Library
PostPosted: Sat Sep 19, 2015 5:32 am 
Offline

Joined: Wed Jan 16, 2013 8:35 am
Posts: 91
Author: Oleg Wagner
Date: 3.09.2015
Version: 1.0.0.1

MAX7219 which enables to drive up to 20 casceded (daisy chained) MAX7219 devices
(7-segment displays as well as 64-LED matrices).

Following functions are included:
- Display Test
- Set number of digits
- Shutdown mode
- Set brightness/intensity
- Clear Digit or Row
- Clear all segments/LEDs of a device
- Write particular segments of digits
- Write BCD numbers
- Write characters
- Write multi-digit integer
- Write multi-digit floats
- Write particular LEDs in row
- init device
- all necessary methods to set up SPI communication and data transfer

A device description file is also part the library.

For first impression see attached screen shots.

I would like to share this library if there is interest (no engagement).

Update to 1.0.0.1 Version include:
Extension of device description file:

- Icon added
- Initialization parameters for devices:
- Intensity level
- Number of digits of the device
- Shutdown
- Display Test
- Clear Device

Extension of “Initialize”-method in library with setting of above mentioned parameters


You do not have the required permissions to view the files attached to this post.


Top
   
 
PostPosted: Mon Oct 26, 2015 4:45 pm 
Offline

Joined: Wed Jan 16, 2013 8:35 am
Posts: 91
because i had some problems with the standard Adafruit PWM and made my own version.
Sometimes i need the PWMs and / or the servo control function.

Use a Array[0..15] to send values from 0 - 100 for PWM function or 101 - 200 for servo control (1.01 to 2.00 ms Pulse)
I added a accessible trim function for servo pulse finetuning.
The State shows if the device is present and accessible.
The IN shows the actual frequency register value.


You do not have the required permissions to view the files attached to this post.


Top
   
 
 Post subject: UPSPIco library
PostPosted: Thu Dec 31, 2015 7:40 am 
Offline

Joined: Wed Jan 16, 2013 8:35 am
Posts: 91
Author: PhilipLykov
Date: 12.10. 2015
Version: 1.0.0.0

A library for UPS PIco for Raspberry Pi. Includes the following functions:
- read voltage
- read temperature
- read analog inputs
- read other parameters
- control LEDs
- control of cooler (including automatic control based on temperature)
- Still Alive Timer (watchdog which will reboot the Raspberry Pi if your code will stop)
- initial configuration of the device out of your code


You do not have the required permissions to view the files attached to this post.


Top
   
 
PostPosted: Fri Apr 29, 2016 4:39 am 
Offline

Joined: Wed Jan 16, 2013 8:35 am
Posts: 91
Author: galexis
Date: Sun Apr 17, 2016
Version: 1.0.0.0

librarie for DS1803 i2C 2 potentiometer output


You do not have the required permissions to view the files attached to this post.


Top
   
 
PostPosted: Fri Jul 01, 2016 8:38 am 
Offline

Joined: Wed Jan 16, 2013 8:35 am
Posts: 91
Author: johan76swart
Date: 17.06. 2016
Version: 1.0.0.0

MCP4725 digital to analog converter
Input an integer 0-4095(12-bitDAC)


You do not have the required permissions to view the files attached to this post.


Top
   
 
PostPosted: Wed Nov 30, 2016 5:40 am 
Offline

Joined: Wed Jan 16, 2013 8:35 am
Posts: 91
Autor: galexis
Date: 16.11. 2016
Version: 1.0.0.0

MCP3202: Rpi 1:
pin1 > pin 24
pin5 > pin 19
pin6 > pin 21
pin7 > pin 23


You do not have the required permissions to view the files attached to this post.


Top
   
 
Display posts from previous:  Sort by  
Post new topic  This topic is locked, you cannot edit posts or make further replies.  [ 17 posts ]  Go to page 1 2 Next

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited