LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Having issue VISA Read reading entire serial response


@raycharles wrote:

As far as the hardware side of things go my setup & code expand from sending to just 1 device to multicasting the commands to multiple of the same device. Each usb device is identical. When testing the devices individually they perform normally and send back all the commands. It's solely when I attempt to multicast the commands in parallel.

 


Except you are not multi-casting multiple commands in parallel.  You are sending the commands sequentially.  Maybe in very rapid succession between command-response, command-response, but it is not in parallel.  And you are doing that for one device at a time.  In fact your code doesn't reflect the handling of more than one device.

0 Kudos
Message 21 of 23
(667 Views)

Sorry RavensFan I was unclear on that. The code I have been posting is just the "send_cmd.vi" I use to send the commands for each device (which is indeed sequentially sending the commands to 1 device).

I have a parent vi containing multiple copiess of the "send_cmd.vi" in order to multicast the commands and run the devices in parallel ("send_cmd_device_1.vi", "send_cmd_device_2.vi", etc.), they are all a copy paste of the .vi we have been modifying in this post. The parent .vi which holds these multiple iterations does nothing else aside from telling all the copies to "start" at the same time (i.e. telling all the "send_cmd.vi" duplicates to send the commands to their respective device aka send the commands in parallel).

 

I omitted including the parent as it literally just a Boolean Start Button that sets the case to "True" allowing all the .vi's to fire off. In that essence, I don't believe the Start Button would cause the issue that I am seeing.

It appears to possibly be a USB Bandwidth issue in which the Hub is having difficulty managing the USB Bandwidth causing the latter USB ports to lose connection while sending back responses.

0 Kudos
Message 22 of 23
(663 Views)

@raycharles wrote:

Hardware wise I am communicating to other usb serial devices through a multiport USB Hub, so I am guessing there is bottleneck occurring while I send commands to other devices and this device just so happens to be on the latter end of the ports therefore gets clipped.

Yes!! You've (probably) found the problem.

 

A short story -- we developed a system to study mice.  We had cages instrumented with a Video Camera and a Serial device, generating images at 10 frames/sec and short text messages at 10 messages a second.  We ran this from the Animal Facility, transmitting all of the data over Ethernet to a single PC on another floor.  We had no problem running 24 stations (24 cameras, 24 serial devices) simultaneously.

 

A colleague wanted to do the same, but with 4 stations and with less expensive hardware -- he chose USB Web Cams (instead of a more expensive Ethernet camera).  We couldn't handle 4 stations -- it turned out the USB Hub wasn't able to handle the traffic.

 

USB is fine for 1 or 2 simultaneous devices, but it does represent a bottleneck.

 

Bob Schor

0 Kudos
Message 23 of 23
(640 Views)