LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read more bits.

Hi guys,

I am new to labview.I have an instrument called FID tester that gives both digital and analog signals, now I am doing the digital part, since I have just switched on the instrument and no values are getting, I have used a 10cm wire to close the circuit, just to get the signal.

Now I have an already prepared vi by someone where it is made to read 1st 4 digits (for some other instrument), but now I want to modify that vi to this instrument (FID) and to do so I want to read last 5 digits which means in total 9 bits! As you can see from the vi that it was used DIOReadPortByte to read the signal and so it means the maximum capacity to read is 8 bits and to read 9th bit I should use something else so I am using DIOReadPortWord, but when I use that I am getting an error saying Function not supported, Kindly please help me out of this since it is an old software and nothing is working!!!

Its just I want to read last 5 digits and while testing I will set a knob to each measurement range and see that Bit 4, 5, 6, 7 are working properly(meaning if I set to measurement range 1 then bit 4 glows, if I set to range 2 then bit 5 etc) but when I see that bit 8 glows everytime(coz its not reading at all)

1st attachment is of byte(the original one) and the second is wat i changed to word where i get the error!

 

 

Download All
0 Kudos
Message 1 of 18
(4,351 Views)

It is very much needed guys...please help me ...........

0 Kudos
Message 2 of 18
(4,260 Views)

I think attaching the actual VI would be more helpful compared to 5MB worth of screen photographs. 😞

0 Kudos
Message 3 of 18
(4,245 Views)

Is it possible you can use the PortReadByte function, but with a different port number, in order to get the next byte?

 

There's not much we can do here to help you. The functions you're using are not standard LabVIEW; they're part of a driver for your hardware. Since you have not provided any details of the hardware (model name, who makes it, documentation) and the subject line of your message is vague, you're hoping that someone will randomly look at your poorly-taken screenshot (is there some reason you couldn't get an actual screenshot?), recognize the VI icons, and be able to help you. You may want to identify the hardware and post a message mentioning your specific instrument in the subject line, so that someone skimming the message listings will see it. If you do post a new thread, include a link back to this discussion.

0 Kudos
Message 4 of 18
(4,229 Views)

If I change the port number other than 0 and 1, then I am getting an error : DIO port illegal channel.

 

The new link is here where the vi is attached.

http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/FID-testa-Hydrocarbons-emission-measuring-ins...

 

0 Kudos
Message 5 of 18
(4,170 Views)

@ashnu wrote:

If I change the port number other than 0 and 1, then I am getting an error : DIO port illegal channel.

 

The new link is here where the vi is attached.

http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/FID-testa-Hydrocarbons-emission-measuring-ins...

 


Why a new link?????

 

It is silly.

 

Post your VI here.

 

 

Message 6 of 18
(4,145 Views)
You may want to identify the hardware and post a message mentioning your specific instrument in the subject line, so that someone skimming the message listings will see it. If you do post a new thread, include a link back to this discussion.

I created a new link as suggested by nathand....
0 Kudos
Message 7 of 18
(4,133 Views)

@ashnu wrote:
You may want to identify the hardware and post a message mentioning your specific instrument in the subject line, so that someone skimming the message listings will see it. If you do post a new thread, include a link back to this discussion.

I created a new link as suggested by nathand....

Let's hope someone is familiar with that piece of hardware.

 

Creating a new post still makes no sense to me.

 

I hope you've read the manual for the hardware. Taking a VI for an unrelated piece of hardware also makes no sense to me.

 

 

0 Kudos
Message 8 of 18
(4,111 Views)

@nyc_(is_out_of_here) wrote:

Creating a new post still makes no sense to me.


OK, sorry, partially my fault. The subject line of this thread is so vague, I thought suggesting a new thread with a useful subject - linking back to this one - might be more likely to get some notice.

 

Ashnu - do you have any more information than "FID tester"? What is the device that is actually reading the digital inputs? Can you see that board? Does it have a product name and manufacturer on it? What about if you open the ReadPort VI - what's inside it? A call to a DLL? Any documentation? How many total digital inputs does the device have? How do you know which terminals on the device are digital inputs?

 

What happens when you read Port 1, instead of Port 0? Does that get you the next 8 input channels?

0 Kudos
Message 9 of 18
(4,034 Views)

 

Ashnu - do you have any more information than "FID tester"? What is the device that is actually reading the digital inputs? Can you see that board? Does it have a product name and manufacturer on it? What about if you open the ReadPort VI - what's inside it? A call to a DLL? Any documentation? How many total digital inputs does the device have? How do you know which terminals on the device are digital inputs?

 

What happens when you read Port 1, instead of Port 0? Does that get you the next 8 input channels?

 

Unfortunately I dont have any info regarding the wiring box like the product name and manufacturer...But I have taken its image for you and I am putting it. 

In the attachment you can go through the Readportbyte's vi and even Readportwordvi.

I have one more file that shows the demo for this Readportbyte.In that they have made something like select device pop up..When I try running thatI get a pop up with "PCL-812PG I/O=220H once I select this it runs normally without giving any error but reads only till 7th bit!Thats the problem.

Similarly I have a demo for Readportwordvi too, Even in this the device pop up comes and when I run The same error message! Function not supported appears...So wat do u think? is any driver has to be installed??But howz it possible tat for different functions(Bits, bytes, word) we can have different drivers?

Similarly I have a demo for Readportbitvi too, Even in this the device pop up comes and i should input the bit position m interested to look into..so this vi works perfectly from 0 to 7, but whereas when I say 8, it says illegal input channel.So the device and driver works well for byte and bit reading but how could it be possible not reading the word!

OR...Is it something that i can use Readportbyte itself and ask it to read 2 bytes, but there is no option to do tat.

When I read port 1 all the LED goes red/except 8, but that is just because it is asked to display.For Ex: if i  ask it to display more than 9 positions also it will just glow green even though nothing is connected)! Meaning none of the bits are being read.

 

Download All
0 Kudos
Message 10 of 18
(4,004 Views)