Jump to content

help me out!


faisaldin

Recommended Posts

Hi ..

I want to use VISA for READ and WRITE purposes. The data I want to WRITE is the reference point for the position control system using dc motor and the data that pc READS by VISA is the feedback taken from motor. This feedback gives the position which I want to show in labview on GUAGE.

I'm just a beginner with labview. I already maked one program but it doesn't works.

I checked it by shorting the RXD and TXD of serial cable.

If any one can help me please correct the given programming. I'll be very thankful to you.

Also please highlight your steps.

Link to comment

Dear faisaldin,

I took a quick look at your code and I don`t see anything wrong at first. You have to give us more information if you want any valuable answers. Tell us what you have done so far (for debugging it) and what is not working exactly.

For example, could you clarify what happened when you shorted the TxD and RxD with another test application. Was it successful? Could you read what you were writing out on the port? Are you sure that the cable is crossed and not straight (i.e. TxD gets into Rxd of the instrument and vice-versa.)

Also, what are the errors you are getting right now?

Olivier

Link to comment

Thanks olivierL

After shortng the TXD and RxD of serial cable the labview prompts as:

Error -1073807252 occurred at VISA Read in Untitled 2.vi

Possible reason(s):

VISA: (Hex 0xBFFF006C) An overrun error occurred during transfer. A character was not read from the hardware before the next character arrived.

and i cant read any thing, no appearance on guage.

please tell me how ths error can be removed. Whats the mistake??????

the serial cable is fine because i have checked it using hyperterminal so the fault is in coding .....

Link to comment

QUOTE (faisaldin @ Dec 1 2008, 06:25 AM)

Hi ..

I want to use VISA for READ and WRITE purposes. The data I want to WRITE is the reference point for the position control system using dc motor and the data that pc READS by VISA is the feedback taken from motor. This feedback gives the position which I want to show in labview on GUAGE...

I suggest you configure the port only once (outside the while loop), and then close the port at exit. You might also want to flush the port before entering the loop. You also need some delay in your loop to avoid repeatedly hammering the port. I would put the VISA Write function in a case structure with a button or some other logic that enables the function. I assume you are trying to read and write to the same hardware. Does the hardware require a command string to toggle between read and write mode? Does the hardware require an end of line character? I have never used the Convert to Dynamic Data and Convert from Dynamic Data functions to cast an array of bytes to a DBL. You might try the Type Cast function instead (Numeric/Data Manipulation palette). I hope this helps...

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.