#linuxcnc Logs

Sep 02 2024

#linuxcnc Calendar

12:09 AM lcnc-relay: <meisterdippel> moin
12:32 AM lcnc-relay: <big_kevin420> if only, a hybrid would be nice
04:49 AM JT-Cave: morning
05:10 AM Tom_L: morning
05:18 AM CloudEvil: :)
06:03 AM Deejay: hi
07:34 AM lcnc-relay: <Travis Farmer> Morning
10:01 AM Tom_L: yard done. shoertime
10:04 AM lcnc-relay: <jackrabbitjury> I'm having trouble getting this MESA modbus working
10:06 AM lcnc-relay: <jackrabbitjury> https://jauriarts.org/_matrix/media/v3/download/jauriarts.org/XgTDZcTPqbXGphCNpKsgQYNy/image.png
10:06 AM lcnc-relay: <jackrabbitjury> This is what I'm seeing with my data analyser
10:07 AM lcnc-relay: <jackrabbitjury> Linuxcnc is reporting: call/response function number mismatch
10:53 AM NoSpark: can I send it to you to look over? or could you spin me up one if I give you the details?
10:53 AM pcw-home: The baud rate DDS's were changed at some point from 16 bits to 20 bits (V0 to V2 I think)
10:54 AM pcw-home: so I suspect you have current firmware (V2) but your bit file advertises V0 oer V1
10:55 AM lcnc-relay: <jackrabbitjury> would that affect the RX path?
10:55 AM pcw-home: should affect both paths but depends what you put in you pin file for versions
10:56 AM lcnc-relay: <jackrabbitjury> (PktUARTTTag, x"00", ClockLowTag, x"01", PktUARTTDataAddr&PadT, PktUARTTNumRegs, x"00", PktUARTTMPBitMask), -- elemtent 5
10:56 AM lcnc-relay: <jackrabbitjury> (PktUARTRTag, x"00", ClockLowTag, x"01", PktUARTRDataAddr&PadT, PktUARTRNumRegs, x"00", PktUARTRMPBitMask), -- elemtent 6
10:57 AM lcnc-relay: <meisterdippel> perhaps the baud rate is only slightly off, so that the device still understands it but the mesa card no longer understands the device ???
10:57 AM lcnc-relay: <jackrabbitjury> no, the baud rates are perfectly matched, within a couple of microhertz
10:57 AM lcnc-relay: <meisterdippel> but then there should be something like a csum error
10:58 AM lcnc-relay: <jackrabbitjury> (I thought the same thing btw)
10:59 AM lcnc-relay: <jackrabbitjury> should the version be x"02"
10:59 AM pcw-home: Both versions (RX and TX) should be 0x02
10:59 AM NoSpark: okay, I will spin that up and give it a go
10:59 AM pcw-home: (assuming you have the latest source)
11:01 AM pcw-home: DDS sizes were bumped to 20 bits to get better resolution at low baud rates (say 300)
11:01 AM NoSpark: is there a version number in the source tree I can check?
11:01 AM NoSpark: ~/build/7i80/configs/hostmot2/source
11:01 AM NoSpark: or a git repo
11:03 AM pcw-home: the fact that you had to use a 16X baud rate indicates the you have V2 hardware but you have specified V0 to the driver
11:05 AM NoSpark: where do I get a copy of the latest source code for a 7i80? Shoudl I just download the zip from the mesa website?
11:06 AM NoSpark: http://www.mesanet.com/software/parallel/7i80.zip
11:06 AM pcw-home: Yeah (and actually firmware for any Xilinx based card will do)
11:07 AM pcw-home: just make sure you set the version for pktuartt and pktuartr to 2
11:13 AM pcw-home: (just noticed DDS width changed from 20 to 24 not 16 to 20 from V0 to V2) but that does not change my advice
11:16 AM pcw-home: I should use a literal constant (PktUARTVer) in IDROMConst.vhd and pinfiles to avoid future confusion
11:21 AM NoSpark: btw, I'm making an actual driver for a delta VFD and a IMO SD1, based on the mesa_modbus.c, should I throw them up on linuxcnc, or are you still working the bugs out of the pkt_uarts?
11:21 AM NoSpark: I don't want to needless add to your support burden
11:22 AM pcw-home: I dont think there are any firmware bugs, mesa-modbus does have some known bugs however
11:23 AM NoSpark: yeah, I saw some buffer overflow releated stuff, I'll throw it up there, and let people much better than me stamp out the esorteric bugs
11:24 AM pcw-home: Bugs that I know about: http://freeby.mesanet.com/modbus
11:25 AM NoSpark: For multiple reads/writes it would be good to have the possibility of mixed types,
11:25 AM NoSpark: This is the reason I'm writing the drivers :)
11:49 AM lcnc-relay: <Travis Farmer> backup-log
11:49 AM backup-log: lcnc-relay: Today's Log https://www.tjfhome.net/irclog/%23linuxcnc/2024-09-02.html
11:56 AM NoSpark: pcw-home: new bug? I just grabbed the latest hostmot2, and compiled it with the corrected bitfiile, but it is making software for a 6slx16ftg256 instead of a 6slx25ftg256
11:56 AM NoSpark: Error: wrong bitfile destination device: 6slx16ftg256, should be 6slx25ftg256
11:59 AM NoSpark: never mind, I'm an idiot
12:04 PM Tom_L: lucky you didn't brick it
12:05 PM pcw-home: A 7I80 is hard to brick unless you really try (since it has 2 EEPROMS)
12:07 PM pcw-home: Yes the 7I80XX project file is for either version, you need to select the target device in the build environment _and_ the top level source
12:07 PM pcw-home: (so it reports the right device to say mesaflash)
12:32 PM lcnc-relay: <Travis Farmer> Hmmm, big irony... the VFD braking resistor i bought years ago, was $108, and is wrong (500W 1.2ohm), and the correct resistor from china (300W 50ohm), is only $21... if only i had the money for the correct resistor...
12:36 PM NoSpark: pcw-home: okay, that has fixed the baud rate issue, but not the recieving issue...
12:44 PM lcnc-relay: <meisterdippel> try to read a shorter package, only one register or so
12:46 PM pcw-home: whats the issue with receive? I have tried 2 modbus devices (a Chinese relay card and GS20 VFD and they worked OK)
12:46 PM NoSpark: i'm not sure yet, I modified the source a bit to try and find the issure, I'm just reverting back to default, and will try again
12:48 PM pcw-home: Also on receive, depending on interface hardware you need to make sure you have the correct RS-485 bias so an undriven line is in a idle state
12:50 PM NoSpark: I have three wires connected, A+, b-, and a gnd reference
12:50 PM rdtsc: Travis, 1.2R is quite a low value for a braking resistor! If using 240VAC, dc bus = ~340V / 1.2R = 283 Amperes drawn when that bad boy is shorted across the bus
12:51 PM rdtsc: 283*340 = 96kW, ouch
12:52 PM NoSpark: good if you only need to brake once :P
12:53 PM rdtsc: think that would be a good breaking resistor :)
12:55 PM lcnc-relay: <jackrabbitjury> https://jauriarts.org/_matrix/media/v3/download/jauriarts.org/yiRzwktpNschMiSFERXkiQVh/image.png
12:55 PM lcnc-relay: <jackrabbitjury> pcw-home: Is this voltage okay for the receiver? it seems to "float" around 2.2V and is pushed between 1v low and 4v high
12:56 PM lcnc-relay: <jackrabbitjury> the MESA card pushes the voltage down to about 200mv
12:57 PM lcnc-relay: <jackrabbitjury> I'll try removing the reference, see if that helps
01:02 PM NoSpark: nope, just introced a bit more noise
01:02 PM NoSpark: *introduced
01:18 PM lcnc-relay: <jackrabbitjury> pcw-home: I don't think the mesa card is receiving the data. if I set the debug level to info, mesa_mobus reports that it is only receiving 1 single byte
01:18 PM lcnc-relay: <jackrabbitjury> "Return packet is 01"
01:19 PM lcnc-relay: <jackrabbitjury> which is also triggering the call responce error
01:19 PM lcnc-relay: <jackrabbitjury> anyway, It's two am here, and I have a long drive home
01:20 PM lcnc-relay: <jackrabbitjury> I'll try and make a linuxcnc.org post with as much data as I can gather on Wednesday
01:24 PM pcw-home: both versions set to 2 in the pin file?
01:24 PM pcw-home: (check with mesaflash --readhmid)
01:24 PM pcw-home: could also be a wiring issue
01:33 PM lcnc-relay: <jackrabbitjury> 31 15 IOPort PktUARTTX 0 TXData (Out)
01:33 PM lcnc-relay: 33 16 IOPort PktUARTRX 0 RXData (In)
01:33 PM lcnc-relay: (PktUARTTTag, x"02", ClockLowTag, x"03", PktUARTTDataAddr&PadT, PktUARTTNumRegs, x"00", PktUARTTMPBitMask), -- Element 5
01:33 PM lcnc-relay: (PktUARTRTag, x"02", ClockLowTag, x"03", PktUARTRDataAddr&PadT, PktUARTRNumRegs, x"00", PktUARTRMPBitMask), -- Element 6
01:36 PM NoSpark: I'm 99.99999% it's not a wiring issue. In the documentation for the 7i52 the /TX = TX- and /RX = RX- ??
01:37 PM NoSpark: *In the documentation for the 7i52 does /TX mean TX- and /RX mean RX-?
01:40 PM NoSpark: so pin 7i52 P2.3=RX3 and P2.5=TX3 connect to B- and P2.4=/RX and P2.6=/TX connect to A+ ??
01:40 PM NoSpark: (readhmid doesn't seem to report version numbers)
01:41 PM pcw-home: readhmid does report version numbers
01:42 PM NoSpark: sorry, it was further up, not in the pin lst
01:42 PM NoSpark: yes, they are version 2, bot PKT TX and PKT RX
01:43 PM NoSpark: * they are version 2, both PKT TX and PKT RX
01:45 PM pcw-home: Not sure then, I think TX- (un-inverted pin) = A (which needs the pullup) and TX_ = B which needs the pulldown
01:46 PM NoSpark: do I need to add external pullups/pulldowns?
01:46 PM pcw-home: Yes, for RS-485 you need to define the undriven state
01:48 PM NoSpark: shouldn't the undrive state float at approx half the driven voltage?
01:49 PM pcw-home: No, it must be in a definite state when undriven
01:49 PM lcnc-relay: <Travis Farmer> rdtsc: i know now it is very wrong, the braking resistor. but i can't afford the right one at the moment... should i turn braking off? it is set to use only a low percentage of full braking, like 50% or less (don't recall exact value)
01:50 PM NoSpark: pcw-home: can you look at https://jauriarts.org/_matrix/media/v3/download/jauriarts.org/yiRzwktpNschMiSFERXkiQVh/image.png
01:51 PM pcw-home: Travis farmer: use a small 220V heating element like a stovetop element if you have one around
01:51 PM lcnc-relay: <Travis Farmer> ok
01:53 PM pcw-home: NoSpark It must be in a valid idle level if not driven (A high B low)
01:53 PM NoSpark: pcw-home: okay, I will add some pull ups/downs and see if that improves things
01:54 PM NoSpark: I'm assumeing about 1k between +5v and A and 1K between GND and B on the mesa screw connector?
01:55 PM lcnc-relay: <Travis Farmer> i assume, NoSpark, you have terminating resistors? (120ohm)? just checking...
01:56 PM NoSpark: yes, I have added a termination resistor to 1 end, but the run is only 500mm, and the baud rate is 4800 atm
01:56 PM NoSpark: (about 2 foot)
01:57 PM NoSpark: I'm not seeing any ringing or reflections on the analyser either (well, a tiny bit of ringing)
01:58 PM NoSpark: later problem, right now I need sleep
01:58 PM NoSpark: thank you for the help PCW
01:59 PM NoSpark: It really is appreciated
02:07 PM pcw-home: I would use lower pullup/pulldown, like 220 ohm because of the built in termination on the 7I52
02:31 PM lcnc-relay: <satiowadahc> On shorter runs you can drop the termination down to 100 ohm.
03:32 PM LWK_ is now known as LWK
05:32 PM xxcoder: interesting. perment hot air balloon stool. https://youtu.be/HXEi0fAs3Ws
05:33 PM xxcoder: warning: really annoying guy'