LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert a normal number to binary?

0 Kudos
Message 71 of 129
(2,056 Views)
YES!!!!
0 Kudos
Message 72 of 129
(2,049 Views)
No response at ALL from that VI.
0 Kudos
Message 73 of 129
(2,045 Views)
After you read the ACK/NAC, do you really need to send a two-byte string with the letters "0" and "6", or do you need to send a single byte containing x06?

Message Edited by altenbach on 08-01-2007 03:30 PM

0 Kudos
Message 74 of 129
(2,039 Views)
Yep, that is definitely the problem.  He is sending the string "06" rather than a single character with ASCII value 06.
 
Vr6Fidelity, right click your string constant and change it from normal display to hex display.  Then edit it by typing in 06.  That is the ACK character.
 
Also, would you need to do another serial read again after sending your ACK?  Actually, this whole idea of sending an acknowledgement to an acknowledgement is rather strange.  Something, I haven't see before.  Is this the correct order of communication?
 
Send string command to device
Receive ACK from device
Send ACK to device
(Then are you expecting something else to come back yet again?  If so, that could go on forever!)
 
0 Kudos
Message 75 of 129
(2,028 Views)
1. I send a command to the device
2. It says ACK
 
Now if I Send 63, the request values command it goes like this.
 
1. I send the 63 command
2. it says ack
3. It sends me data
4. I reply ACK to let it know I got the data.
0 Kudos
Message 76 of 129
(2,012 Views)

What changed about this VI that it now runs very slowly, and times out?

Also I removed the shift register from the error handling of VISA, I was trying to fix the slowness problem, but it didnt seem to help or hinder so i left it out. bad idea?

I also added a logical case structure so that i would not attempt to read an empty port when not sending code 63.

0 Kudos
Message 77 of 129
(2,000 Views)

It's not a good idea to remove the shift register. If an error occurs, you want to handle it and not ignore it.

You are sending x63. Looking at the manual, the command is decimal 63 and hex 3F. You are getting a timeout because there is no data to be read.

p.s. With your case statement, you are sure to be included in the Rube Goldberg thread.

You could just wire the output of the Equal comparison to the case statement or even simpler is to just wire the numberic to it.

Rube Goldberg code

kinda Rube Goldberg code:

Best:

Message Edited by Dennis Knutson on 08-02-2007 07:53 AM

Download All
0 Kudos
Message 78 of 129
(1,991 Views)

Shouldn't the last case statement be a VISA write with an ACK (hex 06) sent in the x63 case?


VR6Fidelity wrote:

Now if I Send 63, the request values command it goes like this.

1. I send the 63 command
2. it says ack
3. It sends me data
4. I reply ACK to let it know I got the data.



 

0 Kudos
Message 79 of 129
(1,979 Views)

About your RUBE GOLDBERG comment:

I attempted to, and did make the nubered cases, with 63 being the one containing the read bytes.

A couple of things about your comment:

1: Is it better to have the boolean T or F with 2 cases in the structure, or have a HEX numbered structure with 63 do the reading and 5 blank cases? Do i need to make all the other cases?

2. You have you case numbered 63 in your busting-my-stones example, but wouldn't it be 3F ?? 

 

 

 

0 Kudos
Message 80 of 129
(1,979 Views)