Confused by DINT tag program method. Need help.

Hi all,

I'm modifying a system and came across a dint tag used in a way I've never seen before. The tag name is cvProcess yet he has a xic named cvProcess.[VatNumber]

where did the [VatNumber] come from and how is he using it? How do you do this and what's the purpose of doing so. It looks pretty awesome but I don't understand what's going on. I attached an image of the tag xic, and one of me monitoring the tag and you can see that it's just a dint tag. Please help! Thanks all! :confused:

DINT TAG.jpg DINT TAG 1.jpg DINT TAG monitor.jpg
 
It's called an indirect address. cvProcess is a DINT and the programmer is wanting to know if particular individual bits are off. They are indirectly changing which bit they are questioning based on the value of VatNumber.

Lets say that VatNumber = 4. then the rung in the first picture would essentially be cvProcess.4. When VatNumber = 10, then the first picture would essentially be cv.Process.10. Simply by changing the value of VatNumber, it will point to a different bit in cv.Process.
 
VatNumber is another tag that someone created. This is indirect addressing. Depending on the value of VatNumber, the bit of the DINT that the code refers to depends on the value of VatNumber. If VatNumber is 2, then code refers to DINT.2.
 

Similar Topics

Hi all! I have to ask if anyone has seen anything like this before. I have a cooling fan motor that shuts down upon keying the mic of a radio...
11
Replies
1,352
Views
Which of the following input operations require a conversion to digital form prior to input? a) disk b) analog c) contact closures d) limit...
12
Replies
5,627
Views
Hey all! I recently purchased myself a Panelview Plus off of ebay and i was hoping that i could upgrade the firmware on it to Version 9 or so and...
7
Replies
4,841
Views
Good morning everyone. I am apparently confused on the COP instruction. What I am trying to do is copy a DINT to a DINT in a User Defined Data...
16
Replies
12,172
Views
Hey guys, Im currently using the above flex IO to turn on two outputs these outputs go to two flashing red beacon lights. Here's the scenario: My...
4
Replies
2,615
Views
Top