LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW USB to a system on chip device

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).

0 Kudos
Message 1 of 18
(5,692 Views)

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.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 18
(5,676 Views)

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

 

 

0 Kudos
Message 3 of 18
(5,498 Views)

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.

Regards,
Daniel REDS
RF Systems Engineer

Help us grow.
If a post solves your question, mark it as The Solution.
If a post helps, give Kudos to it.
Message 4 of 18
(5,471 Views)

Thanks!

0 Kudos
Message 5 of 18
(5,465 Views)

This is the best resource for PSoC:

http://www.psocdeveloper.com/forums/

Message 6 of 18
(5,460 Views)

Thank you!

 

 

Sagar

0 Kudos
Message 7 of 18
(5,457 Views)

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

0 Kudos
Message 8 of 18
(5,429 Views)

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).

Regards,
Daniel REDS
RF Systems Engineer

Help us grow.
If a post solves your question, mark it as The Solution.
If a post helps, give Kudos to it.
Message 9 of 18
(5,426 Views)

Thank You!

 

Sagar

0 Kudos
Message 10 of 18
(5,414 Views)