CleverScope - NI TestStand

CleverScope - NI TestStand, a forum discussion on Cleverscope Mixed Signal USB Oscilloscopes. Join us for more discussions on CleverScope - NI TestStand on our Questions forum.

Back to Forum Index : Back to Questions   RSS
JohnHarrison

5 Jun 2009
Posts:

Have you guys done any work with communicating/controlling a CS320A from NI TestStand?

We want to do two types of tasks;
1. Change the signal generator
2. Capture some samples based on a trigger event and receive the InitialX, DeltaT and data points from the scope for analysis in our predefined scope modules (these are used with other scopes)

We currently have a DOS command line utility that allowed use to configure the signal generator. I have looked at converting this to a C# Class Library (this is a standard we are using for implementing custom TestStand steps), however the class library fails to communicate with the CS320A on the second attempt, the first attempt to change the signal generator works but we need to change the signal a few times during a test.

I have also looked at the SimpleScope C# example to see how the communication should work and have been modifying the example to try what we are requiring, however if the CS320A is not connect when this application is started it locks and I am unable to terminate that instance.

Can you respond to these questions:
1. Can you recommend a method for communicating with a CS320A from NI TestStand?
2. Should there be any issues with communicating with a CS320A from a C# class library, I noticed in the SimpleScope examples it is continuously polling the Control Driver DLL via 50ms timer, is this necessary from the class library?

Thanks
John
bartschroder

5 Jun 2009
Posts: 477

Hello John,
Are you using the latest driver (Cscope Control Driver 2). It should not mind if the Cleverscope is not connected, and will just return a status that tells you it is not connected. If your example of Simple Scope does not have entry fields for connection type (USB/Ethernet), Acquisition unit number (we support up to 8 connected Cleverscopes) or connection status, you have the old one, and you should load the latest from our website.

The latest version only supports the NI-Visa USB driver. It no longer supports QuickUSB. If you load the latest update from the website, it includes instructions on how to upgrade. Coming out next week we have a new updater, that does the upgrade automatically.

Ok, answers:
1. We would recommend using the Cscope Control driver (version 2) for communicating with Test Stand, unless you are using Labview, in which case the Labview driver is better.
2. No, there should be no issues. Make sure that Simple Scope is working properly first, which proves operation in your environment (ie NI Visa is loaded, and the USB port is correctly configured). Our driver we continuously polls the Cleverscope - when there are no acquires pending we poll at 1 second intervals - this is used by the Cleverscope acquisition unit to detect the PC going into suspend, and to recover from a failed connection (eg the cable was pulled out). When we expect a response (eg you have started an acquisition) we poll at 50 msec intervals, which is the Cleverscope app screen update rate. We need to do this because USB is fundamentally a master-slave command response system. As far as communication between your software and the driver is concerned, we will change it to call back at some stage, but for now it is polled. There is no requirement to poll as quickly as the example (it does that to maintain a high screen update rate). YOu can poll only when you want to, with the understanding that you will only get a response when you poll.

I hope this helps. Please feel free to email us if you want more rapid response!
JohnHarrison

5 Jun 2009
Posts:

Hi Bart, Thanks for the quick reply, however I got some information wrong in my original post (the scope was being used in the factory so just went from memory).

We actually have a CS320 (not a CS320A), not sure if that makes much difference?

Here is what CleverScope (App Version 4.639) reports when the scope is connected; S/N: FF3399, Firmware Version: 5326, HW Version: 3.5.

I’ve looked at the NI-Visa USB driver to check it is setup correctly, this may be were the problem is. In the device manager list I see ‘Cleverscope CS328 MSO’ device. Is the CS328 driver the same for the CS320? Also this is listed under the ‘Universal Serial Bus controllers’ rather than under ‘NI-VISA USB Devices’ which is where it should be as described in the ‘Cleverscope update USB driver.pdf’

Cleverscope CS328 MSO Driver details; Provider: FTDI, Date 13/03/2008, Version: 2.4.6.0

Using the ‘usbview.exe’ I’ve extracted the below information for the ‘Cleverscope CS328 MSO’ connected device:
bcdUSB: 0x0200
bDeviceClass: 0x00
bDeviceSubClass: 0x00
bDeviceProtocol: 0x00
bMaxPacketSize0: 0x08 (8)
idVendor: 0x0403 (Future Technology Devices International, Ltd)
idProduct: 0xEEA8
bcdDevice: 0x0400
iManufacturer: 0x01
iProduct: 0x02
iSerialNumber: 0x03
bNumConfigurations: 0x01

ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed: Full
Device Address: 0x02
Open Pipes: 2

Endpoint Descriptor:
bEndpointAddress: 0x81 IN
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (64)
bInterval: 0x00

Endpoint Descriptor:
bEndpointAddress: 0x02 OUT
Transfer Type: Bulk
wMaxPacketSize: 0x0040 (64)
bInterval: 0x00

Thanks
John
bartschroder

24 Jun 2009
Posts: 477

Hello John,
sorry about the very slow reply - I have been snowed under and ignoring posts for the last couple of weeks. The CS328 classic does not use the NI Visa driver. It is based on the FTDI FT245 USB interface and uses an FTDI driver. The FTDI driver works fine under XP and Vista 32, but not under Vista 64. We still have an issue to work out there. The Control Driver works with both the Cs328A and the CS328A. If you install the Cleverscope app, does it work properly - that would prove that your environment is good. Please let me know if the app works, and then secondly, if the simple scope.exe example works. If they both do, then we can figure out what is wrong after that. For faster response - email us at support.
Back to Forum Index : Back to Questions   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.

×

Your shopping cart is empty.