LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

10 port valve control

Hi,

I ran the programme with a terminal emulation software and the actutator works fine with that. I could get it to switch positions with commands given in the manual.

0 Kudos
Message 11 of 36
(1,830 Views)

Are you sure that you are sending the exact same commands from Hyperterminal and from LabVIEW? When you enter a command in Hyperterminal, do you hit "Enter" afterwards? In LabVIEW, do you include that "Enter" in the string you send? If not, that is likely the problem. You can configure VISA to send a termination character (such as Carriage Return or Line Feed) after every transmission, if needed, by setting and enabling the termination character.

0 Kudos
Message 12 of 36
(1,826 Views)

Yeah I hit enter with the emulator. I did not include that in the labview. So should I type'enter' after the command?

0 Kudos
Message 13 of 36
(1,823 Views)

Yes! That enter is part of the command, and it gets sent to the device. The device interprets it as the end of the command. Without it, the device doesn't know you've sent an entire command, so it doesn't respond.

0 Kudos
Message 14 of 36
(1,821 Views)

I see. I will try it that way then. Thank you !!!

0 Kudos
Message 15 of 36
(1,817 Views)

Just don't do something silly like using the text 'enter'. Smiley Wink

0 Kudos
Message 16 of 36
(1,811 Views)

Hi,

Can we run the 'Basic serial write and read' example given in labVIEW using the student edition? Im having trouble running the VI. Are there any NI VISA add-ons needed to run it?

 

Thanks

0 Kudos
Message 17 of 36
(1,760 Views)

All that you need to run it is NI-VISA. Just saying "I'm having trouble" is inadequate in explaining what sort of issue you are having. Attach your code with a much fuller description, including any errors (with error code) that you are getting.

0 Kudos
Message 18 of 36
(1,750 Views)

A couple of things about running VICI valves through the VICI serial control boxes:

 

1.  As has been said before, you have to have an "enter" character at the end. One way to do this if you are typing into a control is to concatenate it with a following "line feed" ("\n" in "\ Codes" display or "0A" in Hex display, or it's actually on the String palette) string constant.

 

2.  The VICI boxes have a finite response time of several tenths of a second, so to be safe I always put a 1-second delay after writing anything to the valves before either reading their response or sending another command. Otherwise, you'll accomplish nothing.

 

3. You do send an initialization command before you try to make the valve do anything, don't you?

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 19 of 36
(1,737 Views)

I have had this very same problem and this post was very useful, but I'm not sure that the automatic \r or \n worked for me when setting up the VISA channel.  I seemed to have better luck disabling the termination character on the VISA configure serial port vi.  I instead concatinated my string to a line feed constant which seemed to do the trick.  I also added a bit of logic so that the wait between the write and the read isn't constant.  I found that it needs more than 1 second to communicate the response to the /? command and less than 100ms for a possition query. 

 

I hope this helps if it isn't too late.

 

0 Kudos
Message 20 of 36
(1,662 Views)