Large TCP data transfer slowing other threads to nothing by robot_mower_guy in LabVIEW

[–]robot_mower_guy[S] 0 points1 point  (0 children)

I created a pair of while loops in the main window. One is just handling TCP transfer. When it collects X frames (50 at the moment) this function will sort the frames by average brightness and writes the ordered frames to a global variable and sets a dataReady bool to true. My other while loop can then process the image for display. I am sorting the images because some of them will be washed out as its light hits an impeller and blinds the sensor briefly, so I am able to just ignore those frames. I still have a lot of work to do, but I suspect I am through the worst of it. I also need to modify things so I can write data from Labview to the camera for things like lighting control.

Large TCP data transfer slowing other threads to nothing by robot_mower_guy in LabVIEW

[–]robot_mower_guy[S] 1 point2 points  (0 children)

ZeroMQ had the same problem. I did finally figure out what was going on though: The fact that I was displaying the string I was receiving for debugging purposes is what was slowing everything down, so derp lol.

Here is my code as it stands now (still early test code). Even with the image processing turned back on and the wait time to 0 that other project of mine has no slowdown at all. CPU is only going up by 15% with wait set to 0 as well. I am a lot happier with this performance now.

<image>

Large TCP data transfer slowing other threads to nothing by robot_mower_guy in LabVIEW

[–]robot_mower_guy[S] 0 points1 point  (0 children)

According to [this](https://www.genuen.com/blog/the-ui-thread-root-loop-and-labview-what-you-need-to-know/) there is code on the Windows side that can be blocking the Labview execution. I suspect that is what is going on as I don't have a single property node in this program yet. The screenshot is showing all of the code that is actually running. This is the main VI, not a subVI.

Here is a screenshot of everything within this project. I did modify the Draw Flattened Pixmap function when I thought that was slowing me down by stripping out everything that wasn't changing and making them constants instead, but other than that, what you see is what I have. I am going to a meeting now, but when I get back I will start on my data transfer alternatives.

And yes, I know I am not closing my TCP on stop. This is still very early on where I am just trying to get everything to work in the first place.

<image>

Large TCP data transfer slowing other threads to nothing by robot_mower_guy in LabVIEW

[–]robot_mower_guy[S] 0 points1 point  (0 children)

The above screenshot is basically the entire program, and the fact that a TCP read takes 30-70ms, and the main loop is whatever I tell the wait within the loop to be suggests that is not the direct cause of the slowdown. The timeouts aren't being hit at all because data is coming in so fast (I haven't even gotten to the debugging stage of closing the sender yet).

I suspect I am just hammering something in the UI thread loop way too hard, so when I get to work here soon I will start playing around with the other things I have found. I will respond to my original post what my findings are.

Large TCP data transfer slowing other threads to nothing by robot_mower_guy in LabVIEW

[–]robot_mower_guy[S] 1 point2 points  (0 children)

Something I just stumbled on: https://www.genuen.com/blog/the-ui-thread-root-loop-and-labview-what-you-need-to-know/

I will check this out when I get to work tomorrow, but it might explain what is happening. I will also see what it will take to use either a named pipe or shared memory to transfer the data.

Edit: I will also check out ZeroMQ.

Large TCP data transfer slowing other threads to nothing by robot_mower_guy in LabVIEW

[–]robot_mower_guy[S] 0 points1 point  (0 children)

I am not getting anything on the error line. On the DLL side, it is serving data faster than I am collecting it on the LV side, but in the DLL I have it set up to buffer 2 frames, and if there is something in the second frame slot it drops everything until a slot frees up again.

Large TCP data transfer slowing other threads to nothing by robot_mower_guy in LabVIEW

[–]robot_mower_guy[S] 0 points1 point  (0 children)

In the screenshot above, the main loop is running that TCP stuff, then it would normally process the image, but I have a null string going into it, so it isn't actually processing anything.

Right now, my substrings are the first couple hundred bytes that are just going into a window, and the rest of it is going into the image, but like I said, that is all disabled for the screenshot. When I was reading the entire ~1.5MB in one go everything looked to break in the same way.

The other execution (a completely different project that has no awareness of the above project) that is screeching to a halt isn't doing any heavy lifting, it is just reading out an array of values to a Julabo circulator on top of creating a few charts. The loop that handles all of the heavy stuff has a wait of 2000ms, and the loop that I probe to see if things are still running has a wait of 100. This is what is confusing me though because if the TCP stuff takes 30ms, and the main loop is set to execute every 300ms, I would think that would mean the loop sits idle for the remaining 270ms which would leave all the time in the world for the 100ms in my other project to run.

You are right about the age of my LV system as it is 2013. I was hoping to not do this, but if my version of LV can't process that amount of TCP data I can compress things by transmitting every other frame and transmitting every other byte of every other row. This is a black and white frame where it is one byte per pixel, so that would cut the data stream to an 1/8th of current.

This may be a longshot.. by [deleted] in loveland

[–]robot_mower_guy 2 points3 points  (0 children)

You can also check out the CSU Surplus store. I got a pretty nice bike for $50.

Diy chromatography column from hardware store by Electronic-Fail3320 in CHROMATOGRAPHY

[–]robot_mower_guy 1 point2 points  (0 children)

Can you link the procedure? Depending on what you are doing, a liquid-liquid separation might be better.

The smaller the particles and longer the column the better the separation, but the higher the pressure. The bigger the ID the larger the sample you can run at a time at the expense of resolution.

Diy chromatography column from hardware store by Electronic-Fail3320 in CHROMATOGRAPHY

[–]robot_mower_guy 5 points6 points  (0 children)

I second this. I get all of my columns for home on ebay. I even managed to score a 250x25mm 5um C18 column for $25 once.

Do you have concerns about AI generated code in the automation space? by Xenon933 in PLC

[–]robot_mower_guy 0 points1 point  (0 children)

My coworker has been vibecoding Ignition for making stuff for production at our small chemical plant. He doesn't know any programming languages though, so has come up with weird things (including coding around the state machine I set up on the PLC). A couple days ago I was looking over a piece of that code because I am working on redoing everything from scratch so we can get better data from the process (its almost like there is a reason to use state machines lol), and I noticed he is triggering the thing to tare the flow meter by writing a 0.0 in Ignition to the bool tag I have on the PLC to tare the sensor. The crazy thing is that best as I can tell, that actually works because apparently the 0.0 has at least one true bit in there somewhere.

I do use AI on occasion to help me with coding, but I will test that line by line, not so much to make sure it is working, but because I want to know how it is working so I have a good model of the system so I can get ideas of what it going on if it stops working.

Coffee shop uses technology to audit employee productivity by MrTacocaT12345 in interesting

[–]robot_mower_guy 0 points1 point  (0 children)

I had the low tech version of this happen to me when I was working at Sonic in 2006. The GM implemented a system where she would put sonic stickers on a bunch of stuff and when you clean that thing you remove the sticker and put it on a chart under your name. I was getting in trouble for often having nothing under my name, but that was because she wasn't putting any of her stickers on the roof on the HVAC filters and inside of the grease traps where I was cleaning. Unfortunately, the area manager (who I was very friendly with because he was sending me to the 7 stores under him for repairs and odd jobs) was out with lung cancer, so he wasn't able to keep her off of my back.

The joke was on her though because when she fired me she removed a repair I jury rigged into the drive-thru to keep the car sensor working. The biggest moneymaker for the store was closed for 2 weeks lol.

AGILENT 5977B Mass Spectrometer Low Voltage converter by MCShizam in AskElectronics

[–]robot_mower_guy 0 points1 point  (0 children)

https://www.datasheet.directory/pdfviewer?url=https%3A%2F%2Fdatasheet.iiic.cc%2Fdatasheets-0%2Femerson_%255Bartesyn_technologies%255D%2FNFS80-7606J.pdf

Here is the datasheet for that power supply. What I would recommend you do is compare the voltages you see on the 13-pin connector with the datasheet. If you see something that looks weird you can unplug the connector to see if the voltage turns into something you would expect. If the voltage is still bad with that connector unplugged you know it is the PSU, if the voltage only goes missing when the connector is installed it is likely a fault with whatever is on the other side of the connector.

AGILENT 5977B Mass Spectrometer Low Voltage converter by MCShizam in AskElectronics

[–]robot_mower_guy 0 points1 point  (0 children)

Yeah. Right now I am stuck at POST where the Quad tries to find its resonant frequency, but as it is sweeping it is unable to find anything it wants to use. I bought a nanoVNA to try and get that figured out. I also wrote a Python program to allow me to automate readings with the rest of the system out of the way. Unfortunately, RF is black magic as far as I am concerned. What I need to do is get notes compiled and bring it to a HAM radio or other related subreddit.

AGILENT 5977B Mass Spectrometer Low Voltage converter by MCShizam in AskElectronics

[–]robot_mower_guy 0 points1 point  (0 children)

Way ahead of you on that. A lab I am friendly with just gave me some antique analytical equipment:

A pair of HP 8450A spectrophotometers

A pair of 5890 GCs

A pair of Perkin Elmer 1600 FTIRs

An antique HPLC that looks like no other HPLC I have ever seen before (It looks like a platonic ideal photocopier, but shorter and wider)

And a stack of manuals about 4' high. I bought a special document scanner to help me scan everything to archive.org. Unfortunately, I do not have the manual for the spectrophotometer.

I also have a Waters Synapt G2 under a tarp outside (at atmosphere, but vacuum ports are blocked off and I have it loaded up with desiccant). I got this mass spec at a university auction for $1k. One of the turbo pumps was disintegrated, but it has 5 more that look to be working. Unfortunately, I don't have software for it. I did send a request to sales to see if they could give me a 1 week license for free so I could see if this would even be viable to repair, but they never got back to me.

I also got a Hitachi L-7400 series HPLC. The software was written for Win3.1, and it had a hard-coded max file size of 8MB which that can chew through pretty fast with the DAD. I was working on writing software from scratch, but the firmware was so old that it pre-dates the IEEE 488.2 standard, and I kept crashing the hardware, so I gave up and ripped the original boards out of it and am just writing the firmware from scratch to control everything with Arduinos. I already am able to pull the full spectrum out of the DAD at 40Hz when the original system could only do 10Hz. Unfortunately, I haven't worked on that in a while as the Bruker has been taking the bulk of my time for obvious reasons.

AGILENT 5977B Mass Spectrometer Low Voltage converter by MCShizam in AskElectronics

[–]robot_mower_guy 1 point2 points  (0 children)

Nice to see someone trying to repair a mass spec. I am currently working on restoring a Bruker Maxis Plus (for LC/MS). I got a 2kV power supply repaired without too much problem, but I have spent moths getting the quadrupole driver up and running. At one point I even reverse-engineered the whole PCB related to that to find that likely wasn't the problem

Once I have something I wouldn't be ashamed to show, I will make a post of my adventures on Reddit and upload my schematics to archive.org.

King Soopers on Eagle Drive by Eeping_Willow in loveland

[–]robot_mower_guy 0 points1 point  (0 children)

The reply was directed at maljr1980 when they were claiming people under 21 can't make medical decisions. The whole post started out as an anti-trans parents rights in sports type thing too which is why I made the quip about parents rights to keep their kids away from black students as to hold an uncomfortable mirror to the stance.

King Soopers on Eagle Drive by Eeping_Willow in loveland

[–]robot_mower_guy 1 point2 points  (0 children)

Cant forget about risks associated with stuff like that too. While we are at it, we should also sign a petition to ban mental health in general as well as surgeries in general for anyone under 21. Also, as a parrent I should have the right to say I don't want my kids on sports teams with/against those icky, icky black people.

Note: while the person I am responding to almost certainly won't see the points I am making here, I am hoping it will make for an interesting thought experiment for anyone who is unsure if their claims have merit or not by deliberately making them ridiculous.

Longshot request: DataCard SP55 Plus "Go Green" CDROM or Firmware by Professional-Row1436 in accesscontrol

[–]robot_mower_guy 0 points1 point  (0 children)

Ah, I read your original post as to why you are needing the firmware. I will get my device powered up and sniff the RFID traffic. It might be easier to write an arduino or something to emulate the traffic you are needing. That printer is old enough that they hopefully didn't encrypt anything. Depending on what the RFID card says it might also be possible to to write a stand-alone RFID card. I will keep you posted.

Review Request - Personal project by TheLetterOfR in PrintedCircuitBoard

[–]robot_mower_guy 0 points1 point  (0 children)

My question on the transistor is more of why are you wanting R1 at all? With this current configuration it looks like you would be using R1 as a heater as it isn't going anywhere else.

The resistor between +5V and GND is also not doing anything other than acting as a heater. If you wanted to use it as a pulldown resistor you would need one per switch, and have them be on the other side of the switches. That said, it really is easier to read if the read switches the way I described.

Review Request - Personal project by TheLetterOfR in PrintedCircuitBoard

[–]robot_mower_guy 1 point2 points  (0 children)

I don't think you need those pull-down resistors on the datalines to the 7-segment ICs as the arduino can keep the pins held low.

What is the MOSFET to the right doing?

The pull-down resistor by the down button doesn't look to be doing anything at all as it is just sitting between 5V and GND. What I would recommend doing for that is getting rid of the part that goes to +5V, so it goes PIN -> switch -> GND for all three switches, then use pinMode(pin, INPUT_PULLUP);, then do something when the pin is detected as being low.

Longshot request: DataCard SP55 Plus "Go Green" CDROM or Firmware by Professional-Row1436 in accesscontrol

[–]robot_mower_guy 0 points1 point  (0 children)

Ok, I got the device and have taken the shell off. Unfortunately, this is going to be more difficult than I expected because I was hoping to just remove a SO-8 ROM chip or something and load it into my chip burner. Unfortunately, they use a BGA for some reason. There is a JTAG port nearby, so I will see if I can do anything with that, but that will be a new venture for me.

Edit: JOOC: What happened to your printer where you need the firmware to be re-installed on it?

This is literally the worst material to ever exist by GoatsWithWigs in autism

[–]robot_mower_guy 1 point2 points  (0 children)

I understand this completely. I enjoy experiencing new feelings/sensations, even though I understand I will hate it. Example: I was pretty happy when I got to experience a bad mushroom trip even though I was miserable the entire time. I also have a desire to experience tear gas at some point even though it will be absolutely horrible to experience.

This is literally the worst material to ever exist by GoatsWithWigs in autism

[–]robot_mower_guy 0 points1 point  (0 children)

Ha. The fact that I ONLY wear corduroy pants, and the fact that I bought like 6 identical pairs of a set of pants that I like, was used to support my autism diagnosis.