Mal wieder: Arduino und Rapsberry als Treiber-Boards - Deutsches Howto

More
04 Mar 2019 08:51 #127669 by wicki

Typ 15 ?

Und ModBusTCP ist wahrscheinlich das am weitesten verbreitete Industrielle Protokoll. Dann könnte ich mit Raspi und Coresys endlich meine "Haussteuerung" weitermachen..Projektsteuerung ist etwas länger her. 1999.


ja, dass das mit typ 15 geht habe ich gesehen.
ein syntax-beispiel waere schoen...
so?
loadrt stepgen step_type=15 ctrl_lut=0,1,2,3

oder wie muss man sich das vorstellen?


und sowas wie "Haussteuerung" war der grund, warum ich mich mit dem raspi/arduino-eth-zeugs
beschaeftige habe

Please Log in or Create an account to join the conversation.

More
04 Mar 2019 14:28 #127699 by pl7i92
Bei mir wars eine Telecopsteuerung via Aduino und eigener Androidapp

Please Log in or Create an account to join the conversation.

More
05 Mar 2019 15:04 #127794 by wicki
jetzt wirds schraeg.....

die umsetzung der quad-signale in step/dir ist ja relativ einfach.
aber nun muss man das ganze auch noch konfigurierbar machen - ohne dass man dabei
n knoten ins hirn bekommt.

so sieht es bislang aus:
(ich gehe zunaechst von bytes - 32 pins - fuer IO aus.)
die table P_QUADSTEP_array beinhaltet 4 x 8 bits und zu jedem bit
einen moeglicherweise korrespondierenden beliebigen anderen pin.
ich gehe davon aus, das der STEP-pin _IMMER_ vor dem DIR-pin
in der tabelle steht.
ein beispiel:
wenn ich die leitungen
phase-A und phase-B auf den

ethraw.0.pin-03-out und ethraw.0.pin-04-out

konfiguriert habe und ich moechte am IO-port

auf pin3 und pin4 STEP und DIR fuer das TA-interface ausgeben,
dann muss ich in der unten stehenden tabelle folgends eintragen:

P_QUADSTEP_array[0][3][0]=0;
P_QUADSTEP_array[0][3][1]=4;

will heissen:
im byte 0 soll das bit3 mit dem bit4 aus dem gleichen byteblock
zusammen STEP und DIR bilden

das P_QUADSTEP_array besteht aus einen array, in dem fuer jedes bit
ein char array[byte,bit] enthalten ist.
steht dieses array auf [0xff,0xff] dann wird das signal unveraendert 1:1 weitergereicht.
steht ein anderer inhalt drin, dann verweist diese byte/bit-kombination auf den ausgang,
der zusammen mit dem ausgangssignal dann stattdessen STEP/DIR auf diesen leitungen
generiert.


noch ein beispiel:
ich habe pin-08 und pin-09 als out fuer das quadratur-signal konfiguriert.
meine steuerung braucht aber step und dir.

pin-08 und pin-09 sind die beiden ersten bits im 2. byte.
also muss in die tabelle rein

P_QUADSTEP_array[1][0][0]=1;
P_QUADSTEP_array[1][0][1]=1;

heisst:
pin-08 und pin-09 sind quad-signale

(loadrt stepgen step_type=15 ctrl_type=v user_step_type=0,1,2,3,4 )

im bit0 und bit1 des byte1. auf diesen leitungen soll daraus
STEP/DIR generiert werden.

ist das halbwegs verstaendlich ?


unsigned char P_QUADSTEP_array[4][8][2] = {
{{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff}}, // byte0
{{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff}}, // byte 1
{{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff}}, //byte 2
{{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff},{0xff,0xff}} //byte 3
};

Please Log in or Create an account to join the conversation.

More
05 Mar 2019 17:04 #127803 by wicki
die syntax steht jetzt auch fest:

rasPIioEthRaw -i eth0 -r 06:05:04:03:02:01 -s 01:02:03:04:05:06 -q [0][0]=[0/1] -q [0][2]=[0/3] -q [0][4]=[0/5]

heisst:
auf den pins 0/1, 2/3 und 4/5 liegt ein 2-leitungs-, quadratur-, grey- oder wasauchimmer-signal und das
wird auf der rapsi-seite in STEP/DIR-signale auf den pins 0/1, 2/3, 4/5 umgewandelt.

Please Log in or Create an account to join the conversation.

More
05 Mar 2019 20:46 #127818 by tommylight
Haben sie etwas mit arduino und eth shield versucht, oder noch nicht ?
Habe ein ide wie ein arduino feur kompletes steurung eines plasma trafo nutzen, das heeist die thc, die strom einstelung, ein ud aus schaltung, luft druck, etc uber die netz auf Linuxcnc zu haben.
MFG
Tom

Please Log in or Create an account to join the conversation.

More
05 Mar 2019 21:02 #127823 by Mike_Eitel
Tom
Do you believe that you can harden an arduino=Atmel chip against the heavy emv of plasma? I have none expirience with plasma but I'm not unknowledged to industrial demands. Atmel is quite sensitive to brown out means reseting unwanted. I judge that you would need a really clever electronic specialist for such a device and you should not believe that he can do it with cheapo components and a heck of time...
m5c
Mike

Please Log in or Create an account to join the conversation.

More
05 Mar 2019 21:22 #127827 by tommylight

I judge that you would need a really clever electronic specialist for such a device
Mike

I DO have one such idiot that can do such things with cheap electronics ! ME ! :) :) :)
I have already gathered plenty of experience of how to protect sensitive electronics from such interferences.
Realistically that is something that is not needed as moving 3 to 5 meters to turn on a plasma cutter and check it for air is not big deal, as that is usually a machine that deals with dragging and lifting big heavy metal plates so another 5 steps on empty would not hurt.
Danke schon.

Please Log in or Create an account to join the conversation.

More
05 Mar 2019 21:34 #127830 by Mike_Eitel
Good to see a professional, they are getting rare those days.
Just for my curiosity. Many years ago I did measuring the voltage of aluminium electrolysis pots, and remember the strong emv. I read lots of communication of your voltage measuring for hight control. Do you believe you could filter that signal over a long cable and filter it, plus then transport these (overscaned and averaged) values via ethernet to "servo" task = 1 ms. I would gues you need a multithread/processor cpu.
Mike

Please Log in or Create an account to join the conversation.

More
06 Mar 2019 05:34 #127861 by wicki

Haben sie etwas mit arduino und eth shield versucht, oder noch nicht ?


yes - I have a working adruino-uno-driver.
I think, I'm able to publish the whole package today
if nothing strange happens....


halcmd.hal example HAL-file (use "halrun")
type15.hal example HAL-file with quadratur-signal (needs WINDER)
etheraw.ino sourcecode for arduino-Uno
ethraw.comp linuxCNC component-driver
pcIOethRaw.c standalone PC-arduino I/O-test

peak results were 300usec. with arduino and 33kHz with raspberry.
"realistic" are 1ms/arduino and 10kHz/raspberry at the moment.

Please Log in or Create an account to join the conversation.

More
06 Mar 2019 08:05 #127870 by pl7i92
Damit könne sehr sehr viele Anwender was Anfangen .

die THC sache wäre auch sehr interessant da diese Module meist um die 200 Euro kosten .
und dabei 1ms völlig ausreicht.
Zumal die Volt zahl meistens nur alle 0,2sekunden gemessen wird

Please Log in or Create an account to join the conversation.

Time to create page: 0.122 seconds
Powered by Kunena Forum