10-19-2010 01:40 PM
Hi all, I need some help with group project I'm working on. I have to design multiple test equipment functions like an oscilloscope and function generator on a system-on-chip device, Cypress Semi's PSoC5, and we're trying to make it work with LabVIEW where LabVIEW would be able to read waveforms from the PSoC and be able to change variables in the program. We have tried to use VISA to get the PSoC to connect, and it looks like the driver is configured correctly, but the example program I have that is trying to communicate with the device won't pick it up. It just says communication is not available at this time. I don't know enough about the code, VISA, or USB communication to be able to debug it and I am really just lost behind a layer of abstraction here.
I'd like to hear some ideas about what I can look at to get an idea of how to implement this. Example code is very helpful, and more in-depth documentation of VISA functions and how to use them in LabVIEW would be much appreciated. Besides using VISA to connect, I've considered configuring the PSoC as an HID device, but I don't know if that will let me read waveforms in real-time (I get the impression it limits the communication to 8bits? probably not enough for hi-resolution waveform reproduction).
10-19-2010 03:48 PM - edited 10-19-2010 03:50 PM
Have you done a search of this forum for "USB" or PSoC? While USB means "Universal Serial Bus" it has nothing to do with "Serial ports" in the traditional sense. If Cypress provides a .dll or a .NET construct that exposes the direct communication, or if the PSoC implements its USB communication as a virtual "comport" those would be ways to try.
04-20-2012 12:15 AM
Hi,
I am currently working in Project to control a stepper motor by labview. I want to send pulse programmed by Labview to PSoC. My PSoC and laptop is connected by simple USB. It is not any NI USB. I have finished writing the code. However, while running the code, I am not able to send the pulse to PSoC ( The motor doesnt start).
It will be very helpful if information regarding the communication bettern PSoC (connected by simple USB) and LabView is provided.
thanks
Sagar
04-24-2012 06:06 PM
Hi Sagar,
Here is a USB Tutorial that exposes how to use LabVIEW to communicate with a USB device. Now, as far as communicating with the device goes, we would need to have the instruction set that we will send the PSoC. You can check the OEM’s documentation on it, since there is no way that LabVIEW knows what commands will the PSoC understand. There this other forum post that you might want to look at for reference.
04-24-2012 08:51 PM
Thanks!
04-24-2012 11:03 PM
This is the best resource for PSoC:
04-24-2012 11:24 PM
Thank you!
Sagar
05-02-2012 09:28 AM
Hi,
Being a beginner of LabView I encountered another problem.
I used a serial port connected to PSoC which is connected to my Labtop by USB. It is USB 232 converter.
With this interface, I can send signal to my PSoC driving my stepper motor. However, I am not able to control the stepping angle and the direction of the motor. I have written the code, however seems that signal is not generated from the code to control stepping angle and direction.
I also encountered another problem. Sometimes while running my code, no error message is generated however, the motor doesnt move. To referesh the serial port, when the USB part of (232 converter that is my interface) is pulled out from computer port, the motor moves slightly, To be short, the motor in some cases for same code gets the signal when the port is disconnected from the computer.
Will be glad to know the reason and the procedure to solve it.
Thanks!
Sagar
05-02-2012 09:49 AM
Hi Sagar,
For the first issue, verify that you are using the correct commands to talk to the PSoC as well as the correct serial settings. You can use the VISA Test Panel in Measurement and Automation Explorer (MAX) to do this. This KB shows what the screen should look like for a couple of VISA versions. You can probe with several commands to see if you get a response from it.
Initially, to communicate with the PSoC using LabVIEW, try Basic Serial Write and Read.vi, located in the Example Finder (Help » Find Examples » Hardware Input and Output » Serial).
05-02-2012 08:13 PM
Thank You!
Sagar