From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

Communicating with a FP-PG-522 under 4.5.1(18)

I want to have the output frequency, of an FP-PG-522, follow a pot object, but I can't seem to control the module. I have imported the PG-522 with Fieldpoint explorer, and can see the PG-522, but can't control any outputs. Thanks in advance for the help.
0 Kudos
Message 1 of 6
(3,050 Views)
Mark,

You can use the following native datamembers to control the FP-PG-522. This information is copied from Lookout's online help (index = FieldPoint Pulse Generator Module Data Members).

PGPG000.00 � PGPG255.15 Number of pulses yet to be generated after the current pulse.
PGPS000.00 � PGPS255.15 Value that indicates the state of the physical outputs. When TRUE the pulse is ON. When FALSE the pulse is OFF.
PGSI000.00 � PGSI255.15 Stop pulse generation immediately.
PGSA000.00 � PGSA255.15 Stop pulse generation after the current pulse.
PGGP000.00 � PGGP255.15 Number of pulses to generate. Works only in finite mode. This input also functions as a trigger: when you change this input, the module begins generating the number of pulses set and continues to the las
t pulse.Use the FieldPoint Explorer to set the pulse generation mode to finite or continuous.


The key here is that Lookout does not allow you to switch between finite and continuous pulse modes. If you are in continuous pulse mode, then you are always outputting, if you are in finite mode, then you need to write a value to the PGGP data members telling the channel how many pulses to generate.

Regards,
Aaron
0 Kudos
Message 2 of 6
(3,050 Views)
Arron, not to sound foolish, but I don't understand the "PGPG000.00-PGPG255.15" syntax. Where can I find more info on this?

Thanks for your help, Mark.
0 Kudos
Message 3 of 6
(3,050 Views)
Mark,

The FieldPoint object has native native members of the form XXYYY.ZZ where XX indicates the data type (e.g. AI for Analog Input, DI for digital Input, PGPG for Pulse Generator Module Pulse Generation, etc...), YYY indicates the module address (e.g. 1 for an I/O module to the right of a network module with address 0) and ZZ indicates the channel number.

If I had a FP-1000, FP-AI-110 and FP-DI-301 (mounted in that order), I could access any of the AI channels using the syntax FieldPoint1.AI001.xx (where xx ranges from 0 - 7 depending upon what channel is used), and any of the DI channels would be FieldPoint1.DI002.yy (where yy can be 0 - 15).

When you create a FieldPoint object and choose to import the IAK file, Lookout automatically par
ses the IAK file to create aliases for the channels. Using the above example, and assuming that the AI channels were configure on the 0 to 36 Volt range, Lookout would create aliased channels named FieldPoint1.FP_RES/FP-AI-100_1/Channel_0 (I may have the slashes wrong, it has been awhile). If you looked at the alias information, you would see that the channel is linked to FieldPoint1.AI001.00 with a scaling of 0 - 65535 (raw) and 0 - 36 (Eng Units). As a side note, using Serial modules (FP-1000/FP-1001), the scaling is done by Lookout/FieldPoint Explorer/FieldPoint OPC/etc, but with ethernet modules (FP-1600/FP-2000/FP-2010), the scaling is performed in the network module itself so there will be no scaling data in the alias.

Regards,
Aaron
0 Kudos
Message 4 of 6
(3,050 Views)
Aaron, Thanks for your help, Mark.
0 Kudos
Message 5 of 6
(3,050 Views)
Mark,

One thing that I forgot to previously mention is that the FieldPoint object in Lookout automatically creates aliases for all configured channels in the IAK file specified. However, by default, FieldPoint Explorer only creates channels (called ITEMS in FieldPoint Explorer) for data values. In the case of the FP-PG-522, it creates 16 channels. Channels 0-7 are 16 bit count values representing the number of pulses left to generate and channels 8-15 are boolean values representing the current physical state of the output (on or off). Using the FP-PG-522 in finite pulse mode requires that you use a channel command to initiate a pulse train. The channel command is known as "Generate Pulses" and excepts a 16 bit unsigned integer. In order to create a
n item in FieldPoint Explorer for generating pulses, that will then have an aliased channel created by the FieldPoint object in Lookout, you should enter the Channel Configuration window (right click on FP-PG-522 and choose Edit This Device then Channel Configuration), and in the lower right corner, where it says Generate Pulses, click on the button that says Create Item. FieldPoint Explorer will respond by popping up a window that says "Generate Pulses @Ch0" was created. Note, the FP-PG-522 also has a second command option for stopping pulses so you may need to use the drop-down menu to select the correct command prior to clicking on Create Item.

Regards,
Aaron
0 Kudos
Message 6 of 6
(3,050 Views)