Anyone that are using a Controllino Maxi or Mega? Does B4R supports it? It is the industrial version of Arduino
Work will pay for it. Just need to know if it can be programmed with B4R i.e does B4R supports it?The official website refers to Arduino libraries... however it costs a fortune
Resources – CONTROLLINO
www.controllino.com
Should I add them to rCore.h?That's true. If it is compatible with Arduino IDE then it is probably compatible with B4R as well.
You will need to find and use the constants values from their header file. It shouldn't be difficult.
Received it today (Controllino Mega) and initial test are working with B4R. Need to figure out the use of some of the Dx pins that are past #49. Relais outputs seems to be working too (click click with a timer). Playtime will start on Saturday. Have shut it down for now - literally spent 15 minutes with it just to see if it like @Erel 's B4R and it indeed does so!For the pins? No. You just need to find the correct numbers and use them.
Will do so and upload a video too once we have tidied up the wiring and added the additional status indicators that were not included in the original 2005 anilox washer.Wow great...
Can you share some pics of project and some example?
OK - some pics and the code attached. Wiring a bit of a spider web directly after we got it working and before we tidied up the wiring. It is really working very well. There are 5 pneumatic solenoid valves that are also controlled (out of picture as it is below the anilox washer) to switch compressed air to a pneumatic pump, a small pneumatic cylinder to lock the lid of the anilox washer, a pneumatic draining valve, and a "drying" valve.Wow great...
Can you share some pics of project and some example?
Yip - very happy with the end result especially so by making use of pure B4R. A relative simple project but nevertheless proved that Conrtollino can be used with B4R and saved a 20 year old machine.Brilliant great job and milestone for PLC automation with B4R.
I was thinking of such idea as Controllino since a couple of years and Controllino came out first.
Just wanted to make B4R use as efficient with code blocks or libraries, performing such as optimized PLC routines. Thanks a lot for great sharing.
#Region Project Attributes
#AutoFlushLogs: True
#CheckArrayBounds: True
#StackBufferSize: 300
#End Region
'Ctrl+Click to open the C code folder: ide://run?File=%WINDIR%\System32\explorer.exe&Args=%PROJECT%\Objects\Src
Sub Process_Globals
Public Serial1 As Serial
Dim aDay , aWeekDay, aMonth, aYear, aHour, aMinute, aSecond As Byte
Dim t As Timer
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
t.Initialize("t_tick", 1000)
Delay(1000)
aDay = 25
aWeekDay = 1
aMonth = 2
aYear = 24
aHour = 18
aMinute = 9
aSecond = 0
RunNative("initialize", Null)
RunNative("setTimeAndDate", Null)
t.Enabled = True
End Sub
Sub t_tick
RunNative("getDay", Null)
RunNative("getWeekDay", Null)
RunNative("getMonth", Null)
RunNative("getYear", Null)
RunNative("getHour", Null)
RunNative("getMinute", Null)
RunNative("getSecond", Null)
Delay(1000)
Log("aDay = " + aDay)
Log("aWeekday = " + aWeekDay)
Log("aMonth = " + aMonth)
Log("aYear = " + aYear)
Log("aHour = " + aHour)
Log("aMinute = " + aMinute)
Log("aSecond = " + aSecond)
Log(" ")
End Sub
#if C
#include <Controllino.h>
void initialize (B4R::Object* o) {
Controllino_RTC_init();
}
void setTimeAndDate(B4R::Object* o) {
Serial.println(b4r_main::_aday);
Controllino_SetTimeDate(b4r_main::_aday, b4r_main::_aweekday, b4r_main::_amonth, b4r_main::_ayear, b4r_main::_ahour, b4r_main::_aminute, b4r_main::_asecond);
}
void getDay(B4R::Object* o) {
b4r_main::_aday = Controllino_GetDay();
}
void getWeekDay(B4R::Object* o) {
b4r_main::_aweekday = Controllino_GetWeekDay();
}
void getMonth(B4R::Object* o) {
b4r_main::_amonth = Controllino_GetMonth();
}
void getYear(B4R::Object* o) {
b4r_main::_ayear = Controllino_GetYear();
}
void getHour(B4R::Object* o) {
b4r_main::_ahour = Controllino_GetHour();
}
void getMinute(B4R::Object* o) {
b4r_main::_aminute = Controllino_GetMinute();
}
void getSecond(B4R::Object* o) {
b4r_main::_asecond = Controllino_GetSecond();
}
#End If
#Region Project Attributes
#AutoFlushLogs: True
#CheckArrayBounds: True
#StackBufferSize: 300
#End Region
'Ctrl+Click to open the C code folder: ide://run?File=%WINDIR%\System32\explorer.exe&Args=%PROJECT%\Objects\Src
Sub Process_Globals
Public Serial1 As Serial
Dim aDay , aWeekDay, aMonth, aYear, aHour, aMinute, aSecond As Byte
Dim t As Timer
Dim cont_rtc As CONTROLLINO
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
cont_rtc.Init
t.Initialize("t_tick", 1000)
Delay(1000)
aDay = 25
aWeekDay = 1
aMonth = 2
aYear = 24
aHour = 18
aMinute = 26
aSecond = 0
Delay(1000)
cont_rtc.SetTimeDate(aDay, aWeekDay, aMonth, aYear, aHour, aMinute, aSecond)
t.Enabled = True
End Sub
Sub t_tick
aDay = cont_rtc.GetDay
aWeekDay = cont_rtc.GetWeekDay
aMonth = cont_rtc.GetMonth
aYear = cont_rtc.GetYear
aHour = cont_rtc.GetHour
aMinute = cont_rtc.GetMinute
aSecond = cont_rtc.GetSecond
Log("aDay = " + aDay)
Log("aWeekday = " + aWeekDay)
Log("aMonth = " + aMonth)
Log("aYear = " + aYear)
Log("aHour = " + aHour)
Log("aMinute = " + aMinute)
Log("aSecond = " + aSecond)
Log(" ")
End Sub