LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending Commands via Serial Communication

Solved!
Go to solution

I am trying to send commands via serial communication. I have 4 commands (analog1on,analog1off, analog2on, analog2off), for other commands; nothing will happen... I compare the data that is coming from the serial. But after sending "analog1on" via serial communication,  Nothing happen. I assume that I have to keep this data and with this data; my process will not be affected by anything until I send "analog1off" command... Please help me, I am new in the Labview. There is no problem in my communication, I can take data from other com. But I didn't find this problem.

 

 

 

In order to make you understand my code; I am trying to do it.

1) I control the serial com. with my switch and When I make it high, serial communication starts run

2) After initializing the serial communication; I sent "Rs422-on" in every 5 seconds.

3) I compare the data coming from the serial in order to produce a sin wave and square wave.

4) "Analog1on and off analog2 and off" string expression are used for comparison. Please write commands that you sent via serial in it. 

0 Kudos
Message 1 of 13
(6,823 Views)
0 Kudos
Message 2 of 13
(6,807 Views)

Can you start by clarifying a few items?

1. What are you communicating with?

2. Why are you using 4 string controls to specify strings to match? I suspect answering 1 will help a lot with guidance here, but even if you wanted to match strings, I'd probably suggest String Constants instead.

3. Are the simulate signals for demonstration, or are they a real part of your application? For example, do you want to output them somewhere?


GCentral
Message 3 of 13
(6,778 Views)

Actually; I apply a job and they give me one week to make this project. I have no device, I use virtual serial port driver for communication. I attach my responsibilities they give me...

0 Kudos
Message 4 of 13
(6,775 Views)

"Visa read" send always "" nothing... when we do nothing. So it compares "" expression with "analog1on". it stops to generate signal. Problem occurs after sending analog1on command. I want to continue my "generate signal command". But it compares ""  with it. So it stops! Once analog1on is set(true), I want it not to stop whatever it comes until analog1off command.

 

In the comparison part; I think we have to write a code in both false situations. If it works before ,it will continues to work, if it doesnt work before, it will not continue to work. when we sent a command without analog1on analog1off analog2on analog2off...

Download All
0 Kudos
Message 5 of 13
(6,764 Views)
Solution
Accepted by topic author BiqBanq

@BiqBanq wrote:

Actually; I apply a job and they give me one week to make this project. I have no device, I use virtual serial port driver for communication. I attach my responsibilities they give me...


So...

 

Are they testing you to see how well you know LabVIEW?

OR

How well you are able to ask other people to do LabVIEW programming for you?

0 Kudos
Message 6 of 13
(6,734 Views)

I applied this job and I participated a interview. I  passed the first interview. For the second interview, They want to see whether I can make a project that is related to the programming language I dont know. In one week, I have to learn labview and ı have to prepare myself for presentation in this short time. This interview shows the man can handle a topic that he doesnt know anything about it. Although I complete most of the part of this project. I help for  a single part of this project.This is a question, not a wish to complete this project. My responsibilities are posted for your understanding... If you have any idea for it, please help it, 

0 Kudos
Message 7 of 13
(6,729 Views)

I hope your interviewer monitors the forum, as that last post with your curse words gives some insight into your personality.

 

Why would they be asking to hire someone to program in LabVIEW if they don't  know LabVIEW.  I would think they'd be looking for a LabVIEW programmer, and are just testing the applicant to see if they really do know LabVIEW.

 

Any self-respecting LabVIEW programmer is not going to help you deceive your potential employer into hiring you as that would reflect badly on all LabVIEW programmers when they find out you are not able to do the job.

0 Kudos
Message 8 of 13
(6,716 Views)

I dont want to spend too much time with you. I am working for this project for 5days, I learn lots of thing, In our country; most of the university dont teach labview, I know matlab,simulink,C,C#,Python,Msp430. but I really have tried to learn labview for 5days.I didnt go outside for this project. I am newly graudated electric and electronic engineer. I have to learn alot. Please dont blame anyone if you really dont know the topic.

0 Kudos
Message 9 of 13
(6,706 Views)

@BiqBanq wrote:

I dont want to spend too much time with you. I am working for this project for 5days, I learn lots of thing, In our country; most of the university dont teach labview, I know matlab,simulink,C,C#,Python,Msp430. but I really have tried to learn labview for 5days.I didnt go outside for this project. I am newly graudated electric and electronic engineer. I have to learn alot. Please dont blame anyone if you really dont know the topic.


It's possible that RavensFan can't program a simple serial port application, but based on a few thousand other posts I'd guess it's not likely... I think I've probably learned plenty from his posts on almost this very topic.

 

I'd suggest searching for existing posts about serial communication, there are a rather large number here. I'd also take another look at your requirements, since I'm not convinced (although perhaps I've misunderstood) that you're going in the right direction.

 

We're all here to learn things and certainly many of the questions I ask are related to my professional work with LabVIEW, but I'd hope none of them can be read as "I don't know how to do this, can you (please) do it for me?". Your post is in a certain danger of being interpreted in that manner.

 

You did show code that you've written, so that gives a nice starting point for improvements. Reread the requirements and check that you correctly understood them. Go on to check the commands you're supposed to send, and then evaluate how you might evaluate the functionality of the (fictional?) device you're testing. What is it meant to do? How can you see if it is doing that?

 

Good luck and feel free to post if you have specific problems, along with your research to that point and what you've read/watched/tried.


GCentral
Message 10 of 13
(6,690 Views)