Difference between revisions of "PLC LED controller specifications"

From biophysics
Jump to navigation Jump to search
Line 140: Line 140:
 
| 1 +5V <br> 2 Red LED signal <br> 3 Green LED signal <br> 4 Speaker+ <br> 5 Speaker-
 
| 1 +5V <br> 2 Red LED signal <br> 3 Green LED signal <br> 4 Speaker+ <br> 5 Speaker-
 
|-
 
|-
| LED Connector color assignment
+
| Binder connector pin to wire color assignment
 
| 1 Black <br> 2 Red <br> 3 Green <br> 4 Yellow <br> 5 Blue
 
| 1 Black <br> 2 Red <br> 3 Green <br> 4 Yellow <br> 5 Blue
 
|}
 
|}

Revision as of 15:05, 29 January 2024

Inside the PLC cabinet

Description

The PLC LED controller is part of the Auditory Sphere Lab and consist of a modular PLC from the Panasonic FP2 series. It controls the Red and Green LEDs in the setup. See here for LED specifications.

How does it work

The PLC LED controller is programmed with 'FPWINPRO 7' PLC programming tool of Panasonic. The program can be found here. The program starts automatically when the PLC is switched on. The program controls 256 relay outputs for switching 128 red and 128 green LEDs on or off. The intensities of the LEDs are controlled by Pulse Width Modulation (PWM).

From Matlab you can sent up to 16 LED configurations to the controller. With a trigger pulse you can let the LED controller know that it should present the next configuration. The LEDs are numbered 0 to 127 and there are red and green LEDs. With the test buttons on the door of the PLC cabinet you can switch on all red or green LEDs at once. A configuration specifies the ON or OFF state for all red and green LEDs with two arrays of 128 bits. The intensity of the red and green LEDs are not individually addressed, but set for all red or green LEDs at once with one number between 0 and 50.

How to use

You basically have to do two things:

  • Specify the configurations (LED patterns) in matlab and sent it to the PLC.
  • Specify triggers in your experiment code in matlab.

A Matlab example:

1:  n = 8;
2:  s = ledpattern(n);
3:  for i=[1 3 5 7]
4:     s(i).set([1 3 5],'r');
5:     s(i).set([2 4 6],'g');
6:     s(i).intensity('r', i);
7:     s(i).intensity('g', i);
8:  end
9:  leds = ledcontroller('fp-web2.local');
10: leds.write(s);
  • In line 1 the number of ledpatterns is specified.
  • In line 2 a ledpattern array is created with n ledpatterns
  • Between line 3 to 8 the odd numbered patterns are looped through.
  • In line 4 to 7 a collection of red and green LEDs are set and intensities are assigned to the red and green LEDs.
  • In line 9 a led controller object is created with the name of the Ethernet connection.
  • In line 10 the ledpatterns are written to the ledcontroller.

After running this program the PLC controller can be triggered. Upon receiving a first trigger pulse the PLC will present the first ledpattern. The second trigger will display the second ledpattern, but since nothing is written to s(2) all LEDs will be off. The next trigger will display the next ledpattern etc.. The end result is that the LEDs will go on and off each time with a higher intensity.

You can find the Matlab code and examples here.

Specifications

  • Panasonic PLC
  • FPWINPRO 7 sofware
  • Response time to trigger < 1.3 milli sec
  • 2x128 output channels
  • 5 pins Binder connectors for LEDs
  • Test buttons for Red and Green LEDs
  • BNC connector for input trigger
  • Ethernet connector for communication
  • The LEDs that are used in all the labs are Bivar 5BC-3-CA-F LED.

Technical desciption

Component Specification
PLC type Panasonic FP2 series
PLC CPU FP2C2LJ FP2SH CPU with COM port
PLC Ethernet unit FPWEB2 FP Web-Server 2, 10/100MBit/s
PLC Output units FP2Y64TJ FP2 64out transistor NPN
(2x for Red and 2x for Green)
PLC Input unit FP2X16D2J FP2 16in (12-24V)
PLC PWM unit FP2PXYPJ FP2 multi I/O PNP
PLC Programming connection RS232 serial interface (special cable)
PLC Programming tool FPWIN PRO 7.0
Current PLC program PLC program FART2 v2.1 FPWIN Pro 7.pro
Date 29-05-2018
Location of program Gitlab: biofysica\experiment\sphere Panasonic PLC
Number of channels 128
Configuration programming connection Ethernet
Configuration programming tool Matlab function: ledcontroller, ledpattern
Configuration buffer 16 ledpatterns
PLC cycle speed 1.35 ms
Led timing Random delay between 1.35 ms and 2.70 ms after trigger
1 to 2 PLC cycles
Timing pulse Trigger-echo within 40 microsec of LED response
Shortest On-Off interval 5.4 ms (4 PLC cycles) in normal mode
1.35 ms (1 PLC cycle) in cycle time mode
Trigger input 5V (triggers LED configurations)
Gate input 5V (enables or disables all LED outputs)
Intensity regulation PWM (Pulse Width Modulation) @30 kHz
Output voltage 12V
LED type Bivar 5BC-3-CA-F, common anode, PNP
LED light Red 625nm 4mcd; Green 568nm 6mcd
LED load 1 kOhm in series
LED Testing Red test button (all 128 Red LEDs)
Green test button (all 128 Green LEDs)
LED Connector type Binder 719 series 5 poles
(connects also the speakers)
LED Connector pin assignment 1 +5V
2 Red LED signal
3 Green LED signal
4 Speaker+
5 Speaker-
Binder connector pin to wire color assignment 1 Black
2 Red
3 Green
4 Yellow
5 Blue

Panasonic FP2 series

Component Specificatie
FP2C2LJ FP2SH PLC 1 ms cycle time when <20.000 steps per cycle (120.000 steps max)
Measured cycle time 1.35 ms
FP2Y64TJ output unit (4x) 64 channels
24V NPN output
Current 0.3A max
Response time <0.3 ms
FP2PXYPJ multi I/O unit PNP transistor
PWM output 30 kHz
Duty cycle 0-100% in steps of 1%
Max output 800 mA
FP2X16D2J input unit 16 channels
Current 8 mA @24V
Response time <0.2 ms