11-02-2006 09:21 AM
11-02-2006 09:53 AM
Now the command format is * 2 18
I don't see this command in the manual. I see "? 2 18" and "# 2 18" and I would recomend you start off with the "?" command which is a request once for data. You would, in either case, need to use the VISA Bytes at Serial Port to determine how many bytes should be read. I would also recomend that you do your intial debug of the instrument communications with Hyperterminal. See if you get all requested parameters there.
11-02-2006 10:44 AM
Hi Dennis
This shows the access codes for individual parameters or blocks of consecutive parameters, these are normally used in a production line environment where the gauge is connected to a PLC or similar device.
The parameters are sub-divided into “Input” and “Output” parameters which mimic the PROFIBUS “Master to Gauge” and “Gauge to Master” pages.
This is used typically with a Hyper Terminal PC program where each code generates a page of data that is normally used for demonstration purposes. The data can be accessed by typing the Numerical or Alphabetical code followed by the enter key, it is then possible to change presets etc on the page.
We have two parameter groups, one is diameter gauge Output value and another is for Writing the set value.
The symbol '&' is used for commands in Master to Gauge table to WRITE any value to the gauge. (for example, set 'outer diameter preset', use command '&4 10000', address of 'outer diameter preset ' is 4, value is 10.000mm)
The symbol '?' is used for commands in Master to Gauge table only to READ the written value from the gauge. (for example, Read 'out diameter preset' use command '~4 1" , address of 'outer diameter preset' is 4, length of reading is 1)
The symbol '~' is used only to READ the output parameters in Gauge to Master table in read ONCE mode.
The symbol '#' is used only to READ the output parameters in Gauge to Master table in read CONTINUES mode. Use 'Esc' to stop. So this can't be used with PLC's as to stop as we need to use 'Esc' all the time.
Both '~' and '#' can be used to get SINGLE or MULTIPLE parameter values in one go. (single means only diameter value and multiple means, Diameter value, X, Y Position, error, etc in one command)
For example, for CONTINUOUSLY read "XY average, error, x, y, x position and y position" (total 6 parameters) and First parameter is 'XY average', the address is 5, We can use command '#5 6'. Similarly '#5 4 will it stop at XY, error, X, Y.
Use command '~5 6 for reading data (using Gauge to Master table).
Use '~' when working with PLC's for readingUse '&' for writing and '?' verify written value (using Master to Gauge Table) when working with PLC.
In short '#' is generally used only with terminal programs for diagnostics purposes.
11-02-2006 10:45 AM
We have now checked it with Hyper Terminal as suggested by you and there also we get only first 16 lines from the command format. For example if we send the command ~2 18 we get reading first line as ~2 18 and then 16 of next datas starting from 2. Now I understood some of my mistakes I was doing in LabVIEW. Now to sum it up
It may sound silly to you but sometimes the easiest thing might be the toughest one to crack without some expert help.
11-02-2006 11:49 AM
11-03-2006 12:52 AM
11-03-2006 07:42 AM
The mask value is explained in the on-line help as I already mentioned in a previous post. 16 is flush the receive buffer.
One thing I don't think I did was make the front panel string control display \ codes so if you are typing in a \r or \n, you need to change it. Just right click and select '\' Code Display.
12-11-2006 03:20 AM - edited 12-11-2006 03:20 AM
Hi
I think the bytes that to be read through the NI VISA READ.vi should be having a constant value bu depending only on Baud Rate.
Please help me to resove this problem.
For a baud rate of 38400 its seen that the read bytes should be 100 or 101 or 102. I got these values by putting a control for this input, actually i dont know how to or what should be the value. But if it takes a vlaue other than these, it will take more time to execute the read function.
Why its so?
Can i calculate the bytes to be read that should be wired to read bytes in NI VISA SERIAL READ.VI with respect to Baud Rate selected.
Baud rate: 38400
Data bits: 8
Parity: None
Stop bits: 1
Flow control: None
The recieved byte count is 11 (I dont know what does it mean)
Message Edited by PIPL on 12-11-2006 02:28 PM
12-11-2006 07:58 AM
There may be a constant number of bytes to read but it has no relationship to baud rate.
What exactly do you mean by "putting a control for this input"? The only way to know how many bytes the instrument is sending is either by some description in the manual (i.e. 'instrument always returns x noumber of bytes) or by using the VISA Bytes at Serial Port.
12-11-2006 10:18 AM